The Third Hard Problem
This thought-provoking piece proposes 'tree mapping'—the act of forcing web-like connections into rigid hierarchical structures—as a third fundamental hard problem in computing, joining the ranks of naming things and cache invalidation. It expertly illustrates this pervasive struggle across diverse fields, from file systems to urban planning and biology, resonating deeply with the perennial organizational challenges faced by software engineers. The article's ability to frame a common yet often unarticulated frustration into a universal problem makes it particularly engaging for the Hacker News audience.
The Lowdown
The article 'The Third Hard Problem' introduces 'tree mapping' as a new contender for the canonical list of computing's toughest challenges, alongside Phil Karlton's famous 'naming things and cache invalidation.' The author posits that our innate drive to organize information hierarchically, often via tree structures, inevitably distorts or sacrifices the underlying, more complex 'web' of relationships that truly exists. This fundamental tension, the author argues, is omnipresent and frequently overlooked.
- File Systems: Digital file systems, despite their potential for flexibility, often mimic physical folder structures, forcing choices between organizing by application or type. This leads to issues like fragmented Linux packages versus bundled macOS apps, and the challenges of organizing modern polyglot codebases, prompting tools like Bazel to address web-like project dependencies within a hierarchical file system.
- Writing: The act of writing is described as encoding a complex web of ideas into a linear, hierarchical string of words (chapters, paragraphs, sentences). While fiction can leverage this constraint for narrative effect, abstract topics like mathematics demonstrate the difficulty of choosing a single 'tree' structure for presentation, as the understanding of concepts often depends on their broader interconnections.
- Architecture: Christopher Alexander's 'A City is not a Tree' is cited, distinguishing between 'tree-like' designed cities (like Levittown) that compartmentalize functions, and 'semilattice-like' natural cities (like Siena) where functions and interactions overlap, creating a richer, more integrated urban fabric. The challenge lies in mapping the web of human relationships onto physical space without stifling emergent connections.
- Biology: Traditional morphological biological taxonomy, based on observable traits, often led to misclassifications because useful traits can evolve independently (convergent evolution). Modern cladistics, based on common ancestry and genetics, provides a more accurate, web-preserving classification by prioritizing evolutionary relationships over superficial resemblances, even though horizontal gene transfer still introduces complexities.
In conclusion, the article urges readers to recognize this pervasive 'tree mapping' problem across various domains, from database modeling to object-oriented design and Rust's borrow checker. It advocates for intentionality, prompting us to question whether a hierarchical structure is truly the best fit for the data at hand, and to acknowledge the inherent trade-offs when flattening a web into a tree.
The Gossip
The Ever-Expanding List of Hard Problems
Commenters immediately engaged with the classic 'two hard problems' joke, offering their own additions like 'off-by-one errors' and 'timezones' to the pantheon of programming's most vexing issues. A deeper philosophical thread emerged, suggesting that all these problems, including the newly proposed 'tree mapping,' might distill down to a single core challenge: accurately determining if two things are truly the same or distinct, often relating this to mathematical concepts of isomorphism.