2005-02-07

 

Linear programming, redefined

I'd like to redefine the term 'linear programming'. No, it's not about optimization problems; instead it's about programming style. You know you deal with linear programming when:
  • You see a function that's 6 pages long. It's been programmed linearly, literally. Similar things: a try-catch block of several pages, in C++, that catches everything and prints just "error occured" into log.
  • You see 6 functions that each is pretty long, and the differences between them are a couple of lines.
  • In a big project, you find 10 long functions that are exactly the same, each do exactly the same thing, but are defined in 10 different places/modules.
The other name for it could be 'copy-paste programming', except for the 1st point, where everything is coded linearly.

I tend to find lots of linear programming at work.