samdeepthink
Author

samdeepthink

Knowledge Planet: Old Dock's Tech Chronicles Zhihu: SamDeepThinking A technical manager who still codes heavily on the front line. From junior developer to tech lead, then tech manager, now leading the whole front‑ and back‑end development team—leveling up along the way. I have some insights on programming, career development, and tech management.

167
Articles
0
Likes
340
Views
0
Comments
Recent Articles

Latest from samdeepthink

100 recent articles max
samdeepthink
samdeepthink
Sep 10, 2026 · Industry Insights

Good Code Doesn't Equal Good Technical Taste: Mastering Contextual Trade-offs

The article argues technical taste differs from coding ability; it's about making appropriate trade-offs for specific project contexts rather than applying best practices blindly, illustrated by examples like over-engineering a small internal tool with microservices or over-designing urgent projects. Good taste comes from extensive project experience and amplifies effectiveness in the AI era.

AI eraSoftware Engineeringover-engineering
0 likes · 3 min read
Good Code Doesn't Equal Good Technical Taste: Mastering Contextual Trade-offs
samdeepthink
samdeepthink
Sep 9, 2026 · Backend Development

Separation of Concerns: Decoupling SDK Details from Business Logic

The article illustrates Separation of Concerns beyond AOP by refactoring a reconciliation service that mixes WeChat Pay and Alipay SDK calls with business logic, introducing a wrapper layer with custom types to isolate SDK-specific parsing from core matching rules, enabling independent evolution of each concern.

Reconciliation ServiceSDK IntegrationSeparation of Concerns
0 likes · 7 min read
Separation of Concerns: Decoupling SDK Details from Business Logic
samdeepthink
samdeepthink
Sep 8, 2026 · Fundamentals

Why If Nesting Beyond 3 Levels Hides Bugs: Flatten with Guard Clauses

The article demonstrates how deep if nesting (over 3 levels) obscures bugs using a payment callback example where error messages are swapped, then refactors with guard clauses to flatten logic; it also addresses loop nesting by extracting methods to reduce cognitive load, emphasizing keeping conditions close to their handling.

bug preventionclean codecode nesting
0 likes · 10 min read
Why If Nesting Beyond 3 Levels Hides Bugs: Flatten with Guard Clauses
samdeepthink
samdeepthink
Sep 7, 2026 · Fundamentals

Boost Readability by Reordering Code Lines — Data-Flow Order Beats Method Extraction

The article shows how interleaving multiple data-flow chains in a method forces readers to context-switch, and demonstrates that simply reordering lines to follow each chain sequentially — without changing logic or extracting methods — dramatically improves readability, while explaining why method extraction can backfire when variables are shared across chains.

clean codecode organizationcode readability
0 likes · 8 min read
Boost Readability by Reordering Code Lines — Data-Flow Order Beats Method Extraction
samdeepthink
samdeepthink
Sep 6, 2026 · Backend Development

Functional Core, Imperative Shell: Refactoring Checkout Code for Testability and Reuse

The article demonstrates refactoring a tangled checkout method by separating pure calculation logic into a functional core using Java 17 records and sealed interfaces, leaving IO operations in an imperative shell, resulting in easily testable, reusable code without mocks or Spring containers.

Functional Core Imperative ShellJava 17Software Architecture
0 likes · 10 min read
Functional Core, Imperative Shell: Refactoring Checkout Code for Testability and Reuse
samdeepthink
samdeepthink
Sep 4, 2026 · Backend Development

HashMap Grouping: From Three Lookups to One computeIfAbsent Call

This article explains how Java 8's computeIfAbsent reduces HashMap grouping from three separate lookups (containsKey, put, get) to a single atomic operation, covering lazy evaluation, concurrency safeguards, null handling, nested grouping patterns, and when to prefer computeIfAbsent over Collectors.groupingBy for streaming data.

HashMapJava 8Map methods
0 likes · 7 min read
HashMap Grouping: From Three Lookups to One computeIfAbsent Call
samdeepthink
samdeepthink
Sep 3, 2026 · R&D Management

AI-Generated Code Quality Control: A Spec-Driven Workflow with Automated Skills

The author shares a 15-step AI-assisted workflow for code quality control, starting with spec-driven development, automated skills for code review, regression checks, test data rehearsal, non-functional requirements validation, mandatory manual review, and optional security/extensibility checks, all orchestrated via AI-written skills and git integration.

AI-assisted developmentGit workflowSpec-Driven Development
0 likes · 6 min read
AI-Generated Code Quality Control: A Spec-Driven Workflow with Automated Skills
samdeepthink
samdeepthink
Sep 2, 2026 · R&D Management

First Step for a New Architect: Join Development and Build Small Modules

The author argues that a newly hired architect should begin by actively coding small components, then medium and large ones, because hands‑on experience reveals system details and consistency challenges that pure business or team briefings cannot provide.

R&D managementSoftware Architecturehands-on development
0 likes · 3 min read
First Step for a New Architect: Join Development and Build Small Modules
samdeepthink
samdeepthink
Sep 1, 2026 · Fundamentals

Why Java Static Blocks Aren’t Executed First

The article explains that Java static blocks are not always the first code to run during class loading because static field initializers and static blocks are executed in the order they appear in the source, and a static field can trigger instance initialization.

Class LoadingJava fundamentalsinstance initializer
0 likes · 6 min read
Why Java Static Blocks Aren’t Executed First
samdeepthink
samdeepthink
Aug 31, 2026 · Fundamentals

Why Java Arrays Have No Constructors and How the JVM Instantiates Them

The article explains that Java arrays, unlike regular objects, lack constructors because the JVM creates them directly via special bytecode instructions, automatically zero‑initialising elements and exposing length as a field, which trades flexibility for simplicity and performance.

BytecodeJVMarrays
0 likes · 6 min read
Why Java Arrays Have No Constructors and How the JVM Instantiates Them