Clarity is to communication what discipline is to action.
Both clarity and discipline can be enforced from the inside out or the outside in.
- Clarity enforced from the outside in looks like things like grammar, programming language syntax, or design patterns.
- Clarity enforced from the inside out looks like things like clear thinking and designing from first-principles.
- Discipline enforced from the outside in looks like things like deadlines, schedules, or rules.
- Discipline enforced from the inside out looks like things like habits, routines, or core values.
In programming, clarity can be imposed by the language or libraries (static typing in languages like Java or conventions in frameworks like Rails are good examples). If it isn’t, it must be imposed by the programmer.
Languages that don’t enforce clarity at the language level (like Python or JavaScript) often seem easier to learn, and become popular as a result. However, because they’re less strict at the language level, they require more structured thinking to use well. This structured thinking is developed over time through experience.
So, you end up with many enthusiastic beginners who love the language, but who write code that’s difficult to maintain. When you have a codebase that’s been developed by many people over a longer period of time, you end up with code that’s difficult to learn (because it doesn’t follow common patterns and conventions very well), more fragile (it behaves in unexpected ways because it’s not well-structured), and more dangerous to change (because it’s difficult to understand). You also have an additional aspect of an incentive to keep the codebase as it is, because the few people that understand it well have job security.