Scorn Globally, Act Locally
in an ideal world, all projects we handle have source code that are so beautifully crafted that merely reading them gives you a sense of enlightenment and makes you marvel at the simplicity of the code (and for a few gives you that warm fuzzy feeling ... ). in reality, well ... *sigh* =)
for those of us who maintain other people's code for a living, here's something to ponder over while you're pulling your hair and pounding on that wall or table in frustration from trying to understand what the hell that other person was thinking when he/she wrote that bit of code you're trying to debug.
Beautiful Code in the Real World - Part II: Scorn Globally, Act Locally
by Alberto Savoia
August 14, 2007
Summary
How to inject beauty in a coyote ugly code base.
In Part I, I mentioned one of the dilemmas voiced by developers who want to inject some beautiful code in their day-to-day activities:
“I am maintaining a steaming pile of legacy code that I have inherited. I can barely keep the code base working – sort of. I would love to write some beautiful code, but have no time to think about beauty as long as I am saddled with this ugly code base.”
This is a very common situation. Most developers spend most of their time maintaining/enhancing code that they did not write and, more often than not, that code base is not just ugly, but coyote ugly.