by Marius Gheorghe
13. June 2007 18:17
....
Separation of concerns As a employee of a company which
does outsourcing, i get to work with
a lot with bad smelly, rotten code. Things like reinventing the whell (like rewriting a function which already exists in the framework), breaking the DRY principle (copy & paste programming) end up beeing just small nuisances for me. What
really irks me is code that breaks the separation of concerns. All too often i end up debugging code written by so called "senior programmers" which looks something like this : - big function (+ 200 LOC) - everything is in the event handler in the UI. (buttonOk_OnClick) - read UI data - go to database to retrieve some data - add some logic - go again to the database to retrieve another needed data - add more logic, also using some hardcoded values. -save into database
I hate this kind of code. Separation of concerns should be the first thing someone should learn when he writes code for a living.