Tom McFarlin

Software Engineering in WordPress, PHP, and Backend Development

Page 122 of 427

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

Time to Commit Code: It’s Best to Do It At…?

It’s not enough, as programmers, to talk about code or to talking about committing code if we’re not also talking the best time to commit code, right?

Sure, some developers have their times dictated by outside circumstances. Maybe it’s an employer, maybe it’s a person who’s hired the developer under a contract, or maybe it’s some other external circumstance.

Whatever the case, I’ve found that having a set expectation as the best time to commit code can help take several aspects of the full sprint or milestone development process a bit easier especially regarding how it helps to scope a given release.

Continue reading

WordPress Admin Notices: Toggle Them With This Plugin

Last week, I shared some thoughts on my desire to do a better job of sharing personal projects – regardless of how big or how small – on GitHub. I’ve used to do a better job of it, and I’ve since gotten out of it. (And this lead to some comments, some of which aren’t approved yet, which I still need to find some time to sit and respond.)

And I want to get back into the habit of it.

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.

But in following up with what I said I’d do, I pushed up 0.1.0 of the first project in an attempt to follow-through on what I said I’d do starting with a small project that allows us to toggle WordPress admin notices.

Toggle WordPress Admin Notices

So here’s Toggle Admin Notices.

Continue reading

UI Component Libraries for WordPress via 10up

When it comes to working with UI component libraries in WordPress, I usually look to jQuery UI. Sure, there are some components that are dated (and there are others I like such as Select2), but given that…

  • jQuery is bundled with WordPress,
  • jQuery UI is included in the application and can be easily enqueued,
  • it’s a tried and trusted library,
  • the documentation is solid and it’s easy to follow

This isn’t to say there aren’t times when issues arise, but generally speaking, it’s a solid option when it comes to working with various UI component libraries.

But last week, 10up released a UI component library that I think is worth looking into if you’re a WordPress developer.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑