As a software engineer, I am passionate about creating innovative solutions to enhance user experiences. My specialties include Large Language Model (LLM), Natural Language Processing (NLP), and Computer Vision (CV) in Machine Learning/Deep Learning (ML/DL). Additionally, I am a big fan of computer systems/IoT, and enjoy full-stack development, specifically using C++, Python, and JavaScript. Lastly, the lean startup spirit I acquired from my previous successful startup experience will keep guiding me throughout my career.
๐๏ธ Projects
Projects๐ฌ Publications
- A Redundancy-Enhanced Framework For Error Correction in Named Entity Recognition, 2nd Round of ACL Rolling Review โ24 (First Author)
- GlobalNER: Incorporating Non-local Information into Named Entity Recognition, Arxiv โ23 (First Author)
โ๐ป Blog
Comprehensive Comparisons Between JavaScript Runtimes
This document provides an overview of different JavaScript runtimes, including Node.js, Deno, GraalVM, Hermes, JerryScript, Kinoma, and Bun. It compares their features, performance, security, ecosystem, and use cases. Node.js is widely adopted with a mature ecosystem, while Deno offers improved security and modern features. GraalVM supports multiple languages and is ideal for enterprise applications. Hermes is optimized for React Native, JerryScript is designed for IoT devices, and Kinoma focuses on hardware prototyping. Each runtime has its strengths and is suitable for specific needs.
Jul 23, 2024
Compilers and Polyfills in JavaScript
Compilers and polyfills are essential tools in JavaScript development to ensure code compatibility across different environments and browsers. Compilers like Babel transform modern JavaScript code into older browser-compatible versions, while polyfills add missing functionalities to browsers that do not support them natively. Conformance/compatibility tables help developers choose the right tools based on ECMAScript standards. Common compilers include Babel, TypeScript Compiler (tsc), and Google Closure Compiler, each with its own advantages and use cases. Common polyfills include Fetch API, Promises, Array.prototype.includes, Object.assign, and URLSearchParams, with tools like Core-js, , Babel Polyfill, and Modernizr for managing polyfills. Understanding these tools and their compatibility is crucial for writing efficient and compatible JavaScript code.
Jul 23, 2024
What Makes Asynchronous Programming Possible?
To enable asynchronous programming, key components such as the event loop, non-blocking I/O, callbacks, promises/futures, coroutines, task queues, multiplexing, cooperative multitasking, and asynchronous libraries/frameworks work together. These mechanisms allow for efficient handling of I/O-bound tasks without the need for multiple threads or processes, making asynchronous programming useful for network operations, file I/O, and other scenarios involving external resources.
Jul 22, 2024
Asynchronous Programming
Event Loop
Non-blocking I/O
Interfacing Python with C: A Comprehensive Guide
Python's ability to interface with lower-level languages like C and C++ provides performance gains, access to existing libraries, and low-level system programming. This comprehensive guide explores various methods to interface Python with C and C++, including writing Python bindings for a C++ library using tools like
pybind11
or Boost.Python
, using the Python/C API, utilizing Cython, and ctypes
for calling functions in DLLs or shared libraries. Each method has its strengths and use cases, allowing developers to optimize their applications based on project requirements.Jul 22, 2024
Python
C++
Interface
pybind11
Boost.Python
Python/C API
Cython
ctypes
Understanding Inter-Process Communication (IPC): Bridging the Gap Between Processes
Inter-Process Communication (IPC) allows processes to communicate and synchronize their actions. IPC is important for resource sharing, modularity, performance, and scalability. Common IPC mechanisms include pipes, named pipes, message queues, shared memory, and sockets. Each mechanism has its own strengths and use cases. Understanding IPC enables developers to build robust and scalable applications.
Jul 21, 2024
IPC
Inter-Process Communication
Resource Sharing
Modularity
Performance
Scalability
Pipes
Named Pipes
Message Queues
TCP
Shared Memory
Bridging the Gap: Using CommonJS and ES Modules Together in Node.js
This post explores how to bridge the gap between CommonJS (CJS) and ES Modules (ESM) in Node.js, ensuring smooth interoperability. It discusses the basics of CJS and ESM, the challenges faced when using ESM in Node.js, and provides a solution using tools like
createRequire
and defining __dirname
. The post also covers practical applications and file extensions for ES Modules, emphasizing the importance of understanding and implementing these solutions for code maintainability and scalability.Jul 11, 2024
Node.js
Computer Science
Web Dev
JavaScript
Test-Time Training (TTT): A New Paradigm in Self-Supervised Learning
Test-Time Training (TTT) is a novel approach in self-supervised learning that allows models to learn and adapt during inference, bridging the gap between training and testing phases. TTT layers update hidden states using self-supervised learning, compressing large datasets into model weights. This approach enables continuous learning and adaptation at test time, improving model performance. TTT layers offer a trade-off between expressiveness and hardware efficiency, making them powerful in sequence modeling tasks. The mathematical formulation involves updating the model's parameters based on input data encountered during the test phase. TTT layers have been compared with RNN and self-attention layers, demonstrating superior performance and efficiency. TTT layers have practical implications in scenarios with distribution shifts and can enhance robustness and generalization. The code implementation showcases how TTT layers can be integrated into a larger neural network, optimizing parameters during the forward pass.
Jul 11, 2024
LLM
Language Models
Self-Supervised Learning
RNN
Mamba
Self-Attention
Transformer
A Journey Through JavaScript Module Systems: From Early Practices to Modern Solutions
Jul 10, 2024
JavaScript
Generative vs Discriminative Model
Generative models learn the joint probability distribution of input and output, while discriminative models learn the conditional probability of output given input. Deep learning models like CNNs and RNNs are typically discriminative, separating input into classes. Generative models like Naive Bayes and Autoencoders learn joint probability distribution to generate new data. Language models can be both generative and discriminative, with n-gram models being generative and models like BERT being discriminative. GPT is a generative model that predicts the next word, while BERT is a discriminative model that understands context. Generative models learn joint probability distribution indirectly through conditional probabilities. They generate examples by learning the data distribution during training. Discriminative models are not typically used to generate examples.
May 5, 2024
Computer Science
Deep Learning
Generative Models
Discriminative Models
Language Models
Machine Learning
Note on Modern CSS Development
This post discusses the use of CSS-in-JS libraries like styled-components and emotion, highlighting their ability to write CSS directly within JavaScript code and dynamically adjust styles based on component state or props. It also compares CSS Modules with CSS-in-JS libraries, noting their different approaches to CSS scoping. Additionally, it mentions that using CSS preprocessors like Sass with CSS Modules is common and beneficial, while using them with CSS-in-JS libraries is not necessary. The document concludes with a reference to further reading on CSS methodologies.
May 3, 2024
CSS-in-JS
CSS Modules
CSS preprocessors
Best Practices in React Development
Best practices in React development include keeping components small and focused, using functional components with hooks, lifting state up only when necessary, utilizing context for global state, optimizing performance with memoization and code splitting, handling side effects with cleanup functions and conditional execution, writing unit tests and mocking dependencies, ensuring accessibility with semantic HTML, ARIA attributes, and keyboard navigation, maintaining code quality with ESLint and Prettier, and styling with CSS-in-JS libraries and maintainable CSS practices.
May 3, 2024
React.js
Web Dev
Software Development
Good Practices and Conventions of React Project
This post discusses good practices and conventions for React projects. It covers folder structure options, grouping folders, recommended extensions, naming conventions for files, components, CSS, TypeScript types/interfaces, event handlers, state variables, props, and hooks. It also mentions CI/CD suggestions such as running linting and tests before committing.
May 2, 2024
Retrieval-Augmented Generation
Retrieval-Augmented Generation (RAG) is a transformer-based model that combines document retrieval with sequence-to-sequence generation to produce more factual and detailed responses. RAG utilizes the BERT transformer model for generation and the Dense Passage Retriever for document retrieval. Another important concept is SentenceBERT, which uses siamese and triplet network structures to derive semantically meaningful sentence embeddings. RAG and SentenceBERT have various applications in automated chatbots, recommendation systems, literature review, and document retrieval in legal and healthcare industries. However, biases in training data and the need for substantial computational resources are important considerations.
May 1, 2024
NLP
Information Retrieval
Skip Lists
Deep Learning
The World of Tree Data Structures: Self-Balancing Trees
Aug 12, 2024
Understanding Database Indexing: A Comprehensive Guide
The guide on database indexing covers the importance of indexing for efficient data retrieval, detailing various index types such as primary, secondary, clustered, and non-clustered indexes. It includes implementation examples in C++, a complexity analysis, and advanced index types like B-trees, hash indexes, and GiST. A comparison table outlines the strengths, weaknesses, and complexities of each index type, emphasizing the need to choose the right index for optimizing database performance.
Aug 12, 2024
Database
C++
Data Structure
Understanding Transactions in Databases
A transaction in databases is a sequence of SQL operations executed as a single unit, ensuring data integrity through ACID properties: Atomicity, Consistency, Isolation, and Durability. The transaction lifecycle includes starting, executing operations, committing changes, or rolling back in case of failures. Transactions are crucial for maintaining data integrity, enabling error recovery, and managing concurrent access in databases.
Aug 6, 2024
SQL
Database
Transactions
Common Web Servers
Common web servers include Nginx, known for high performance and scalability, and Apache HTTP Server, recognized for its customization and extensive community support. Key differences include Nginx's centralized configuration and lack of .htaccess support, while Apache allows distributed configuration through .htaccess files. Other notable servers are LiteSpeed, IIS, and OpenResty, each with unique features catering to different needs. When selecting a web server, consider performance, configuration ease, and available features.
Aug 6, 2024
Nginx
Apache HTTP Server
Database
Backend
Comparing MySQL, MariaDB, and PostgreSQL: Which Database is Right for You?
Aug 6, 2024
MySQL
PostgreSQL
Database
RDBMS
ORDBMS
SQLite
SQL
OQL
Exploring Common Types of Databases
The document explores various types of databases, including relational, NoSQL, cloud, object-oriented, hierarchical, key-value, and wide column databases, highlighting their characteristics, examples, and use cases. It emphasizes the importance of selecting the right database based on data type, scalability, and query complexity, with relational databases suited for structured data and NoSQL databases offering flexibility for unstructured data.
Aug 6, 2024
Database
SQL
NoSQL
JavaScript Equality Operations Variations
JavaScript offers three equality comparison methods:
==
(loose equality), which performs type coercion; ===
(strict equality), which does not allow type conversion; and Object.is()
, which handles special cases like NaN
and +0
/-0. It is recommended to use
===for most comparisons to avoid confusion, while
()` is useful for specific scenarios involving special values.Aug 1, 2024
JavaScript
Web Dev
Software Development
Understanding Function Declarations, Expressions, and Arrow Functions in JavaScript
JavaScript provides various ways to define functions: function declarations, function expressions, and arrow functions. Function declarations are hoisted and can be called before their definition, while function expressions are not hoisted and can be anonymous. Arrow functions offer a concise syntax and lexically bind
this
, making them particularly useful in modern frameworks like React. Understanding these differences enhances the ability to write effective JavaScript code.Aug 1, 2024
JavaScript
Web Dev
Software Development
Comparing Top Backend Frameworks and Languages in 2024
This compares popular backend frameworks and languages in 2024, highlighting Node.js (Express), Python (Django and FastAPI), Java (Spring), C# (.NET), Go (Gin), Rust (Rocket), and Ruby (Rails). Each framework is assessed based on its pros, cons, and best use cases. Key considerations for choosing a framework include project requirements, team expertise, ecosystem support, performance, scalability, security, and integration capabilities.
Aug 1, 2024
Node.js
Python
Web Development
mAP Metrics
Aug 1, 2024
Running CPU-intensive jobs in Electron.js
Jul 26, 2024
Running CPU-intensive jobs in Node.js
To run CPU-intensive jobs in Node.js, follow best practices such as using worker threads or child processes for parallel execution, utilizing the cluster module for load distribution, optimizing algorithms, employing asynchronous programming, considering external services for heavy computations, profiling and monitoring performance, implementing caching, scaling horizontally, and using native addons for performance-critical tasks. These practices can significantly improve the performance of CPU-intensive tasks in Node.js applications.
Jul 26, 2024
Node.js
Web Dev
Software Development
Kotlin: The Modern Programming Language for Android and Beyond
Kotlin is a modern programming language developed by JetBrains, known for its concise syntax, interoperability with Java, and robust features. It gained popularity among Android developers and is widely used for Android app development. Kotlin also has use cases in server-side development and cross-platform development. It offers features like null safety, coroutines for asynchronous programming, and supports modern programming paradigms. Kotlin has a vibrant community and provides various learning resources and development tools for developers to get started.
Jul 25, 2024
Kotlin
Android Development
Server-Side Development
Exploring the Go Programming Language (GoLang)
Go, also known as Golang, is a statically typed, compiled programming language designed by Google. It has gained popularity for its simplicity, efficiency, and concurrency features. Go is used in web development, microservices, cloud computing, and systems programming. To learn and master Go, there are several recommended blogs and tutorials available. Creating a blog using Go can be a great way to practice and showcase Go skills. Go offers the performance and simplicity needed to build robust solutions in various fields.
Jul 25, 2024
Go
Golang
Programming Language
Web Development
Microservices
Cloud Computing
Systems Programming
Concurrency
Simplicity
Error Handling
Cloud Compatibility
Blogs
Tutorials
Learning
Building a Blog
Modern Web Communication Protocols: gRPC, WebRTC, WebSocket, and HTTP
This post explores four popular web communication protocols - gRPC, WebRTC, WebSocket, and HTTP - comparing their strengths, weaknesses, and ideal use cases. HTTP is widely supported and works well with RESTful APIs but is not ideal for real-time communication. WebSocket allows for real-time, bidirectional communication and is suitable for chat applications and live updates. gRPC is efficient for frequent, small data transfers and is best for microservices architectures. WebRTC enables direct peer-to-peer communication and is ideal for video conferencing and file sharing. The appropriate protocol depends on the specific use case, and a combination of protocols may be used in modern applications to address different requirements.
Jul 25, 2024
Web Development
Microservices
Real-time Communication
Decentralization - Propagation Delay and Honest Players
In a peer-to-peer network, there is no propagation delay between honest players, ensuring that information is shared simultaneously. Honest players have advantages such as less information and more mining power. Blocks arrive in time and form a chain, and confirmation occurs when a block is part of the longest chain. Violation of confirmation can occur when a longer chain is formed. The probability of violation depends on the mining power of the honest player and the adversary. Safety mechanisms in cryptocurrency systems prevent attacks, including the adversary's dilemma, the race to create a block, and the high cost of attacking the system. The validation process and private mind concept further enhance security. Reinforcement learning is used to make decisions, and the system is designed to prevent the adversary from benefiting from a successful attack. The state and action in a blockchain system are defined, and the problem can be solved using machine learning and optimization techniques. The key concepts include state, action, reward, reset, formulation, and notation. In a private blockchain, preventing the loss of state is crucial, and the problem can be solved by focusing on the honest chain and the private money attack chain. The card analogy helps understand simulating the blockchain and keeping the state.
Jul 25, 2024
Understanding the Gossip Flooding Protocol in Distributed Systems
Jul 25, 2024
Mastering Asynchronous Programming in Python with async/await
Jul 25, 2024
Python Web Servers: Django vs Flask vs Tornado
When considering Python web development, Django, Flask, and Tornado are popular frameworks with unique strengths. Django is a full-stack framework suitable for larger applications, Flask is a lightweight and flexible microframework ideal for smaller projects, and Tornado excels in handling high concurrency and real-time applications. Understanding their features and use cases will help developers make informed decisions based on project requirements and personal preferences.
Jul 25, 2024
Python
Web Development
Django
Flask
Tornado
How Web Browsers Work: A Deep Dive into the Internet's Gateway
Jul 25, 2024
Web Development
Browser Engines
JavaScript Engines
WebSockets: Revolutionizing Real-Time Web Communication
WebSockets have transformed web communication by enabling real-time, bidirectional data exchange between clients and servers. They provide instant updates, reduced latency, efficient resource usage, cross-platform compatibility, and bi-directional communication. Use cases include chat applications, live updates, collaborative tools, games, trading platforms, and IoT communication. Implementing WebSockets can be simplified with libraries like , and they differ from traditional sockets in their persistent connection and full-duplex communication. Considerations include scalability, firewall issues, and fallback mechanisms. WebSockets have revolutionized real-time web communication and will continue to shape the future of real-time applications.
Jul 25, 2024
Browserโs Access to the Client's Filesystem
Jul 24, 2024
File I/O Buffer and Flush()
Jul 24, 2024
Node.js Shared Memory Limitations: The Inter-Process Communication Challenge
Node.js's implementation of shared memory is limited when it comes to inter-process communication with unrelated processes, especially those written in other languages. This limitation requires developers to explore alternative IPC methods and can lead to increased complexity and performance considerations. Workarounds include using memory-mapped files, external IPC mechanisms, native addons, or third-party libraries. Developers must be versatile in their approach to inter-process communication in complex, multi-language environments.
Jul 23, 2024
Main, Preload and Renderer in Electron and IPC
Jul 10, 2024
JavaScript
Web Dev
Desktop Development
Cross-Platform
TypeScript Declaration File (
.d.ts
)Jul 9, 2024
Windows Desktop Development
For Windows desktop development, the recommended options are .NET Core (and its successors .NET 5+, or 6 and 7) and Core for new projects, while the .NET Framework is still relevant for maintaining existing Windows-based applications. The Windows App SDK introduced in Windows 11 provides a modern SDK supporting different OS versions of Windows, combining good parts from UWP and Win32 APIs. The document provides an overview of each option, including their release and maturity, platform compatibility, use cases, performance, deployment options, and future direction.
Jul 8, 2024
Windows Desktop Development
.NET Framework
.NET Core
ASP.NET
WinRT
Win32
Windows App SDK
Windows SDK
Universal Windows Platform
MSIX Packaging
C/C++ Addons for Node.js
Jul 5, 2024
Mamba
May 8, 2024
Understanding Progressive Web Apps
Progressive Web Apps (PWAs) combine the best features of web and mobile apps, offering a seamless user experience directly from the web browser. They provide functionalities like offline access, push notifications, and device hardware access. PWAs are designed to be progressive, responsive, connectivity independent, app-like, fresh, safe, discoverable, re-engageable, installable, and linkable. They utilize service workers and a web app manifest for key functionalities. PWAs are cost-effective for businesses and provide a faster and more efficient experience for users. They are changing the digital landscape by improving engagement and conversion rates. The future of PWAs includes integration with AI and IoT, as well as advancements in offline capabilities.
May 7, 2024
Web Dev
Software Development
Mobile App
About User Interviews
User interviews are a fundamental part of creating user-centered designs. They provide invaluable insights into the needs, motivations, and behaviors of your target audience. User interviews are conducted early in the design process to gather qualitative insights, while user testing is done later to evaluate usability. Preparation, execution, and analysis are key steps in conducting user interviews. A user interview guide ensures consistency, provides structure, aids in preparation, and assists in active listening. Crafting a guide involves defining objectives, identifying main questions, preparing follow-up prompts, planning the interview flow, and testing the guide. During the interview, maintain an open and friendly conversation flow, practice active listening, remain neutral, and respect privacy. Afterward, analyze the collected data, use it to inform design changes, and document the process and findings.
May 6, 2024
User Interviews
User Testing
User Interview Guide
User Interview Survey for Savor App
This user interview guide is designed to gather insights on grocery shopping and cooking behaviors to inform the development of a web app aimed at reducing food waste and simplifying meal planning. The guide covers topics such as cooking frequency, grocery shopping habits, inventory management, decision-making in cooking, and experiences with existing apps or tools. The collected feedback will be used to enhance the app development, and participants may have the opportunity for a follow-up session to provide further input.
May 5, 2024
User Interview
Startups
Agile Development
Design Thinking
CSS Variables
CSS Variables, also known as custom properties, are entities defined by CSS authors to contain specific values that can be reused throughout a document. They are declared using custom property notation and can be used with the
var()
function. CSS Variables offer advantages such as reusability, maintainability, and dynamic control. They follow the rules of cascading and inheritance and are particularly useful for defining global values in stylesheets. They are an essential tool for front-end developers and provide a flexible way to manage and manipulate CSS.May 3, 2024
Padding in base64/65
Base64 encoding uses the "=" character as padding to ensure the encoded data's length is divisible by 4. This is necessary because each 3 bytes of data are converted into 4 Base64 characters. The padding characters act as placeholders and do not encode actual data.
May 1, 2024
Base64
Encoding
Padding