Hasty Briefsbeta

Bilingual

How to Write Unmaintainable Code (1999)

5 hours ago
  • #software development
  • #satire
  • #code maintenance
  • The essay provides satirical advice on writing code that is difficult to maintain, aiming to ensure job security by creating confusing and unmanageable software.
  • General principles include making it hard for maintenance programmers to understand the code by hiding the big picture and preventing easy navigation.
  • Specific techniques involve misleading comments, inconsistent naming, deep nesting, overloading methods, and avoiding encapsulation to obscure code functionality.
  • Use of ambiguous or similar variable names, such as swimmer vs. swimner, and reusing variable names for unrelated purposes to confuse readers.
  • Avoiding documentation, using hard-coded values instead of constants, and employing unconventional programming practices to increase code complexity.
  • Encouraging frequent, undocumented updates and changes to keep users confused and dependent on the original developer.
  • Advocating for the use of threads excessively and avoiding interfaces in Java to make the code less modular and more intertwined.
  • The philosophy criticizes language designers for prioritizing elegance over maintainability, suggesting tools and practices that could improve code readability but are often ignored.
  • Contributors to the list are acknowledged, and the essay has been published and presented in various forums, highlighting its popularity among developers.