Monday, April 18, 2005

What to do with complexity

I was pursuing the Creating Passionate Users blog and noted a link to a new, interesting product that the Head First folks are coming out with called Head First Design Meditations. This looks to be a deck of cards that is, Designed to be used as a brainstorming and inspiration tool, the card deck will contain small bits of software design wisdom, insights, idioms, inspiring quotes and perhaps even a chuckle or two.

What I quickly noted on the page was the following quote by Alan J. Perlis: Fools ignore complexity. Pragmatists suffer it. Some can avoid it. Geniuses remove it.

Wow! I must admit that when I have encountered complexity, in both code and in life in general, I have ignored it, suffered it, and avoided it. Rarely, if ever, have I removed it. What comes immediately to my mind concerning the removing of complexity is Refactoring. This I try to do regularly with code. What is Refactoring? According to the Wikipedia Refactoring is the process of rewriting written material to improve its readability or structure, with the explicit purpose of keeping its meaning or behavior. Wikipedia defines readability as, Readability is a measure of the comprehensibility or understandability of written text.

The main reason I refactor is indeed pragmatic. I find that further updates to the code is easier to do if the current code is as clear in its intent and as simplistic in its structure as possible.

Perhaps those who really are geniuses remove complexity out of altruistic reasons, for myself as a mere mortal, I remove it so I can better understand how and why.

For more quotes by Alan J. Perlis, click here.

No comments: