Writing articles, tweets, documentation—you always need to count words. Many word counters exist, but when mixing Chinese and English, the results …
Posts for: #Javascript
From Handshake to Heartbeat: Building a WebSocket Online Testing Tool
Recently, I was developing a real-time chat feature with WebSocket on the backend. Debugging was painful—browser DevTools’ Network panel shows WebS…
Unit Converter: From Floating-Point Precision to Temperature Offsets
I recently needed to convert between inches and centimeters for a project. Wrote a quick formula, but the result didn’t match the design specs—that…
JavaScript Timezone Conversion: From Unix Timestamps to IANA Identifiers
Recently built a cross-timezone meeting scheduler and stepped into quite a few timezone pitfalls. Let me share what I learned about JavaScript time…
Text Deduplication Algorithms: From Set to Efficient Implementation
Duplicate data is everywhere. Log analysis, user list cleaning, keyword extraction… the scenarios are endless. Let’s dive into several deduplicat…
From String Concatenation to Parameterized Queries: Building a Safe SQL Builder
During a recent code review, I found this pattern scattered throughout the codebase:
Set Operations in JavaScript: From Math Symbols to Code
I used to write nested loops when comparing two lists—finding common items, merging with deduplication, calculating differences. The code was messy…
Building a Regex Tester: Real-time Highlighting and Performance Optimization
I was working on form validation recently, dealing with various regular expressions. Testing each regex change required a page refresh - too tediou…
Understanding Radix Conversion: From Binary to Hexadecimal Algorithms
While building a radix converter tool, I revisited the fundamentals of number base conversion. Although parseInt and toString handle most cases…
Building a Placeholder Image Generator with Canvas API: From Basics to Performance
As a frontend developer, I often need placeholder images: design assets aren’t ready, images are missing, or I’m building a quick prototype. I used…