Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 295 of 429)

Software is Malleable (Or “A Case For a Strong 1.0”)

The longer I’ve worked in developer – and the more developers with whom I’ve interacted – the more I recognize that we all share a single trait:

We want to get our project right the first time.

Of course, this looks different depending on the type of project, but the point remains: We want to make sure that we nail not only the larger details, but the smaller details correct for the first release.

  • Have we detailed all the features?
  • Have we tested across every single device?
  • Did we select the right font size?
  • Should this feature automatically work, or should it have an element exposed to control it?
  • …and so on

And even though this is true, I think that deep down we know it’s not really possible to achieve.

In fact, I’ve talked numerous times about what I call a strong 1.0 which is essentially the idea that you focus very hard on an MVP – trim the features, nail down the specifics for the first release, and then iterate.

And when it comes to that compulsive need that we – as developers (and probably designers, as well) – have, this can go along way in helping to make a better product.

Continue reading

Modular Procedural Programming The WordPress Theme Customizer

One of the things that I love about working with WordPress is the entire hook system – you know, the various `add_action` and `add_filter` calls that you can make in order to manipulate content prior to sending it up to the browser.

I think that it provides a really powerful mechanism for working content prior to saving it to. or retrieving it from, the database.

Now, to be clear, I’m not someone who thinks that everything should be object-oriented versus functional versus procedural. Generally speaking, I think that certain paradigms lend themselves to certain strategies more so than others.

Case in point: The fact that WordPress `functions.php` file is nothing more than a collection of functions is fine with me; however, I really like the fact that I can write plugins using object-oriented programming.

Anyway, one of the the things about the hook system is that it can result in writing repetitive code – which I’ll show in a moment – which can in turn make for very long, very tedious, and very redundant functions.

Or, more generally stated, it can result in less than stellar programming practices.

So when these situations arise, I try to look for opportunities that help to keep functions lean, but yet maintaining a purpose, as well as easy to follow. I think it pays off significantly when it comes time to read back through the code, maintain the code, and to document the code.

Continue reading

Giveaway: Get a Free Domain with Namecheap!

This contest is now closed. Please see the update at the bottom of the post for the winners!

For those of you who have read this blog for sometime, you know that one of those things that I enjoy doing is partnering with other companies and organizations to offer a variety of giveaways be it for software, applications, service, products, and so on.

This time around, I’ve got a sweet deal from the guys over at Namecheap:

  • The grand prize winner can pick three domain names (for .com, .net., and/or .org),
  • While two runners up will be awarded one domain each

As with all of the rest of the giveaways, the details for how to enter are below:

Continue reading

Fear The Publish Button (For Your Words and Your Code)

For aspiring bloggers, one of the things that we often hear in podcasts, read on other blogs, and in other articles is “Don’t Fear The ‘Publish’ Button,” or we read “just hit ‘Publish!'”

I get the idea behind that mentality – it’s mainly motivation for saying that nothing you write will ever be perfect, so write, hit publish, and you’ll get better as you go.

Embarrassed By The First Version

Embarrassed By The First Version!

There’s a lot of truth to that – you do get better as you go – but I think that this advice (any advice like it) should be taken with a grain of salt.

In fact, I’d go as far as to say that if you don’t have some type of healthy fear associated with hitting the publish button, then you may later regret some of the material that you’ve published.

Arguably, there are a lot of parallels in writing a blog post as there are to writing code: Publish too soon, and you have something that isn’t worth reading or using; Wait too long for complete satisfaction and you may never end up releasing anything at all.

Publishing a blog post, just like publishing code, is something for which you should have a healthy fear.

Continue reading

How To Add a Class to a Single Post in WordPress

As I’ve continued to work on the theme that I’m planning to use after Standard (and that I’ hoping to begin dogfooding within the next month or so), there have been a couple of features that I’ve wanted to implement for the sake of styling.

For example, there are times where I want to be able to style a single post, and though there are a number of ways one can go about doing this, I like to try to be consistent in how I approach the solutions I implement.

To that end, I’ve wanted to add a custom class name to a single post but only only the single post page.

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑