Exploration Needs a Docstring

Kai Nguyen

Hatched by Kai Nguyen

Jul 18, 2026

9 min read

87%

0

The strange problem with expertise

Most people think expertise is mainly about accumulating more correct answers. But in practice, expertise has a darker companion: the longer you work in a domain, the more your success depends on not revisiting certain questions. You learn the safe choices, the reliable patterns, the methods that work often enough, and then your own competence starts nudging you toward repetition. The danger is not that you stop learning entirely. The danger is that you become so efficient at what already pays off that your mind quietly begins to defend the familiar.

This is where a revealing tension appears. If you always choose the option with the known payoff, you become dependable. If you always chase novelty, you become erratic. The real problem is not choosing between the two once. It is learning how to manage the ratio over time. A life, a career, and even a codebase all become brittle when everything is treated like a settled problem.

The deeper question is this: how do you preserve the benefits of hard-won certainty without turning certainty into a prison?


Exploit, explore, and the cost of being too good

A useful way to think about this is the old tension between exploit and explore. Exploitation is choosing the option with the known payoff. Exploration is taking a chance on something new that might uncover a bigger payoff, or might reveal that your current assumptions are stale. Nearly every intelligent system faces this tradeoff, from animals foraging for food to teams deciding what to build next.

What makes the tension painful is that exploitation is visibly rewarded. It feels like maturity. It looks like discipline. It is how you ship work, keep promises, and avoid wasting time on frivolous detours. Exploration, by contrast, often looks inefficient in the moment. It can feel like procrastination disguised as curiosity.

Yet the strongest professionals often live by a hidden rule: most of their time goes to safe choices, but not all of it. A rough pattern of two thirds on trusted paths and one third on new possibilities captures something important. Not because the exact ratio is sacred, but because it reminds us that expertise decays when it is never interrupted.

Consider a senior programmer. They know the framework, the conventions, the debugging tricks, the architecture that usually works. That knowledge is valuable, but it can also create tunnel vision. If every project is approached with the same stack, the same abstractions, and the same default patterns, the engineer becomes very productive at producing yesterday’s answers. Exploration might mean trying a different design model, a new testing strategy, or a radically simpler architecture for a problem they would normally over-engineer.

Or take a manager. A manager who has found a reliable way to run meetings may keep repeating it for years. It works, so why change? Because the world around the meeting changes. Team composition shifts. The business changes. The cost of ambiguity changes. Exploration in this context might mean changing the meeting format, asking different questions, or intentionally leaving room for disagreement before converging on action.

The core insight is not that novelty is good. It is that unquestioned efficiency eventually becomes a form of blindness.

The thing you are best at can become the thing you are least able to examine.


Why documentation is really a discipline of exploration

At first glance, documentation seems like the opposite of exploration. It looks like preserving settled knowledge, writing down what is already known, and making things obvious for future readers. But a closer look reveals something more subtle. Good documentation is not merely storage. It is a mechanism for deciding what deserves a stable shape and what should remain flexible, provisional, or self-explanatory.

That is why small conventions matter so much. A one-line explanation is enough for a really obvious case, but only if it truly is obvious. If the case is not obvious, forcing it into a tiny sentence becomes a lie of omission. A summary line followed by a blank line and then a more elaborate description is not just a formatting preference. It is a recognition that meaning often needs layers.

This distinction maps beautifully onto the exploit-explore problem. A one-liner is an exploit move: compress the known into something quick and durable. A fuller docstring is an explore move: it opens up the reasons, constraints, and edge cases that might otherwise be forgotten. The discipline is not to write more for the sake of writing more. The discipline is to match the form of explanation to the uncertainty of the thing being explained.

Even the insistence on triple double quotes carries an understated lesson. It standardizes expression so that attention can go to substance rather than syntax. Standard forms reduce friction, which frees cognitive energy for the real question: what exactly is this thing, and under what conditions is it safe to rely on it?

The same logic appears in well designed APIs, team handbooks, and decision memos. A terse comment can be enough when the invariant is obvious. But where ambiguity is likely, the documentation should not pretend the matter is settled. It should explain the summary, the rationale, and the cases that break the rule.

In that sense, documentation is a way of forcing exploration into a stable record. It turns what a person once understood into something future readers can interrogate. Without that, expertise remains trapped in one head, where it gradually degrades into habit.


The real enemy is premature compression

The deepest link between these ideas is not about writing or learning alone. It is about compression. Human beings are constantly compressing experience into habits, labels, rules, and shortcuts. Compression is necessary. Without it, every decision would require starting from zero. But compression becomes dangerous when it happens too early, before enough exploration has occurred.

A premature shortcut can look like wisdom because it reduces effort. Yet it may actually be a disguised refusal to keep learning. In practice, many failures come from compressing a domain too quickly: a team standardizes a workflow before understanding the exceptions, a developer abstracts a helper before seeing the edge cases, a researcher adopts a theory before exploring the anomalous data.

This is why exploration is not a luxury. It is the tax you pay to avoid false certainty.

One useful mental model is to think of knowledge as having three layers:

  1. Observed cases: specific examples and incidents.
  2. Working rules: the habits and patterns that seem to handle most cases.
  3. Documented principles: the compact statements you trust enough to reuse.

The risk is jumping from layer one to layer three too quickly. That leap produces elegant but fragile understanding. Layer two is often dismissed as messy, but it is where exploration happens. It is where you discover whether a rule is actually general or merely convenient.

A good docstring, in this model, is not the first draft of truth. It is the result of enough exploration that a compact statement can be trusted, plus enough humility to explain its limits. It captures the principle without pretending that the principle exhausts the territory.

Mature knowledge is not just compressed knowledge. It is compressed knowledge that remembers what it left out.


The two-way discipline: keep learning, and keep explaining

If exploration without structure becomes chaos, then structure without exploration becomes stagnation. The most robust practice is a two-way discipline: continue to seek new information, and continue to articulate what you think you know. These are not separate habits. They correct each other.

Exploration asks: What else might be true? What cases have I not seen? What if the successful pattern is only locally valid? Documentation asks: What have I learned well enough to state clearly? What assumptions make this work? What would another person need to know to avoid being misled?

This is why excellent teams often pair experimentation with explicit notes. A prototype without notes becomes a one-off. Notes without experiments become bureaucratic residue. But a cycle of testing, writing, revising, and retesting gradually produces knowledge that is both alive and transmissible.

There is a deeper personal lesson here too. Many people think growth comes from collecting more experiences. But growth often comes from alternating between open curiosity and careful articulation. You try something new, then force yourself to explain what you learned in simple terms. That explanation reveals whether you actually understood it. If you cannot write the summary line, you probably do not yet have the concept.

This is where documentation conventions become more than style. They are a training ground for epistemic honesty. A crisp summary line tests whether you can name the essence. A blank line and longer explanation test whether you can distinguish essence from context. The result is not just cleaner writing. It is cleaner thinking.

If you want to keep your mind flexible, do not only ask, “What should I learn next?” Ask also, “What have I compressed too early?” That question exposes hidden rigidity. It reveals where your certainty is real and where it is merely habitual.


Key Takeaways

  • Treat expertise as a ratio, not a finish line. Keep most of your effort on proven methods, but reserve deliberate space for trying unfamiliar approaches.
  • Use documentation to test understanding. If you cannot write a clear summary line, the idea may not be ready to trust.
  • Avoid premature compression. Do not turn a pattern into a rule until you have seen enough variation to know its limits.
  • Write for the next reader, not your current mood. Good explanations preserve the reasoning that makes a shortcut safe.
  • Schedule exploration on purpose. Novelty should not depend on accident or boredom. Make it part of the process.

What to do differently this week

Start with one area where you are highly competent. It could be a workflow, a code pattern, a meeting format, a writing process, or a decision rule you use all the time. Ask two questions:

  1. What do I do here because it truly works?
  2. What do I do here because I have stopped investigating alternatives?

Then pick one small thing to explore. Change the format of a document. Test a simpler approach. Rewrite an explanation so that the hidden assumptions become visible. Do not aim for disruption. Aim for calibrated curiosity.

If you work with written knowledge, review one docstring, note, or internal document and ask whether it deserves a one-liner or a fuller explanation. If it is obvious, keep it concise. If it is only familiar, expand it. The difference between the two is often where bugs, confusion, and false confidence hide.

The goal is not to become permanently exploratory, nor to worship process. The goal is to stay in contact with reality long enough that your models remain useful.


Conclusion: expertise should remember its own uncertainty

The best thinkers do not merely know a lot. They know when their knowledge is a shortcut, when it is a rule, and when it is just a temporary guess waiting to be revised. That is why exploration and documentation belong together. Exploration keeps your mind from hardening. Documentation keeps your discoveries from evaporating.

In that sense, every concise explanation carries a quiet moral test. It asks whether you have earned the right to compress. And every deliberate experiment asks whether you are still willing to let reality surprise you.

The most dangerous kind of competence is the kind that no longer needs to explain itself. The most valuable kind is the kind that can say, clearly and briefly, what it knows, while still leaving room for what it has not yet learned.

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 🐣