The Advice You Need May Be Executed in the Wrong Order
Hatched by Kai Nguyen
Aug 10, 2026
11 min read
2 views
92%
What if much of the advice you receive is wrong not because it is false, but because it is being executed in the wrong order?
A SQL query offers a useful surprise. It is written in a visually familiar sequence, beginning with SELECT, yet the database does not ordinarily carry it out from top to bottom. It first determines the relevant tables through FROM and JOIN, then filters rows with WHERE, forms groups, filters those groups with HAVING, selects the requested fields, sorts the result, and only then applies LIMIT or OFFSET.
This is more than a technical curiosity. It reveals a general law of reasoning: the order in which an instruction is expressed is often different from the order in which reality can make it true.
That distinction helps explain why broad programming advice so often disappoints. Rules such as “always do this,” “never do that,” or “use the cleanest pattern” treat practices as if they were commands with universal validity. But practices are more like query clauses. Their usefulness depends on what data they receive, what transformation they are meant to produce, and what constraints apply before and after them.
The deeper skill is not memorizing more rules. It is learning to reconstruct the execution order of a problem before deciding what to do.
The visible instruction is not the causal process
Consider a simple query:
SELECT department, COUNT(*)
FROM employees
WHERE active = true
GROUP BY department
HAVING COUNT(*) > 10
ORDER BY COUNT(*) DESC
LIMIT 5;
A beginner may read this as a set of directions arranged from first to last. But the database cannot select department and COUNT(*) before it knows which employees exist. It cannot group rows before filtering them. It cannot ask which departments have more than ten active employees until those groups have been formed. And it cannot sensibly limit the result to five rows before sorting it, unless “five” means five arbitrary rows rather than the five largest groups.
Each clause has a precondition. GROUP BY needs a population of rows. HAVING needs groups. ORDER BY needs a result to order. LIMIT needs an ordered, or at least defined, result set if its output is meant to have meaning.
Advice has the same structure. “Use abstraction” presupposes that the underlying variation is understood. “Avoid abstraction” presupposes that duplication is cheaper than indirection. “Write clean code” presupposes a shared definition of cleanliness and a context in which that definition improves outcomes. “Choose the simplest technology” presupposes that simplicity is being measured against the actual business problem, not against a programmer’s aesthetic preference.
When those preconditions are ignored, advice becomes syntactically plausible but operationally unsound. It looks right on the page while producing the wrong result in practice.
A practice should not be judged by how elegant it sounds in isolation, but by whether it produces the intended result after passing through the conditions of a particular situation.
This is why context matters in a stronger sense than “it depends.” Context is not a polite disclaimer added to the end of an opinion. It is part of the mechanism by which the opinion becomes true or false.
Programming advice fails when it confuses clauses with laws
Many disputes about programming practices are really disputes about missing variables. One person recommends a pattern because it worked in a small team with rapidly changing requirements. Another rejects it because the same pattern created needless complexity in a stable system with a narrow scope. Both may be reporting accurately. Their disagreement comes from treating a local result as a universal rule.
Imagine two teams building internal tools. Team A has three engineers, an uncertain product direction, and direct access to the people using the software. Their biggest risk is spending weeks designing structures for requirements that will soon disappear. A small script with a few repeated lines may be the rational choice.
Team B has fifty engineers, several independently deployed services, strict compliance requirements, and a decade of expected maintenance. Their biggest risk is not repetition. It is inconsistency, hidden coupling, and the inability to change one behavior without breaking six others. The same repeated lines that were harmless for Team A may become an expensive source of divergence for Team B.
“Do not repeat yourself” is therefore not a law. It is a conditional intervention. It becomes useful when the repeated thing represents one concept that must remain consistent, and less useful when the apparent repetition is actually several concepts that only happen to look similar today.
The phrase “clean code” can conceal the same problem. Cleanliness is often treated as a moral property, as if code can be virtuous or dirty independently of its purpose. But code is an instrument. A highly abstract design may be cleaner for extension and harder to debug. A direct implementation may be uglier by stylistic standards and clearer to a new maintainer. A short function may be elegant until it hides a business rule that should have been named.
The word should often signals that means and ends have been fused. “You should use a repository.” “You should avoid comments.” “You should never optimize early.” The sentence sounds decisive because it skips the question that would make it testable: What outcome is this practice meant to improve, under which constraints, and at what cost?
SQL makes this discipline unavoidable. You cannot say that filtering is always good or grouping is always good. You must ask which rows should enter the calculation, which distinctions matter, and where the restriction belongs. A WHERE clause and a HAVING clause can both appear to “filter,” yet moving a condition from one to the other changes the meaning because they operate at different stages.
The same is true of engineering judgment. Advice that sounds similar at the level of vocabulary may operate at a different stage of the problem. “Reduce complexity” might mean simplifying the initial design, reducing the number of moving parts in production, or making future changes safer. Those are not interchangeable goals.
The hidden cost of skipping stages
A useful way to understand bad advice is to treat it as a premature LIMIT clause. It narrows the possible answers before enough of the problem has been examined.
Suppose a team asks, “Which database should we use?” A confident response names a favorite technology immediately. That answer limits the search before the team has specified traffic patterns, consistency requirements, operational expertise, budget, data shape, recovery objectives, and the cost of failure. The recommendation may be excellent in one environment, but the reasoning has skipped the equivalent of FROM and WHERE.
Or suppose a developer asks, “Should this be a class or a function?” The question may actually be about state ownership, testability, lifetime, or coordination between components. Choosing a form immediately is like selecting columns before establishing the rows and relationships that give those columns meaning.
This is not an argument for endless analysis. It is an argument for sequencing the questions.
A practical decision process looks like this:
- Establish the domain. What system, users, constraints, and failure modes are actually involved?
- Filter the relevant facts. Which details materially affect the decision, and which are merely familiar talking points?
- Identify the aggregation. What larger objective are these facts part of: speed, reliability, learning, cost, reversibility, or something else?
- Apply the intervention. Which practice changes the system in a way that serves that objective?
- Evaluate the result. What evidence would show that the practice worked, and what would count against it?
- Limit confidence. How broadly can this conclusion be applied before the context changes?
The sequence prevents a common category error: evaluating a method before defining the result it is supposed to produce.
A team can also use this framework to distinguish two kinds of failure. The first is a wrong method: the chosen practice is poorly suited to the goal. The second is a wrong gradient: the practice is being judged by a signal that rewards the wrong behavior.
For example, a developer may receive praise for adding layers, abstractions, and terminology because the code looks sophisticated in review. If the actual goal is to ship a reliable feature quickly, the local reward is misaligned. The team is climbing a gradient, but not toward the outcome it claims to value.
The reverse can happen too. A simple script may produce an impressive short term result, especially when money, praise, or a successful demo arrives immediately. But if no one tracks maintenance cost, incident frequency, or the time required to change it later, the system offers no gradient toward better long term practice. Success in the present can conceal deterioration in the future.
This is why measurement matters, but measurement alone is not enough. A metric is a clause in the decision process, not the entire query. If it is applied before the goal is clear, it can create the illusion of objectivity while rewarding the wrong thing.
Tacit knowledge is compressed context
Much professional knowledge is difficult to explain because it is not stored as a list of rules. It is stored as an ability to notice which stage of a situation one is in.
An experienced engineer may say, “That abstraction is too early,” or “This is a good place for duplication.” To a beginner, the statement can sound arbitrary. What is missing is not merely a definition. It is a large collection of tacit comparisons: similar systems that became brittle, prototypes that survived because they stayed simple, APIs that changed often, teams that lacked the capacity to maintain a framework, and abstractions that paid for themselves only after the third variation appeared.
The expert is recognizing the execution order of the problem. The novice hears only the final clause.
This explains why slogans transfer badly. A slogan is compressed experience with the decompression instructions removed. “Keep it simple” may encode a warning against premature generalization. “Make illegal states unrepresentable” may encode a need to enforce invariants at a boundary. “Move fast” may encode a strategy for reducing uncertainty. Repeated outside its original setting, each slogan becomes a ritual detached from its purpose.
The remedy is not to reject rules altogether. Rules are useful when they are treated as default hypotheses, not commandments. A default says, “This often works under these conditions.” A command says, “This is correct regardless of conditions.” The first invites investigation. The second discourages it.
When receiving advice, ask for the hidden variables:
- What problem was this practice solving?
- What constraints made it attractive?
- What alternatives were rejected, and why?
- What evidence showed that it worked?
- Where would the recommendation stop applying?
When giving advice, expose the same structure. Instead of saying, “You should use a queue,” say, “If the producer and consumer can operate independently and temporary buffering is acceptable, a queue may reduce coupling. If the operation must be immediately consistent, it may add failure modes without solving the central problem.”
That answer is longer, but it is more portable. It teaches a model rather than demanding imitation.
A better standard: optimize for learning, not agreement
The most dangerous advice environments are those in which every visible signal rewards confidence. Comments that repeat a familiar opinion receive approval. A fashionable practice is treated as evidence of competence. A nuanced answer appears weak beside a simple one. Over time, people learn to optimize for recognition rather than accuracy.
This is confirmation bias turned into a social system. The group does not merely believe what it already believes. It rewards expressions that preserve the belief.
The antidote is to build a stronger gradient toward learning. That means seeking observations capable of changing your mind, not merely arguments that make your current position sound coherent. It means distinguishing a practice’s popularity from its performance. It means recording not only what decision was made, but what assumptions made it reasonable at the time.
A lightweight decision record might include:
- The goal we are optimizing for.
- The constraints that matter most.
- The alternatives considered.
- The main uncertainty.
- The expected signal of success.
- The conditions that would cause us to revisit the decision.
This turns advice into an experiment. The point is not to eliminate judgment, because judgment is unavoidable. The point is to make judgment revisable.
In this framework, humility is not indecision. It is accurate scoping. A measured recommendation can be stronger than a confident one because it tells the reader where the recommendation applies and where it does not.
Good advice does not merely tell you what to do. It helps you see which facts would make that advice sensible, useless, or dangerous.
Key Takeaways
- Separate syntax from execution. The order in which a method is described may not be the order in which its assumptions become valid.
- Ask for the goal before accepting the practice. Replace “What is the right way?” with “What outcome are we trying to improve?”
- Treat rules as conditional hypotheses. Identify the context, constraints, and failure modes under which a recommendation was formed.
- Watch for premature narrowing. A quick choice of tool, pattern, or metric can limit the solution space before the problem is understood.
- Create a better learning gradient. Track expected outcomes and revisit decisions when evidence contradicts the original assumptions.
The mature engineer is not the person who knows the largest number of rules. It is the person who can tell which rule belongs at which stage, and when the stages themselves have changed.
SQL quietly teaches this lesson every time it turns a top to bottom statement into a dependency ordered operation. Advice deserves the same treatment. Before selecting the visible answer, establish the rows of reality. Before grouping facts into a principle, filter out the irrelevant details. Before applying a practice, clarify the result. Before limiting your confidence, check whether the ordering and context still hold.
The question is not simply, “Is this good advice?” It is more demanding and more useful: At what stage, for which goal, under which conditions, and with what evidence would this advice become good?
Sources
Hatch New Ideas with Glasp AI 🐣
Glasp AI allows you to hatch new ideas based on your curated content. Let's curate and create with Glasp AI :)
Start Hatching 🐣