Tom McFarlin

Software Engineering in WordPress, PHP, and Backend Development

Page 248 of 428

Documenting The WordPress Plugin Boilerplate

A little over a month ago, I released the latest version of the WordPress Plugin Boilerplate. The response has been great – more than I was expecting, really but that’s a good thing – and, generally speaking, it’s been overall positive.

The WordPress Plugin Boilerplate Homepage

The WordPress Plugin Boilerplate Homepage

Over the last month or so, it’s become clear that more time and resources will be needed to focus on the Boilerplate and to continue to refine its codebase, its functionality, its documentation, and so on. The bottom line is that I want to make sure that I get the right – or as close to right – as possible during the first try.

To that end, I need some input from others (read: you).

Continue reading

Setting Routines and Boundaries for Self-Employment

About four months ago, I received the following comment on one of my blog posts:

I’d love to hear some thoughts, maybe in a future post, on setting boundaries and establishing routines. My ideal would be to have already been to the gym, at my co working space and starting work by 8:30, finished by 6pm, no exceptions. Despite my best laid plans, I haven’t been to the gym in 2 weeks, I find myself starting work any time between 7am and 11am, and occasionally working late into the night once my son is in bed. Some people dig this freedom, but I find that I crave some structure – I just reject having it imposed on my by an employer.

For some time, I’ve sat on this particular topic because it’s something that I’ve wanted to write about, but either had a backlog of other things I wanted to cover, or it didn’t fit with the type of content I was trying to publish at the given time.

Boundaries of Self Employment

yes – working near your tv is risky business!

But now seems like a good time to look into this: Partially because I’m preparing a few posts that are dealing with a number of tools that I use to get things done, partially because a number of people I know who work from home have shared the same feelings, and partially because this is something that I’ve been doing for the past seven years or so.

But for those of you who want to skip the entire post, here’s the TL;DR:

It depends on your personality type.

Honestly, though, there’s more to it than that.

Continue reading

Minimizing Distractions For Programming

For anyone who’s been programming long enough, I’d venture to say that some of the most productive times of the day come when you’re in the zone.

You know what I mean, too: When you’re minimizing distractions, when you’re listening to whatever music helps you get into the groove, and whatever you’re working on feels almost effortless (not that it doesn’t come with it’s share frustration, but you’re just there and totally focused on the task at hand).

We know this feel.

We know this feel.

At the same time, I think that it’s incredible that we get as much work done as we do. Granted, we all have different ways in which we work, but at any given time I could have the following applications open:

  • Email
  • Twitter
  • Slack (for chat)
  • Google Hangouts
  • Feedly
  • Downcast
  • Notifications from my phone (or tablet)
  • …and so on

And that’s in addition to my IDE. I’m sure the same can be said about you and your environment, too. But here’s the thing: Each of the above contributes to making sure we’re aware as many demands that we have being placed on us, but can you argue that they all make us more productive?
Continue reading

Display an Error if a File Is Too Large for WordPress

If you’re working on a project for WordPress that’s going to allow users to upload files – be it a video, an image, a CSV, or any other type of data – then you’re likely going to be faced with a situation where you’re going to need to determine if a file is too large for WordPress.

Yeah, it's a little too large.

Yeah, it’s a little too large.

What’s considered “too large” can be related to any number of factors:

  • The size of the file is larger than you want to accept (or the file system accepts)
  • A PHP timeout occurs when uploading a file because of its size
  • The file system doesn’t have enough space
  • …and so on.

Whatever the case may be, there are two things that you’re going to need to be able to do:

  1. Determine if the file fits within constraint of the system (whatever the constraint is)
  2. Display an error message to the user before the upload occurs

It doesn’t exactly provide for a stellar experience when trying to upload something only to have it rejected by the server without a proper error message, does it?

Continue reading

Writing Good Software Takes Time

One of the things that the Internet has brought with it is this on demand culture. We can talk to people on demand, we can request information on demand, we can complain on demand, we can praise on demand, we can listen to music on demand, we can publish a blog post on demand, we can stream movies on demand.

Almost anything that you think of that can be done online can be done on demand.

Though we’re now in an age of virtual machines, byte code, interpreted languages, and far away from punch cards, writing good software is not something that can be done well on demand. This isn’t to say that we don’t have tools that help us move more quickly through the process of assembling various components – because we obviously do – but building software for yourself just as well as for others is something that takes time.

Hunter S. Thompson once said:

Anything worth doing, is worth doing right.

Granted, the idea of what is “right” in writing software is something that can be debated, but one thing that it cannot be argued is that it should be done quickly.

But when you’re surrounded by so many things in your life that can be done on demand, it’s hard to forget the opposite still exists and is a viable, arguably better option.

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑