Software Engineering in Web Development, Backend Services, and More

Category: Articles (Page 85 of 258)

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

Social Media Breaks Are Good for the Soul (I Think)

Not too long ago, I took a break from social media for two reasons (one no more important than the other):

  1. to try to break the habit of compulsively checking social networks whenever I was stuck on a problem,
  2. to cut back on “chatter” during the day.

(I looked through my previous posts to see if I talked about it at length but couldn’t find it.)

https://twitter.com/tommcfarlin/status/880912831922753536

Anyway, it’s something I’ve decided to do again, although this time I have a few different reasons. Maybe it’s social media breaks are something I’ll do a more on the regular, maybe not. I can’t know that right now.

We’ll see in a month.

Nonetheless, this time I thought it worth sharing a little bit more behind the reasons why if for no other reason to make sure I have it documented more so than I did last time.

Continue reading

Adding Your WordPress Plugin To Packagist

When you start adding your WordPress plugins to GitHub, one of the next things you’re likely going to want to do is make it easy for other developers to begin incorporating those packages into their composer.json file.

That is, they don’t have to download your plugin, include it in your project, watch for updates, or anything like that. Instead, they add the file then run:

$ composer update

…whenever they are ready to get the latest version of your work.

But simply contributing your work to GitHub is not enough. You have to submit your WordPress plugin to Packagist (of course, this works with other projects, too, but that’s outside the scope of this blog, really).

And here’s how to do it.

Continue reading

WordPress Queries with IN Clauses (Who Knew)?

A little over a year ago, I wrote a post on how to use WP_Meta_Query whenever you have a set of keys you want to use to help pull back information from the database.

What about the case, though, when you have a number of different keys that would result in creating a really long array for the WP_Meta_Query class? For example, what if you had to loop through a collection of data before even setting up the query?

On some level, it might feel that like the natural thing to do would be to:

  1. iterate through the collection of keys,
  2. dynamically build up the results,
  3. combine them into a single result set,
  4. then work with whatever you’re given.

But doesn’t that sound a bit cumbersome (let alone slow)?

When it comes to using the WordPress API, I do what I can to stick to it before talking, say, directly to the database but there are also times where it makes sense to write a raw query than to write some type of clever code just to get the WordPress API to work. Continue reading

A Primer in Bash for WordPress Developers

Now and then, I end up installing a piece of software via Composer or that places some of its binaries in directories other than the usual places that macOS expects to find them.

That is, if you’re running an app from within Terminal or that an application with a GUI expects to be in a certain location on disk, then it’s likely going to expect it in one of five places:

  1. /usr/bin
  2. /bin
  3. /usr/sbin
  4. /sbin
  5. /usr/local/bin

But, as I said, over time we end up installing things using third-party tools, or we end up installing things that place binaries outside of one of these directories.

Case in point: What happens if you want to install WP-CLI globally? Or what if you want to use a version of MySQL that ships with MAMP?

In those cases, those binaries are not going to be included in any of the aforementioned directories. When that happens, you have to modify your profile. If you’ve never done that, it can be daunting. And it can get messy if you don’t do it methodically over time.

So here’s a primer on Bash for WordPress developers for what your bash_profile is and how to manage third-party software with it.

Continue reading

How I See WordPress (In 2017): Apps, JavaScript, & Tools

When it comes to the content of this blog, I try to focus on a handful of distinct areas:

  1. WordPress Development
  2. Business
  3. Blogging
  4. Resources

And sure, there are some other things that I’ll occasionally share but I don’t often venture outside of that. I’ve my reasons but one of the reasons that I don’t bother offering any type of social commentary on the state of WordPress is simple:

Perhaps those reasons are two sides of the same coin but the point remains. In the last few weeks, though, there have been a few things I’ve been reflecting on primarily as it relates to my career, the status of WordPress, and some of the other things that are related to all of that.

And since I know I’m not the only one that works in this industry, and that sees how certain things are playing out, I thought it worth at least sharing how I see WordPress regarding some of these things.

Here’s the disclaimer: This particular post is not a dramatic take on anything hot that’s happening in WordPress, so if you’re looking for some type of gossip or some firestarter, go elsewhere.

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑