Efficiency vs. Effectiveness

In software development, I feel like there’s too much focus on being efficient, and too little focus on being effective. Many people seem to believe that efficiency is synonymous to effectiveness. Alas, it is not.

Efficiency is a measure of velocity; how fast you get things done. Effectiveness, on the other hand, is a measure of quality; how well you get things done, and that you’re doing the right thing in the first place.

There’s no use in being efficient if you’re doing the wrong thing. It doesn’t matter how well you cooked that steak, if your customer craves lobster.

Be effective first, efficient second.

“Id.” is Short for “Identifier”

As you can see, my OCD acts up when I see WordPress using uppercase “ID” in core function names, such as the get_the_ID() function.

“Id.” (note the period), as used here, is an abbreviation (contraction) of the word “identifier.” It is not an acronym, nor a “multi-word abbreviation” (i.e. for something like “Identity Document”), so it should not be all uppercase.

Also, according to WordPress’ own naming conventions, all function names should use lowercase letters and underscores for separating words.

Use lowercase letters in variable, action, and function names […]

And I wonder why I never get anything done …

Less Wrong

I recently discovered the Less Wrong online community.

To quote their front-page:

Less Wrong users aim to develop accurate predictive models of the world, and change their mind when they find evidence disconfirming those models, instead of being able to explain anything.

That’s a noble goal for an online community.

I’ve only been lurking so far, but chances are that I will stick around.

There are a lot of interesting articles and discussions going on over there, so I highly recommend checking it out for yourself.

Code Comments Say What?

I came across another sentence in Professional WordPress Plugin Development that made me stop and think for a minute:

The major benefit to code commenting is to explain what your code actually does, in plain English.

The triggering word being what.

I always believed that code comments should say why. What should be easy to discern from good code, without the need for additional commentary.

I’m using this rule of thumb for code comments:

Code says what, comments say why.

Name Collisions in PHP

I came across this passage in Professional WordPress Plugin Development:

[…] it’s essential that you prefix everything with a unique prefix. […] one of the most common errors in plugins is using all too common names for function and variables. […] the website will break because you can’t have two functions with the same name in PHP.

So, if I install two plugins from different developers, I cross my fingers and hope that they haven’t used any of the same variable or function names, else my site will suffer the consequences. Plugins are compatible by chance.

Return to WordPress

I’ve been jumping back and forth between different content management systems and static site generators, searching for “the perfect blogging platform.” Now full circle, I’m back to WordPress—This time for the long haul. Despite my PHP-phobia, I cannot find a simpler alternative.

Now that I don’t have an excuse to procrastinate by tinkering on the code behind the scenes of my blog, there’s a chance that I’ll make some headway on my writing and other, more valuable projects. Because time is scarce.