Software Engineering in WordPress, PHP, and Backend Development

Category: Articles (Page 96 of 258)

Personal opinions and how-to’s that I’ve written both here and as contributions to other blogs.

Domain Rules (Or What Are We Codifying, Again?)

When it comes to building software for other people – regardless of if it’s a WordPress plugin, a mobile app, a desktop app, or something else – one of the most important things we can do is to test the project.

And I know: Talking about testing is boring. It seems to be disconnected from the act of implementing a solution and being able to say “Hey, look what I did!”

Testing, on the other hand, is sitting there making sure our code works. But, please, our code definitely works because we can see it happening, right? The truth is, we know this isn’t the case.

And so we’ve got all of these various tools to help us write unit tests, acceptance tests, behavioral tests, we grab groups of people and have them perform usability testing, and all of that’s important.

But before doing any of that, I think it’s important that we actually understand the rules of the problem that we’re aiming to solve. Sometimes we see this referred to as domain rules; sometimes, we don’t see it mentioned at all.

Continue reading

Multiple Objects Writing Data: How to Avoid This

You know those times when you’re working on a program, and there are some places in your code that, depending on the requirements or a bug that manifests itself in some way, is directly related to the fact that you have multiple objects writing data to the same data store? That’s not a good thing.

That’s a terrible way to start a post. Let me try that again.

Continue reading

Open-Source WordPress Libraries (Why I Should Share Them)

The other day, I was talking with a friend, Toby, about the lack of inactivity I have on GitHub. Specifically, I have a lot of private repositories, and I have a lot of secret gists. There’s a method to all of this that I follow, though:

  • private repositories are typically dedicated to client projects or projects that I don’t think are ready for others to use yet (for the sake of the overhead in managing it),
  • gists are strictly for sharing code snippets on this blog, and that’s it,
  • open-source WordPress libraries are occasionally there but have become quite dated,

But during the conversation, I came to the realization that I have a lot of small classes, plugins, utilities, functions, helpers, etc. related to WordPress development or JavaScript that I’ve never really put on GitHub.

Open-Source WordPress Libraries: Where Are They?

Much of what I currently have is out-of-date.

That is, I don’t really open-source my WordPress libraries. I have reasons for this all, but the bottom-line is that I want to change that.

Continue reading

Sharing Visual Studio Code Settings in Dropbox

Yesterday, I walked through the process of sharing databases in Dropbox so it makes sense to follow that up with how to go about sharing Visual Studio Code settings in Dropbox.

That is if you use Visual Studio Code (and I’ve had some people ask Twitter how to do this).

Sharing Visual Studio Code Settings: The Editor

As the same is in the previous post, the same disclaimer that I work on macOS. So this dictates the commands I use, how I create symbolic links, and how I go about sharing settings among machines.

Since this is following up a similar post, why not jump right in?

Continue reading

Sharing Databases in Dropbox (For MAMP Pro)

Sharing databases is something that’s convenient to do within your local development environment especially if you’re working with multiple machines.

If for whatever reason you’re looking to do this with a staging environment or production environment, then this is not the way to do it. There are strategies like database replication and the like that are meant for that, and that are far beyond the scope of this post.

Instead, this is primarily intended for systems that you have, likely on the same network, and that you swap between during the day.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑