Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 195 of 428)

The Grid Ruler Chrome Extension

If you work in web development long enough, odds are you’re going to discover your strength lies within writing code or designing a site. It’s possible to be good at both – I’ve seen it in rare cases – but it’s more common for someone to be strong in one area or the other.

As easy as frameworks like Bootstrap, Foundation, 960gs, and so on have made it for us to build layouts against a grid, it has not – thankfully – removed the need for designers (of course, that was never their intent, anyway).

The reason I bring this up is because years ago, a good friend of a mine – a designer, to be clear – would jokingly say I was pixel approximate.

And he wasn’t wrong.

Continue reading

When Offering Programming Advice

A few weeks ago, I shared a post in which I walked readers through how to achieve something within the context of WordPress. It essence, it was programming advice.

Programming Advice

The post was received okay, though it wasn’t without its [valid] set of criticism (which I’ll address later). Luckily, most of the people who responded did so via comments and emails explaining why they took issue with part of the code, and how they would go about addressing it were they having to solve a similar problem.

Not everyone was like that (and they never are). Instead, if you share any code of any type in any fashion with anyone you’re likely to get some type of response reading something like

It’s okay, but it’s not how I would do it.

The problem with statements like this – especially for those who want to get better at what they’re doing – is it implies there’s a better way, but the way isn’t offered up as a solution.

Bummer.

Continue reading

Programming Frustration (And Elation)

It’s one of those nights where I’m sitting at my desk after spending the majority of the day at the computer. This used to be the norm when I was younger, but now I try to keep my hours at my desk a bit more limited for a variety of reasons.

Sometimes, as we all know, work ends up keeping us up a little bit later and in places a little bit longer than we’ve anticipated.

Late Night Laptop

In this instance, I’m working to track down a bug I’ve been after for a better half of the day and it’s something I need to get done now because later will be too late.

There’s other work to do and this is something that needs to be shipped, anyway.

If you’re someone who writes any type of code for a living, then you know the feeling of programming frustration I’m talking about: It starts off at a level of looking forward to getting back into the code with a level of confidence thinking:

“Okay, I’ve had time to step away from it. I should be able to come at this with a fresh perspective.”

Because sometimes that’s exactly what happens isn’t it?

Continue reading

Why I Recommend SearchWP

For a few years now, I’ve been using SearchWP on this and on a few other sites I’ve either built or had a hand in improving.

SearchWP

Most people who are active in the WordPress development space are aware of this plugin (at least, I think they are), but if you’re someone who’s not involved with WordPress at that level and are looking for a way to improve the search functionality of your site, then I can’t recommend the plugin enough.

Then again, even if you are a developer and you’ve never used it, the same sentiment rings true.

Continue reading

Mixing Functions and Constructs in PHP Scripts

One of the features people tend to love or hate (or simply accept) about writing PHP scripts is how you can mix general constructs of the language – such as conditions – with functions outside of any type of class, namespace, or container.

Bringing a Little Order to the Chaos

Bringing a Little Order to the Chaos

That is, you can write conditional logic that exists within the global namespace right alongside functions that aren’t part of anything other than the global namespace, as well. This can make for difficult code to maintain.

But the point of this post isn’t to complain – for what it’s worth, I see it as the nature of the language, accept it for what it is, try to avoid it, and work with it whenever something comes across my desk. I’m far less dogmatic about that kind of stuff than I used to be when I first started working as a developer, but I digress.

Anyway, this post is tagged as “WordPress” which doesn’t make a lot of sense, however the purpose of doing so is because I was recently working on an older WordPress-based site that was using Ajax, it wasn’t doing so using the built-in API, and it was basically using Ajax to call a vanilla PHP script.

As such, I thought I’d write a bit about as how it’s still possible to refactor code like this so it’s a little more maintainable even if it’s using a style of coding with which we don’t necessarily like to use.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑