Tom McFarlin

Software Engineering in WordPress, PHP, and Backend Development

Page 104 of 427

A Few Thoughts on Team-Based Pragmatism and Engineering

When it comes to doing any type of development – I don’t care if it’s for the web, for mobile, or for some other platform – there are plenty of books, online courses, and so on that make it incredibly easy to learn whatever it is you want to learn.

To be clear, I’m not knocking any of the ways that are available to learn, either. After all, we all learn in different ways, right? And who am I say which way is better than any other way especially given the fact I write daily about topics here on and on other sites?

But I can definitively say for me – someone who has enjoyed both learning through formal education, tutorials, courses, and so on – the best way to gain experience in this industry has been two fold:

  • working with other people,
  • breaking things, and learning how to fix them.

Do I mean doing it in this specific order? Nope. Does this mean I’m leaps and bounds ahead of others? That’s laughable.

But as I have had the pleasure of working with others on multiple projects, talking with others via Twitter, conferences, and so on and experienced both the good and the bad, it’s something I think everyone should have the opportunity to do at some point.

If I had to summarize it, I’d say that it’s about finding a balance of team-based pragmatism and engineering. Why, though, if nothing of the above is new (given software companies have existed for decades) am I bothering to write about this now?

Continue reading

PSR Logging Interface (And Why Logging Matters)

Two features of PHP that I believe are often overused when it comes to “debugging” are using echo and var_dump. I’ve talked about this in a few different articles around debugging (like in here and here).

And as much as I am a fan of using a debugger, I think it’s also important to implement a type of logging system so that you or your client can go back and review the activity that’s been happening within the system as they or their users have been, you know, using it.

There are two aspects to doing this, though, especially if you’re looking to following the PSR logging interface and they are:

  1. the rules for the actual logging interface,
  2. a project that properly implements said logging interface.

So why not tackle both in this post?

Continue reading

What Are Programming Side Effects, Anyway?

Whenever we talk about certain programming concepts, I think it’s important to take a step back out of whatever specifics we’re discussing and look at things in the context of the bigger picture.

Programming Side Effects

Some modules introduce side effects; some don’t. It’s okay.

For example, yesterday I briefly touched on the idea of programming side effects, but I did so when talking about using PSRs. And for those who are simply interested in aspects of programming in a more general sense, it’s important to understand them, too.

Remember, the idea of side effects as stated in PSR-1 is:

A file SHOULD declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it SHOULD execute logic with side effects, but SHOULD NOT do both.

In this post, I’m not so interested in discussing logic with side effects (because there are times where side effects will happen). Instead, I’m more concerned with understanding programming side effects (what they are, what to avoid, and so on).

After all, talking about side effects in one context may mean one thing whereas, in programming, it may mean another.

Continue reading

Basic Coding Standards via PSR-1

Yesterday, I talked briefly about a rationale for using PSRs versus the WordPress Coding Standards and the when and why of both. But that doesn’t mean it’s not without its points of confusion especially if you’re just starting with them, right?

By that, I mean: Say you’ve been working with the WordPress Coding Standards for years (because I can relate) and now there’s this whole new set of rules and guidelines to follow. But it’s not like a simple matter of changing some white space and renaming files.

There are other points to follow, and each is outlined in a number, quite literally (PSR-1, PSR-2, and so on), of how something should work.

So when it comes to just the basic coding standards as outlined in PSR-1, what are some problematic areas that we may encounter as WordPress developers?

Continue reading

Using the PSRs (Versus the WordPress Coding Standards)

At this point, I don’t know how many articles I’ve written about the importance of the WordPress Coding Standards (enough to link to them here, here, and here, I guess, which counts for something).

But after doing enough projects for clients and working with developers who are far smarter and familiar with advanced tooling than I am, I’m at a place where I’m opting to start using PSRs in WordPress WordPress development.

Using PSRs in WordPress Development

Oh the drama, right?

Seriously, though. There are reasons for this, and there are times in which I think the WordPress Coding Standards should still be used, but I’m quickly becoming more convinced that building any modern project on top of WordPress should use more modern PHP tools (which I’ll briefly mention later).

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑