On Meaningful Indentation

A letter from The Technical Architect to a team lead amidst a formatting debate

Dear Rising Team Lead,

Your message about the growing tension within your team over the seemingly trivial matter of tabs versus spaces has been on my mind. What appears at first glance to be merely a formatting preference has clearly evolved into something that threatens team cohesion.

You're right to be concerned, not because the specific choice matters above all else, but because these debates often reflect deeper values that go unacknowledged. Let me share some perspective that might transform this point of contention into an opportunity for alignment around principles rather than preferences.

Tabs represent structure. Spaces represent rendering. One encodes intent; the other imposes a visual artifact. A tab character represents a concept—one level of indentation—while remaining agnostic about its visual presentation. This separation of semantics from presentation embodies a principle we aspire to in many aspects of software design: the separation of concerns. When we use spaces, we conflate two distinct concepts: the logical structure of nested code and its visual representation. Four spaces do not inherently represent an indentation level—they represent four spaces. The relationship between those spaces and the concept of indentation exists solely in convention.

Beyond this philosophical distinction lies a more compelling argument: respect for individual choice and accessibility. When a developer with visual impairments configures their editor to render tabs as 8-space-width indentations for better readability, they don't alter the underlying code. Similarly, a developer who prefers narrower indentation can set tabs to render as 2 spaces without changing the codebase that others interact with.

This adaptability represents a core principle of accessible design: the same content can be rendered differently based on user needs without changing its structure or meaning. Using tabs acknowledges that different developers have different needs, and builds accessibility directly into code formatting.

The imposition of spaces, by contrast, removes this choice entirely. It dictates not just that code should be indented, but precisely how that indentation must appear to everyone. There's an underlying disrespect in this approach—a subtle suggestion that personal preferences and accessibility needs must yield to a single enforced standard. It suggests that visual conformity matters more than individual experience.

The argument for spaces is rarely technical. It's emotional—consistency fetishized as discipline. But true discipline is aligning on semantics, not styling. Formatters can enforce structure; only humans can enforce meaning.

A system that requires everyone to see the world the same way is brittle. Use tabs. Let developers choose how to see. Let the machines interpret structure from intent—not from surface conformity.

In a profession where we increasingly advocate for accessibility in the systems we build for users, perhaps we might apply similar principles to the environments we create for ourselves and our colleagues.

Consider also the team dynamics at play. In environments using spaces, teams must standardize on a specific number—2 spaces, 4 spaces—and everyone must configure their editors accordingly. With tabs, the team standardizes on the concept of indentation while giving each member the freedom to visualize that concept according to their needs and preferences.

This balance between standardization and personalization mirrors what we seek in many aspects of engineering leadership: clear standards with room for individual expression, consistent practices that respect diverse needs.

At its heart, the choice between tabs and spaces reflects different values regarding autonomy and uniformity. Choosing tabs demonstrates respect for individual agency—it acknowledges that while we must agree on structure, we need not enforce identical presentation. It suggests trusting each team member to configure their environment in the way that works best for them. This respect for choice creates an environment that accommodates different needs without compromising consistency where it truly matters.

I still remember my own journey on this topic. Early in my career, I advocated for spaces, believing that visual consistency was paramount. It wasn't until I worked alongside a brilliant developer whose visual processing differences made standard 2-space indentation nearly unreadable. Tabs would have given her the autonomy to configure her environment for clarity without affecting the codebase. We failed her.

Watching her struggle with an enforced 2-space indentation that was nearly invisible to her, while knowing a simple editor configuration could have solved the problem had we used tabs, was humbling. It made me question how many other preferences I held that unknowingly created barriers for others.

The choice to use tabs represents more than a formatting preference. It embodies a commitment to semantic clarity by representing concepts rather than visual spacing; to accessibility by accommodating needs without changing the underlying code; to using the most appropriate tool for the job; and to allowing genuine flexibility within clear standards. For accessibility, developer autonomy, and clarity of abstraction, you use tabs.

When your team meets next week to resolve this debate, perhaps consider framing the conversation around principles rather than preferences. Ask not what your team prefers, instead, declare which principles you are willing to enshrine in your engineering culture. Explain how this choice reflects those principles.

Of course, team cohesion and productivity remain important. Whatever decision you reach should be enforced consistently across your codebase by using tooling—linters, formatters, and editor configurations—so that the debate, once settled, doesn't recur with each contribution.

Whether to use tabs or spaces may seem inconsequential. But the way your team resolves it signals what kind of engineering culture you're building.

I would be interested to hear how your team navigates this challenge. Sometimes these seemingly trivial technical debates provide the richest opportunities for aligning around deeper values.

With respect and confidence in your journey,

The Technical Architect

Last updated: Sat Aug 16, 2025, 16:19:43