When Software Accepts the Wrong Question

Dhruv

Hatched by Dhruv

Aug 10, 2026

10 min read

88%

0

What do a database query and a hypothesis test have in common? Both can produce a perfectly valid result while quietly answering the wrong question.

A line of application code may execute without error even though it filters on a field that does not belong to the intended data model. A statistical procedure may return a familiar p value even though the analyst cannot explain what assumptions made that number meaningful. In both cases, the danger is not failure. It is successful operation without understanding.

This is a general problem in technical work. Tools are designed to make action easy, but understanding is built from constraints, definitions, and derivations. The more a tool hides, the more responsibility moves from the machine to the person using it.

The important question is not whether a system is strict or permissive, automatic or manual. The important question is: which assumptions are being enforced by the tool, and which are being left for us to notice?

The seductive safety of code that runs

Imagine a MongoDB collection containing customer records. Your application expects every customer to have a field called status, with values such as active or inactive. A developer writes a query for active customers, but accidentally types stauts instead of status.

If the data access layer rejects unknown query properties, the mistake is exposed early. The code fails loudly, perhaps during testing or immediately in development. If the layer allows properties outside the declared schema, the query may still be accepted. It may return no records, or it may behave in an unexpected way depending on the database and query structure. The application remains operational, but its meaning has degraded.

This is what permissiveness changes. It does not merely change a technical setting. It changes where errors are allowed to survive.

A schema is often described as a description of data, but it is also a theory of what the program is allowed to ask about. When a query layer is strict, the schema acts as a gatekeeper for language. It says, in effect, “These are the concepts this application recognizes.” When strictness is relaxed, the application gains flexibility, but the database becomes less able to distinguish a deliberate experiment from a spelling mistake.

That flexibility can be useful. Schemas evolve. Legacy data may contain fields that have not yet been modeled. A migration may need to inspect properties that the application does not normally expose. A reporting tool may intentionally work across a more varied document structure.

But flexibility has a cost that is easy to miss: the absence of an error is no longer evidence that the request was conceptually valid.

This distinction matters far beyond databases. A compiler catches some classes of mistake. A type checker catches others. A schema validates some assumptions. A test suite checks still more. Every guardrail removes a category of uncertainty from the human operator. Remove a guardrail, and the uncertainty does not disappear. It returns as a demand for judgment.

A permissive tool does not eliminate constraints. It relocates them from the machine to the mind.

The same mistake in statistics

Statistics has its own version of the unknown field. Someone can learn how to run a hypothesis test, enter numbers into software, and report a result without understanding what the result means.

The procedure may be syntactically correct. The sample may be loaded correctly. The test may calculate exactly what it was programmed to calculate. Yet the analyst may not know why a null hypothesis is formulated in a particular way, what a sampling distribution represents, or why the assumptions behind a theorem matter.

This is not an argument against practical instruction. Recipes are valuable. People need to learn how to perform basic techniques before they can become fluent in the underlying mathematics. The danger appears when operational familiarity is mistaken for conceptual knowledge.

Consider a simple example. A researcher compares two groups and obtains a p value of 0.03. If the researcher knows only the recipe, the conclusion may be, “The result is statistically significant.” If the researcher understands the structure of the test, the question becomes more precise: significant relative to what null model, under which assumptions, with what sampling process, and for what decision?

The calculation is not the meaning. It is an instrument for deriving meaning under specified conditions.

A null hypothesis is not simply a statement that nothing is happening. It is a model of what observations would look like if a particular claim were treated as the reference condition. The test compares the observed result to the distribution of results expected under that condition. Without understanding that logic, the analyst may treat the p value as a measure of the probability that the null hypothesis is true, which it is not.

The software has not necessarily done anything wrong. It has answered a narrower question than the user may believe they asked.

This is structurally identical to querying an unrecognized field. In the database case, the system processes a property whose place in the data model is uncertain. In the statistics case, the system processes a numerical procedure whose place in the reasoning model is uncertain. Both workflows can be technically valid while semantically unstable.

Syntax is not semantics

The deepest connection between these examples is the difference between syntactic validity and semantic validity.

Syntactic validity asks whether an expression is formed correctly. Does the query have valid structure? Does the function receive the right kinds of arguments? Does the statistical software accept the dataset?

Semantic validity asks whether the expression means what we think it means. Does the field represent the concept we intend to filter? Does the test address the research question? Are the observations independent in the way the model requires? Is the chosen statistic appropriate for the measurement process?

A system can often verify syntax automatically. Semantics are harder because they depend on context, purpose, and the connection between a representation and reality.

This yields a practical four layer model for technical reasoning:

  1. Syntax: Is the instruction valid according to the tool?
  2. Structure: Does the instruction correspond to the declared model, schema, or theorem?
  3. Semantics: Does the model represent the real thing being investigated?
  4. Consequences: What decisions will be made if the result is trusted?

Many professional mistakes occur because people stop at the first layer. The query runs. The chart renders. The test returns a number. The pipeline completes. Completion is then treated as confirmation.

Strict schemas help with the second layer. Mathematical understanding helps with the third. Neither is sufficient by itself. A perfectly modeled database can still encode the wrong business concept. A correctly derived statistical method can still be applied to biased data. But each form of rigor prevents a different kind of confusion.

The useful question is therefore not, “Should I use strict settings?” or “Should I learn the mathematics?” It is, “What kind of mistake am I currently most likely to make, and which constraint would expose it?”

The assumption budget

A helpful way to think about tools is through an assumption budget. Every convenience feature allows you to proceed without explicitly stating or checking something. That saves time, but it also spends part of your budget of unexamined assumptions.

An automatic query cast may assume that a string should become an identifier. A permissive query mode may assume that an unknown field is worth passing through. A statistical library may assume that the data meet the conditions of a test. A tutorial may assume that the user will later study the theory.

None of these assumptions is automatically bad. The problem is invisible accumulation. One unexamined assumption is usually harmless. Ten interacting assumptions can produce a confident, polished, and false conclusion.

Suppose a product team wants to know whether a new onboarding flow improves retention. They collect data from users who chose to try the new flow, compare them with older users, and run a familiar test. The code is clean. The result is statistically significant. But the comparison may be confounded by time, user mix, marketing changes, or differences in motivation.

Now imagine a second problem: the retention query filters on a field whose name was changed during a migration. Because unknown query properties are allowed, the application does not fail. The analysis proceeds on an incomplete population. The statistical method may be perfectly implemented, yet the result is built on a damaged query.

This is why technical rigor cannot be confined to one layer of a workflow. Data retrieval and statistical inference are not separate worlds. A silent query error becomes a statistical assumption. A misunderstood variable becomes a modeling error. A permissive interface can transform a programming typo into an apparently objective empirical finding.

The assumption budget gives teams a way to manage this risk. Spend flexibility where it creates real value, but compensate with explicit checks elsewhere. If the database layer is permissive during a migration, add query tests, field audits, and record count checks. If a statistical method is used as a practical recipe, require a plain language statement of the null model, sampling process, and interpretation before accepting the result.

The goal is not maximal strictness. It is visible strictness at the points where mistakes would be expensive.

Learning by derivation, working by inspection

There is a common false choice between theory and practice. Theory is portrayed as slow and abstract, while tools are portrayed as efficient and concrete. In reality, the strongest practitioners use each to repair the weaknesses of the other.

Derivation teaches you what must be true for a method to work. Inspection teaches you whether those conditions are present in a particular situation.

You do not need to derive every library function before using it. But you should know how to investigate the functions that matter. If a result will influence a major product decision, search for the underlying theorem, read the assumptions, construct a small example, and see what changes when those assumptions fail.

The same discipline applies to data access. You do not need to memorize every database rule before writing a query. But when a query depends on a field, confirm that the field exists, is populated as expected, has the intended type, and refers to the right concept. Test both positive and negative cases. Deliberately introduce a misspelled property and verify that your safeguards behave as intended.

A useful habit is to ask two questions whenever a tool produces an answer:

  • What did the system verify?
  • What did I silently assume?

For a database query, the system may verify that the request can be parsed and sent. It may not verify that the field is conceptually correct. For a statistical test, the system may verify that the arithmetic is defined. It may not verify that the observations support the model.

This habit turns tutorials into starting points rather than substitutes for understanding. It also turns configuration choices into explicit epistemic decisions. A relaxed setting is no longer “just what the migration requires.” It becomes: “We are permitting unmodeled fields here, so these other checks must carry the burden of detecting mistakes.”

Key Takeaways

  1. Separate execution from meaning. A query that runs and a test that returns a p value are operational successes, not proofs that the intended question was answered.

  2. Locate the guardrails. Know which assumptions are enforced by your framework, which are checked by tests, and which remain your responsibility.

  3. Treat permissiveness as a trade. Allowing unknown fields or skipping conceptual theory may speed up work, but it increases the need for inspection, documentation, and targeted validation.

  4. Write the hidden question down. Before trusting a result, state what population, variable, null model, schema, or business concept it actually concerns.

  5. Use small adversarial tests. Misspell a field, alter an assumption, change the sampling frame, or create an edge case. Good systems should make important misunderstandings visible.

The mature use of technology is not the elimination of human judgment. It is the deliberate placement of judgment where it can do the most good.

A strict database schema and a mathematically grounded statistical education may seem unrelated. One governs fields in documents; the other governs claims about evidence. Yet both express the same principle: reliable knowledge requires boundaries that distinguish a meaningful statement from a merely acceptable one.

The most dangerous errors are not always the ones that crash the program or produce an impossible number. They are the ones that pass through every convenient interface and arrive looking reasonable. Once you recognize that, debugging becomes more than finding broken code, and statistical literacy becomes more than learning formulas. Both become practices of asking what, exactly, has been allowed to count as an answer.

Sources

← Back to Library

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 🐣