Cultivating Code Taste: Three Timeless Principles from Code Complete & Hackers & Painters
The author reflects on code taste in the AI era, sharing three core principles from 'Code Complete 2' and 'Hackers & Painters': code form should mirror the problem, programmers should think before expressing in a language, and interfaces have both programmatic and semantic parts.
In the AI era, writing code becomes easier but design and code taste grow more important. The author draws on experience judging "Golden Code Award" competitions, where criteria included simplicity, maintainability, testability, security, and performance.
Two books are recommended for developing good code: Code Complete 2 and Clean Code . The author highlights three influential quotes:
"The form of a program should only reflect the problem it solves; any extra form in the code signals that my abstraction of the problem is not deep enough." — Hackers & Painters
"Each interface consists of a programmatic part and a semantic part. The programmatic part consists of the data types and other attributes that can be enforced by the compiler. The semantic part consists of assumptions about how the interface will be used, which cannot be enforced by the compiler." — Code Complete 2
"Programmers who program 'into' a language first decide what thoughts they want to express, and then determine how to express those thoughts using the tools provided by their specific language. Understanding the distinction between programming in a language and programming into one is critical." — Code Complete 2
The author suggests feeding these quotes to an AI (e.g., DeepSeek) for explanation and provides a distilled list of key takeaways:
Program form must directly map the problem essence.
When programming, first think what thoughts to express, then how to express them in the language.
Any code structure unrelated to the problem indicates insufficient abstraction.
Language is a tool for expression, not a constraint; do not let language features limit thinking.
When language expressiveness falls short, use design patterns, conventions, or metaprogramming to "program into" the language.
True design occurs above the language level.
Problem abstraction is language‑independent: understand the core domain, strip implementation details, identify essential concepts and relationships, and build a pure domain model.
The article includes a screenshot of a DeepSeek response (see image below) and the prompt used to generate it:
Prompt: "You are a software technology expert. How do you understand this statement, and can you provide code examples? Programmers who program 'into' a language first decide what thoughts they want to express, and then they determine how to express those thoughts using the tools provided by their specific language. Understanding the distinction between programming in a language and programming into one is critical to understand this book."
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Thought Artisan
I think, therefore I am; recording insights from daily life and technology.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
