Hey friends, I find that it is easy to get trapped in conformity biases with certain principles and opinions. I think it helps inverting these long standing principles on their heads and come to your own conclusions. Here are a few common software engineering principles and contrarian views on them.
- Common View: Develop software in small, manageable increments, delivering features iteratively and receiving feedback from stakeholders.
- Contrarian View: Incremental development can result in a fragmented architecture and may not be suitable for projects that require significant upfront planning, such as safety-critical systems, space ships.
Separation of concerns
- Common View: Divide a program into distinct sections that handle specific aspects of functionality, making it easier to manage complexity and maintain the codebase.
- Contrarian View: Separation of concerns can lead to excessive abstraction and make it difficult to understand the relationships between components, potentially hindering performance optimisation.
- Common View: Design software to fail quickly when errors occur, making it easier to identify and correct issues during development.
- Contrarian View: In certain applications, such as real-time remote embedded systems or safety-critical systems, a fail-fast approach may not be appropriate, as it could cause unnecessary disruptions or even catastrophic consequences.
- Common View: Maintain thorough and up-to-date documentation to provide a clear understanding of the system's architecture, functionality, and usage.
- Contrarian View: Excessive documentation can become a burden to maintain and may quickly become outdated, leading to confusion and misunderstandings among developers.
- Common View: Regularly review code changes by peers to catch errors, ensure code quality, and share knowledge within the team.
- Contrarian View: Code reviews can be time-consuming and may not always result in substantial improvements, especially if the review process is not structured or the reviewers lack the necessary expertise.
- Common View: Embrace agile development practices such as Scrum or Kanban, which emphasise adaptability, collaboration, and iterative progress.
- Contrarian View: Agile methodologies may not work well in all situations, such as projects with strict requirements or regulatory constraints, and can lead to scope creep and insufficient planning.
Favour composition over inheritance
- Common View: Use composition instead of inheritance to build complex systems, as it offers greater flexibility and reduces the risk of creating rigid class hierarchies.
- Contrarian View: Inheritance can be a powerful tool for code reuse and abstraction, and, when used appropriately, can lead to cleaner, more understandable code. When used appropriately.
It's important to remember that the appropriateness of a principle often depends on the specific context and goals of a project. Balancing different principles and understanding their trade-offs is a critical aspect of software engineering.