Affection in Expression Engine Code Base Comments


May 12th, 2011
Comments Off

Bad Comments in Expression Engine

Sometimes it is necessary to delve deep into the heart of a CMS in order to bend it into doing what you want. Mostly that is because nothing ever seems to fulfil all existing requirements.

As a result we developers need to get into the heart of the application to see how things work. I suppose it’s a bit like being a mechanic – all they want to do is take an engine to pieces “just to see how it works“. That is a quote from my brother, a mechanic and all things (de)construction guy.

When we get into the intimate parts of an application’s code base it’s nice to see comments from the developer – indicating what this little section of code is all about. The Expression Engine (EE) developers must have gone through some dark days when programming the Extensions class in EE and decided to take a swipe at it’s users with the following comments:


// There is a possiblity that there will be three extensions for a given
// hook and that two of them will call the same class but different methods
// while the third will have a priority that places it between those two.
// The chance is pretty remote and I cannot think offhand why someone
// would do this, but I have learned that our users and developers are
// a crazy bunch so I should make shite like this work initially and not
// just fix it later.

// However, it makes no sense for a person to call the same class but different
// methods for the same hook at the same priority.  I feel confident in this.
// If someone does do this I will just have to point out the fact that they
// are a complete nutter.

Now, I don’t know about you – but this is quite the rant and not all that useful. While I might not actually ever program something that would fall into the use-case that the developer is referencing here I just don’t see why a professional product needs this kind of crap (the comments) in it.

Have you found any other great Expression Engine code comments that you’d like to share?

Comments Off

Categories: Programming

Comments are closed.

"Thought leadership is how winners are differentiated in business."