What’s Comparable To? The Essential Question in Software Design

Kent Beck’s article on cohesion sparked a crucial thought: software design discussions often miss a vital element – comparison. He insightfully pointed out the confusion around cohesion and coupling, boiling down to the fundamental question: “Compared to what?” This question resonated deeply, highlighting a recurring issue in software design discourse. Many analyses of software techniques falter because they lack grounding in tangible code, specifically, code extracted from real, functioning applications.

In my series, “Code I Like,” I deliberately share code snippets from our products – widely used Rails applications. These aren’t contrived examples but genuine code in action. While I dislike the term “real-world” in abstract software discussions, here it’s intentional. Actual code is indispensable for meaningful dialogue. A “reality layer” bridges the gap between abstract concepts and their practical implementation. Without this layer, effective discussion becomes impossible.

This “reality layer” manifests in various ways. It might introduce complexities that obscure system understanding and maintainability. Conversely, seemingly localized improvements can inadvertently degrade the system as a whole. Real-world scenarios are rife with exceptions, and accommodating them can dilute the initial elegance of a design concept. Often, the chosen solution isn’t ideal in isolation but emerges as the best compromise when “compared to what?” – the available alternatives within a specific context.

Abstract discussions rightly sidestep these nuances to present concepts clearly. However, code from real applications mercilessly exposes these very trade-offs, context-specific decisions, and necessary compromises. At 37signals, permission to share our code is readily granted, a testament to our belief in open discourse, echoing sentiments shared publicly a decade ago. More companies embracing this transparency would enrich the software design community immensely. More articles should showcase real code from actual applications, making it easier to address the pivotal question: What’s comparable to this in practice?

Sign up to receive future posts via email, or subscribe to the RSS feed.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *