My own skill set is changing lately. I used to call myself a periphery developer in relation to core developers. I used to do the installsheilds for complex applications, some GUI type programming, enterprise level build systems and test automation systems. Today, I mentor and consult on many aspect of these parts. One of the things I advocate is making code maintainable. That means, can the next person who needs to deal with the code use it well.
I had a discussion with a colleague recently and he recently inherited a "pristine enterprise application", >90% code coverage, thousands of JUnit tests, and properly written, from a tester point of view. In fact, when I had the chance to make it fall over, it was during a performance test and we simulated 40000 users hammering on this thing concurrently, and it held up to that torrent of traffic. Nicely done. Anyway, he was asked to make a quick fix for some new feature that may require a "hack". He told me in the parking lot that he was "violently opposed to any hacks because he came from a world of hacks". I was ecstatic to hear that, when someone care about the code so much to keep it testable. I think this an attitude that everyone should approach their code with.
Every time you make a hack, you make it difficult for the next person. On the karma scale, its pretty low for developers to do this. I also understand why developers do that since I am also guilty for making hacks to brand new code. I'm not perfect and the code I had to "hack", I made sure the next person knew that by commenting in giant letter "THIS IS A HACK, I'm really sorry". Sometime there are just time pressures and limitation that require it and sometimes its for the greater good.
Testers can just hack up tests too, this karma scale applies (even if the political situation negates the time for testing).
So, I know why things get hacked, but if you make it maintainable from the start, its best to defend that type of code base at all costs.
Anyway, the reason I thought about this was because of this website on how to create unmaintainable code. Basically, do the exact opposite of everything he says. :-)
“Quidquid latine dictum sit, altum sonatur” which translates to “Whatever is said in Latin sounds profound.”