Tom McFarlin

Software Engineering in WordPress, PHP, and Backend Development

Page 155 of 428

What Should I Build? Ideas for WordPress Projects.

Anyone who writes regardless of if it’s prose, creative writing, code, a blog post, or more is familiar with writer’s block in some form or fashion. And when it comes to programming, I think some experience the same type of thing (programmer’s block, perhaps?).

Case in point: I remember when I was younger, and was learning to program, I had this insatiable desire to want to create something to use, or others would use. The problem was that I didn’t know what to try to write.

Granted, I was young at the time, and I lacked several skills that were needed to build something like that, but – as they say – I didn’t know what I didn’t know.

Now, much of my work is spent building things for others. That is, they have a problem that needs solving, and I have the desire and means by which to provide said solution.

And I love it.

There are times, though, that I still bump up against a particular problem that I wish I could solve. The only difference between now and two decades ago is that I have the means by which I can do that.

Clearly, it’s taken a while to get to that point. But the point remains: People are learning to program and want to build something, but they don’t know what to build or how to discover what to create.

It’s easy to spout off “well just scratch your itch.” But that doesn’t do much to get the creativity flowing, does it?

So in my latest article for Envato, I try to provide some practical advice on how to determine what to build when using WordPress.

Continue reading

Single Responsibility Principle: Option Pages

Assuming you’ve read the following two posts (on the single responsibility principle and WordPress submenus), then this is a good place to tear apart the code and start trying to apply the principle.

Single Responsibility: One Reason to Change

If on the other hand, you haven’t read the posts, there are two things to note. First, the single responsibility principle says the following:

A class should have only one reason to change.

Secondly, review the code in this gist as this is the basis for the rest of the content of this article. Specifically, I’m going to be taking the above principle and try to apply it to the code.

Continue reading

Single Responsibility Principle: WordPress Menus

The single responsibility principle, as mentioned in the previous post, should be thought of as nothing more than asking the following question:

A class should have only one reason to change.

The question is far simpler than the answer, though. And through this post and the next, I’m hoping to demonstrate exactly that.

But first, I want to mention that the context for this particular question is with a relatively simple API. This doesn’t mean that the result isn’t as beneficial. It does, however, make for quicker reading and more time to talk about the application of the principle.

Continue reading

The Single Responsibility Principle in WordPress

Every time I work on a project for a client (or a side project for myself), I try to keep in mind each of the five SOLID principles.

These are often talked about by developers on numerous blogs (and I’ve done so myself on this site), so I’m not about to teach of them in this post.

Single Responsibility: One Reason to Change

Instead, I’ve been looking at how the Single Responsible Principle applies with working with various aspects of the WordPress API. And what I’ve found is that, in my experience, using this principle consistently results is far smaller classes.

My most recent experience has been in a very simple use case: Working with the WordPress API to create a submenu item and a corresponding submenu page.

Continue reading

A Pressmatic Image for WordPress Trunk

As a follow-up to yesterday’s post with using Pressmatic and a copy of WordPress from the Subversion repository, Kiko Doran asked me a good question via Twitter dealing with one of Pressmatic’s nicest features:

First, you can think of Pressmatic templates as preconfigured images that can be used to re-create a development environment. This is useful if you need to create a second or third or ninth install on your machine.

Or, better yet, it’s really convenient to have it available for your team so that you can make sure you’re all running the same image across all development machines.

Still, the question remains: Can you create an image that has trunk installed by default?

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑