Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 81 of 428)

Does WordPress Hold You Back as a Developer, Really?

One of the commentaries that we often read or hear about WordPress is its “low barrier to entry” and why this is good for the web.

The counterpoint to this is that it prevents developers (or “would-be developers,” as some may say) from embracing more modern technologies because WordPress doesn’t require them.

Does WordPress Hold You Back?

To be honest, I’ve even seen some go as far as to say that if someone says they are a PHP developer who has primarily worked in WordPress for their career, then you should subtract, say, three years from their “real” PHP experience.

Yikes.

I see reasons for this – I’m guilty of some of the “older” practices – but does that mean that WordPress prevents us from becoming high-quality, object-oriented programmers?

Continue reading

Where Are the Amazing WordPress Jobs?

A couple of days ago, John O’Nolan who’s the guy leading the team behind Ghost shared the following tweet:

https://twitter.com/JohnONolan/status/996132104445378560

Amazing WordPress Jobs: Ghost

I quoted the tweet to give context to the following question:

This is a legitimately honest and unloaded question: How many companies built on WordPress have job postings like this?

I can think of *maybe* 5 off the top of my head, but I’m curious about what’s out there now.

At the time of this writing, I’ve received next-to-nil on responses, so I thought it might be worth sharing a few thoughts about it here.

Continue reading

Using sprintf and LIKE in SQL Queries in WordPress

When working with queries in WordPress, it’s always best to prepare the query before running it; however, if you happen to be interfacing with a third-party API or working with another variant of SQL (like Transact-SQL), then things may work a little differently.

sprintf and LIKE in SQL

If only databases were really this neat.

The TL;DR of all of this is that handling sprintf and LIKE in T-SQL needs some strategic handling. And the code sample in the next section should provide all you need.

Continue reading

Let the Code Review Process Stand on Its Own

The more projects I work on with people who I hold in high-esteem, especially as it relates to programming, the more I find myself wanting to pre-justify the reasons I’ve made a decision about how I’ve solved a problem.

This isn’t to say that I try to be defensive about what I’ve done from the start. Instead, it’s more of an attempt to try to justify or rationalize the reason I did something so the person reviewing my code understands it and doesn’t think ill of it. The thing is, I’ve never really had an experience – at least not in the last, say, half a decade or more – completely obliterate my confidence.

Code Review Process: Part 1

Code Review, Part 1 via xkcd

Instead, they’ve done one of three things:

  • The person reviewing the code has made a recommendation as to how the code can be improved,
  • The person reviewing the code has asked why I did what I did (either to better their understanding or to see if there’s not a better way the problem could be solved),
  • The person has provided insight on how to rearchitect the solution simply.

And regardless of which of the above is used, I’m generally grateful.

Thus, one of the things I’ve been trying to get better at doing is merely deciding on how to implement a solution, commit the code, and let the code review process do its thing.

Continue reading

Writing Unit Tests with PHPUnit, Part 3: XML Configuration

In the past posts in this series, I’ve covered the following two topics:

  1. Writing Unit Tests with PHPUnit, Part 1: The Set-Up. A guide to getting started with writing PHPUnit tests through the use of a basic cache and using the setUp method of the framework.
  2. Writing Unit Tests with PHPUnit, Part 2: The Tear Down. A tutorial on how to write unit tests that properly leverage the setUp and tearDown methods of PHPUnit.

Each of the above is meant to provide a primer for how to get started with writing very basic unit tests. Things can get more complex especially as an application or project grows (but that’s always true, right?).

But to make sure one is prepared for that, there’s one final component to unit testing that I believe we should focus on and that’s understanding the PHPUnit XML Configuration File (which you may have seen in other projects as phpunit.xml).

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑