Skip to content

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Fundamentals

27 min read

TCP Explained in 28 Diagrams: Handshakes, Congestion Control & Reliable Transmission

This article uses 28 diagrams to comprehensively explain TCP, covering network layering, TCP header structure, byte-stream orientation, reliable transmission mechanisms (sliding window, ARQ, acknowledgments), congestion control algorithms (slow start, congestion avoidance, fast retransmit/recovery), three-way handshake and four-way termination, UDP comparison, and practical issues like packet fragmentation, sticky packets, and SYN flood attacks.

8 min read

Why Do URLs Start with www? The Hidden History of a Web Convention

This article explains that www is merely a subdomain convention from the early internet, not a required URL component, detailing how multi-service hosting and technical limitations made it standard, and why modern advances in DNS, HTTPS, and CDNs have led to its decline in favor of naked domains like google.com.

45 min read

OS Interview Mastery: 7 Core Concepts from Processes to Zero-Copy with Diagrams & Java Practice

This comprehensive guide covers seven high-frequency OS interview topics — processes vs threads, IPC mechanisms, thread synchronization, deadlock conditions, virtual memory paging, CPU scheduling algorithms, and zero-copy techniques — with visual diagrams, comparison tables, Java code examples, and production pitfalls to move beyond rote memorization.

25 min read

Inside read(): How Data Moves from Disk to Memory via Kernel & DMA

This article dissects the Linux read() system call, revealing how user-space applications, the kernel, and hardware controllers collaborate via DMA to move data from disk into memory, covering parameters, return values, blocking modes, file-type differences, and the copy_to_user overhead versus mmap zero-copy.

53 min read

Master Computer Network Interviews: 7 Core Modules, 20+ Diagrams, Java-Practical Deep Dive

This comprehensive guide covers seven core computer network modules — OSI/TCP-IP models, TCP handshakes, flow/congestion control, TCP vs UDP, HTTP evolution to HTTP/3 and QUIC, HTTPS encryption, and WebSocket — with 20+ diagrams, state machines, Java code examples, and interview-focused explanations for top tech companies.

8 min read

PHP Traits: The Underrated Metaprogramming Tool with Untapped Potential

The article argues that PHP Traits are an underestimated metaprogramming feature offering low cognitive overhead, but their potential is limited by weak composition contracts; it proposes bidirectional contracts allowing traits to require interfaces and implement interfaces, turning traits into predictable compile-time class transformations.

6 min read

Try-Catch Inside vs Outside For Loops: Behavior, Performance & When to Use Each

This article explains the critical behavioral difference when placing try-catch inside versus outside a for loop: outside placement terminates the loop on exception, while inside allows continuation. It also analyzes performance implications, showing negligible overhead when no exceptions occur but increased memory consumption if many iterations throw exceptions, and details the JVM exception table mechanics that underlie this behavior.

7 min read

Java final Visibility: JMM Freeze, This Escape, and Lock-Free Guarantees

This article explains how Java's final keyword ensures cross-thread visibility of final fields through the JMM's freeze action at constructor end, provided the this reference does not escape during construction, demonstrating with a code example that shows a race condition when this escapes and the correct behavior when final fields are properly frozen.

12 min read

Why Modeling Needs Category Theory: Turning 'Is This Model Right?' into Commutative Diagrams

This article explains how category theory addresses three core modeling challenges—verifying correctness, composing models, and maintaining consistency across abstraction layers—by using commutative diagrams to define model validity, functors to preserve structure across representations, and pullbacks to enforce interface compatibility, with examples from numerical analysis, unit conversion, and fluid-structure coupling.

10 min read

How Chinese Characters Are Stored in Computers: Unicode & UTF-8 Deep Dive

This article explains how computers store Chinese characters using Unicode and UTF-8, covering the history of encoding chaos, Unicode code points, UTF-8 variable-length encoding rules, a step-by-step example of encoding '中', common mojibake causes, BOM, and programming best practices like using utf8mb4 in MySQL.

17 min read

Atomic Commits: 3 Traits & 4 Defenses Against AI Code Entropy

The article argues that AI-generated code accelerates entropy in codebases, advocating independent atomic commits—single-purpose, indivisible, independently applicable—as a critical practice, detailing four defenses: logical isolation, auditability, reduced collaboration entropy, and preventing code rot, with implementation via CI/CD, IDE tooling, and cultural metrics.

7 min read

Python Numeric Types Explained: Integers, Floats, Fractions & Py2 vs Py3 Division Differences

This tutorial covers Python's built-in numeric types including integers, floats, complex numbers, booleans, and fractions, with detailed examples of division behavior differences between Python 2 and 3, floor division, modulo operations, and the fractions module for precise rational arithmetic.

12 min read

INSLIB: Aviation-Grade Inertial Navigation Library with DO-178C Discipline in C

INSLIB is an open-source C library for inertial navigation that implements aviation-grade engineering practices including MC/DC testing, requirements traceability, and numerically stable UDU square-root Kalman filtering, designed for bare-metal embedded systems with multi-sensor fusion support.