Tom McFarlin

Software Engineering in WordPress, PHP, and Backend Development

Page 164 of 427

The Tension of Refactoring Legacy Code, Part 1

In a post last week, I talked about various problem spaces that exist in WordPress, but I also briefly touched on the idea of practical applications as it relates to writing WordPress-specific solutions.

Specifically, I made the comment (more or less in passing):

When I was in school, I had to take a class in Computational Theory. For the most part, I’m more of a fan of practical application, but I know that much of said practical applications are the concrete implementations of proven theories.

And then I went on to talk about more theoretical topics as it relates to solving problems in a given computing space (for us, that’d be WordPress).

Computational Theory

Since I spoke about the previous topic at this particular level, I thought it might be fun talk about a more accurate or more practical approach to writing WordPress-specific software.

Recently, I’ve been working on a codebase that’s a few years old. The desire to want to refactor the whole codebase is strong (and I know I’m not alone in feeling this way when it comes to working with previous projects).

But this is not pragmatic, and it’s not so for some different reasons. So over the next three posts, I thought I’d share a little bit about the state of the project, managing the tension that exists, and how to do what we can when we’re faced with this type of situation.

Continue reading

The Modern WordPress Server Stack

During WordCamp San Diego, I had the pleasure of meeting and hearing Carl Alexander speak on the topic of the modern WordPress Server Stack.

Modern WordPress Server Stack

A few notes:

  • If you’re not following Carl on Twitter, I recommend it. He’s an incredibly smart person who is doing some really neat things with WordPress.
  • If you’re not subscribed to his blog but are interested in advanced programming topics as it relates to WordPress, I recommend subscribing.
  • If you weren’t present for his talk, you can catch it on WordPress.tv.

With that said, Carl also included an article that accompanied his presentation on his blog and it’s something that I think makes for good reading.

I find this especially true if you’re someone who is at an intermediate level of WordPress development or if you’re someone who’s looking to learn more about server administration.

Continue reading

Using Console.app for Viewing PHP Logs

When working with PHP, there are some great libraries and tools that make it easy for logging notices, warnings, errors, and so on within our code.

For what it’s worth, I think PHP does a pretty good job of doing this on its own, but if you need to write your custom logging code, there are plenty of off-the-shelf libraries that are helpful.

But that’s not the gist of this post. Instead, just as I think it’s important to make sure we’re providing reliable logging information, I think it’s important that we’re able to view said logs, as well.

Continue reading

Thinking Through Problem Spaces in WordPress

I enjoy talking with fellow developers about the problems they are thinking about as it relates to their field, and the problem spaces in WordPress is no exception.

That is, I enjoy hearing about what they are working on, what they are thinking about, or what they are tinkering with as it relates to their primary line of work.

Tinkering

For many who read this blog (and this includes myself though I’m the one actually writing it), we spend a lot of our time working within the WordPress space but does mean we spend a lot of time thinking about the WordPress space? Furthermore, does this mean that we spend a lot of time thinking about problems and potential solutions to what we see in our area?

First, this is not something that’s unique to our space. I believe that you can find this in any programming community.

Secondly, I think that this notion of thinking about a particular set of problems is something that’s a bit more abstract than what we usually discuss or see written about on other blogs.

Continue reading

A Plugin for Testing Custom Post Types

When working on the latest version of Easier Excerpts, we added functionality so the plugin would work any post type that had support for excerpts.

Testing Custom Post Types

Because you can’t know that different custom post types that a person may have on their installation of WordPress, I wrote a small plugin that creates a generic custom post type that can be customized, used, and abused in your development environment.

This way, you can install the plugin, activate it, and have a custom post type with which you can test against should your project call for it.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑