11 November 2006

Turkish Prison

aka Tower of Babble

Turkish Prison describes an application that is poorly written, but has been made "easier" to maintain by the use of Hungarian notation and "standard" abbreviations. some authors prefer "meaningful" prefixes rather than classes that can isolate functionality. their work creates a prison of horrid code that constrains enhancements and fixes.

symptoms
  • variables have fossilized prefixes that convey no meaning other than type
  • variables are declared far from where they are used, making method extraction more difficult
  • end-line comments attempt to explain the meaning of variables rather than appropriate names
  • the author of the code was unaware that alphabets have "vowels"

No comments:

Post a Comment