Don't Fear The Reaper
How I do love the web. The web gives us the illusion of anonymity and the freedom to experiment with our inner demons. One such persona of note to the PHP community is Padraic Brady aka “Maugrim The Reaper”. Padraic posts on a variety of topics in his blog but never fails to inform or entertain. Let’s look at two of his recent posts.
First, Padraic talks about something that is bound to happen to every programmer sometime in his or her career, Premature Optimization. I know, it’s a subject no one wants to talk about but it’s a fact of life and we need to get it out in the open.
There are times, early in the coding life-cycle, when a developer will sacrifice a feature simply because he/she thinks it won’t perform fast enough. While Padraic forms his arguments around a method he himself almost discarded for performance reasons, it rings true for a lot of us. I think he summed it up best when he said:
What was the hurry? The performance cost had not even been measured. Alternate implementations had not been assessed. No thought was given to how it would impact the design and future maintenance. Jumping the gun so early would result in a lost feature, an unmeasured performance gain, and extra developer effort.
We like to avoid premature optimization around here… is an excellent and short read. It’s also a great article to print out and leave on your manager’s desk…just in case.
Second, and wholly devoid of innuendo, is a much more technical post, The Factory and Abstract Factory patterns in PHP. In this article Padraic delves into the dark underbelly of OOP and discusses Factory classes. Worse yet, he invokes the little understood and oft misused Abstract Factory. (Is that where they produce Escher paintings? Sorry, it had to be said.)
Tackling these two topics is tough, but Padraic rises to the occasion and does an excellent job of explaining them while giving example code to illustrate his point. If the concept of Factories has been bothering you, this is an excellent explanation and worth the 5 minutes of your life it will take to read it. This one, however, you want to keep away from management types as it’s been proven that articles that invoke thought at this level has been known to cause manager’s heads to explode faster than a Dell laptop.
=C=

Comments