Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 113 of 427)

Singletons in WordPress, Revisited (A Time and a Place?)

Before I start a post talking about using singletons in WordPress (or, more appropriately, the Singleton Pattern), I want to make sure that you read the following two articles:

Both of these articles provide immensely valuable perspective on this pattern and the dangers of using it whenever using it throughout our work in WordPress; however, does that mean we should completely avoid them?

I don’t think so.

Then again, I also recognize that the articles aren’t saying to completely avoid them. They are giving strong cases for how to use them and the dangers of using them should you opt to do so.

And though I’ve definitely used them in the past, I’ve generally stopped. However, I recently came across a use case for a project in which I think it’s acceptable.

Continue reading

Visual Studio Code TODOs, REVIEWS, and FIXMEs

I’ve not been coy about my appreciation for Visual Studio or how it performs as an IDE for WordPress, but there are always things here and there I think are worth sharing either for the sake of making it a better experience or for improving our workflows.

Case in point:

How many of us work on codebases large enough that we’re writing comments, code, or other features that yield us dropping TODOs or FIXMEs throughout the code so we can focus on the task at hand?

I think our intentions are good. I mean, we do plan to come back to these, but if they aren’t documented in some way, it’s far too easy to come back and do then.

And sure, you can always do a “find all” at the end of a sprint or before the end of a project of whenever works best for you, but there are extensions that can do this for you.

Continue reading

There’s No Perfect Size for a Feedback Loop

The more I drafted this post, the more it felt like I should be writing some type of TL;DR for certain people who read this. So, in an effort to save time, here it is:

I’m writing this for those who are new to self-employment, project management, or generally have less experience than those who are asking “Why are you writing this?” Ultimately, it’s something that most of us learn at some point in this industry, but if we can help one another short cut it sooner rather than later, we all benefit.

If you’re still interested after reading the note above, then I assume you’re looking to get better at this aspect of communication. Which is good, because so am I 😏, and using a small feedback loop is one way in which I’ve found to do that.


Every industry has a bit of their own jargon and many of us laugh about it, yet we all continue to use it when in a professional setting. We’re funny that way.

Anyway, in our industry, one of the phrases that we use a lot – myself included – is “feedback loop.” The first time I ever came across the phrase was with regard to feedback from amplifiers. It had nothing to do with software. Nonetheless, in what we do we generally use it to refer to it as:

  • sending a request, comment, or general piece of information to a customer,
  • receiving a response from the customer regarding said information.

And for those who aren’t used to the idea (because there are those who do “big bang releases” which I’ll talk about in a minute), feedback loops are usually considered to be small or large.

The longer I’ve worked in software, the more I always aim for A small feedback loop no matter what.

Continue reading

The WordPress Economy, Employment, Strategies, and More with WP-Tonic

Last week, I had the pleasure of talking with John Locke and Jonathan Denwood on WP-Tonic to talk about a variety of things regarding the WordPress economy, self-employment, development strategies, observations around the software, along with a variety of other topics.

The WordPress Economy, Employment, Development, and More

Before covering what it is that we covered, I do recommend checking out their library of podcasts.

They’ve talked to people who I think are worth a follow and who are far smarter, accomplished, and have unique insight on a variety of topics in the WordPress space.

Continue reading

On Writing Clever Code with Arrays in WordPress

I don’t know if there’s a standard for what’s considered “clever code,” but I think that if you were to show various code samples to programmers, they’d be able to know it when they see it.

And there used to be a time in my career that I was far interested in writing clever code. But the older I get and the more work I do in maintaining projects, the less concerned I am about writing clever code and the more interested I am in writing code that’s clear and read and thus maintain.

Clever Code with Arrays

Clever code is for the birds. Pardon these stupid puns.

When we work with WordPress, we’re likely dealing with arrays a lot especially given that so much of the internals of WordPress are built on them (yes, there are some objects too, but arrays are pervasive).

What, then, does clever code with arrays look like in WordPress versus less clever code? And furthermore, should we avoid aiming to write clever code?

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑