Software Engineering in WordPress, PHP, and Backend Development

Category: Articles (Page 86 of 258)

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

Project Guardrails: Provisioning Environments

This series of brief articles is made up of a few things I’ve learned over the last few years of running projects based in the area in which we (assuming you’re reading this coming from the same part of the industry I do 🙂) work.

If you’re just stumbling across this, the series is covering some factors that are important for a project:

  1. There should be no “design by committee.
  2. No one else other that the core development team should be able to provision development, staging, and production.
  3. No one should be able to write to production but the development team (and even then, there should be a deployment process).

I don’t really like making hard and fast rules like this namely because things change over time either by necessity or by more experience. This is why I like “guidelines.”

But at the time of this writing, these are the things I see playing out.

Continue reading

Project Guardrails: Design By Committee

When you’re contracted to build a solution for others – primarily on the web since that’s the area in which I work – I think that there are a number of factors that are important for a project:

  1. There should be no “design by committee.”
  2. No one else other that the core development team should be able to provision development, staging, and production.
  3. No one should be able to write to production but the development team (and even then, there should be a deployment process).

I’m always hesitant to make statements like this as they come off as dogmatic, but I find that the longer I work in this industry, the more I think these three rules are important.

Or perhaps they are really just guidelines. After all, there are shots called before we actually get stuff done.

Regardless of if they are more suggestions or rules doesn’t really matter. There are reasons that we all arrive at the conclusions that we do, right? And so over the next few posts (rather than one long post), I’ll share the reasons I’ve found these three rules to be important.

Continue reading

Latitude and Longitude in PHP: A Few Useful Practices

In previous posts, I wrote a good bit about working with the Google Maps API. Truthfully, I haven’t worked with it since that post.

However, I have had to work with latitude and longitude in PHP, and there are some practices that I’ve begun to use that I think can serve us well when working with coordinates or floating point values, in general.

In the following bit of code, I’ll break down the approach I’ve used and why I’ve done so. But I do want to be clear that if you’re reading this in relationship to the Google Maps API, there’s not much I can offer in the way of how this works and the current version of their API.

Continue reading

Developer Fitness: More Progress, My Devices, Apps, and What’s Next

About two years ago, I wrote Developer Fitness: Getting & Staying in Shape. There’s not a synopsis for that post other than this:

  1. I didn’t like where I was,
  2. I wanted to return to a weight at which I was happy,
  3. I did some work,
  4. I reached my goal.

In my early-to-mid twenties, I was a runner, and that was my primary form of exercise. I participated in 5Ks, 10Ks, and half-marathons, but as life changes so go our habits. Sometimes, at least. And that was the case for me.

So the motivation for writing the post two-fold:

  1. After being self-employed, working from home, and learning to adjust having two children around the house, I gained enough weight to be as heavy as I had ever been.
  2. I found that during the time I went from wanting to lose weight, I discovered a genuine interest in fitness. Granted, this looks different for each person, so perhaps it’s better to say that I have an interest in my level of fitness. Thus, I wanted to document what I’ve been doing and what works for me.

I’ve wanted to write a follow-up post ever since but the time never felt right as I was still figuring out what I wanted to write. But I’ve finally gotten to a point where I’ve learned enough, and I’m comfortable sharing more information.

A Short Disclaimer

But first, a few things:

  • Whenever a male writes about losing weight after having children, it’s easy to roll eyes and say “Yeah, but women have…” I’ll state it here: I believe women are the stronger of the two sexes (ask any of my friends how often I claim that), and I don’t mean to compare to imply anything other than that. I’m talking about something that happens to coincide when we had children and how I aimed to adjust my own fitness. Nothing more. 🙂
  • Fitness for those who work in our industry – or who have desk jobs – can be hard to come by. We work long hours sitting (or standing) at desks, and when we’re done for the day, the last thing many of us want to do is to get physically exert ourselves after the exhaustion that comes from thinking through problems all day. The thing is, this is not unique to our industry.
  • I’m not a health professional. I’m an average guy who has done some reading on some things and have began to understand what works for my body type. I’m not a personal trainer, nor do I claim that what I’ve used worked for me will work for you.
  • I do think there are certain things we can all do to help ourselves, more on this later, but whatever I do isn’t necessarily great for everyone else and vice versa.
  • Fitness isn’t a “reach your goal and finish.” It’s more something I incorporate into my life has become something I try to do every day (or as much as possible).

And with that said, I’m happy to share what I’ve done, the progress I’ve made, and my goals, but I also want to be clear that I know this won’t work for everyone.

Continue reading

Removing Git Commit History (Both Local and Remote)

Though most of us know we should never commit any sensitive information to a source code repository (be it Git, Subversion, or whatever), there are times in which it happens.

Most of the time, I imagine it happens whenever we’re working on code and then hopping back and forth between the IDE and a terminal and committing code to make sure we’re not losing any changes.

This happens long enough, and then we end up committing a consumer key and consumer secret or a username and password or something similar to the repository.

Luckily, we can remove commits to revert our code, but most source control systems end up keeping a history of everything (which is a good thing). But what if we need to go about removing Git commit history in both our local and remote repositories?

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑