Navigate / search

How To Write Unmaintainable Code

  • Use “asd” or a,b,c as variable names.
  • Use acronyms.
  • Use an alternate vocabulary to refer to the same action, e.g. display, show, present.
  • Randomly capitalize a letter in the middle of a word (e.g. ComputeRasterHistoGram()).
  • Use Åccented characters (e.g. typedef struct { int i;  ínt;} where the second ínt’s í is actually i-acute.
  • Use foreign language dictionaries as a source for variable names.
  • Choose variable names with irrelevant emotional connotation (e.g.: marypoppins = (superman + starship) / god;). #nosense!!
  • Use lower case L to indicate long constants. e.g. 10l mistaken for 101.
  • Consider variant spellings as a variant on the ploy, e.g. mixing International colour, with American color and dude-speak kulerz. If you spell out names in full, there is only one possible way to spell each name.
  • Use misleading names for methods (e.g. a method named isValid(x) should as a side effect convert x to binary and store the result in a database).
I love this article.. #soevil xD