Software Engineering in WordPress, PHP, and Backend Development

Tag: Software Development (Page 11 of 20)

WordPress-Focused Continuous Integration with CircleCI

Writing about continuous integration or continuous deployments seems a little funny to me given that I’ve done this before and given that I know a lot of developers already use this as part of their day-to-day.

But I also know that there are a lot of hobbyists, beginners, and those who are just starting out who are looking for ways to make sure they are setting up solid practices for their work.

For what it’s worth, it wasn’t until I started working with a few more people that we began to incorporate a wider set of tools in our deployment process.

And that’s the purpose of this post.

That is:

  1. introduce the whole idea behind WordPress-focused continuous integration,
  2. introducing CircleCI,
  3. getting ready to chat more about it.

With that said, here’s the run down on all of the above.

Continue reading

How To Use GitHub PR Templates

If you do any work – regardless of if it’s open source or closed source – (though I know most who use read this site are involved in open source), you likely use some source control, and it’s probably GitHub.

For many of you, you either follow a project, contribute to a project, or handle pull requests to a project. And what about those projects that you work on with a team?

Perhaps your workflow is something like this:

  • you create a branch to work on a feature,
  • you push the branch to detail the work you’ve done for a peer to review,
  • the review is merged,
  • you carry on.

But what do you put in the template for the pull request? Is it the same every time or is it different? What about if the content of the PR is related to something in Trello, Asana, Basecamp, or some other project management system?

That’s where GitHub PR templates come into play.

Continue reading

What’s Too Much For Passing Data via Dependency Injection?

The topic of dependency injection is one that’s been around for some time in object-oriented programming circles. Sometimes we see it in WordPress; sometimes we don’t.

I’m a fan of it but, honestly, though, I’m not always sure how much information to inject into a class. I mean, let’s say that we’re given two classes, and one holds information the other needs.

  • Do we inject no class into another class?
  • Do we inject only a piece of information (be it a string, integer, data structure, or whatever) into the other class?

I don’t think there’s a hard and fast rule for this, but it’s probably safe to say that it’s better to inject just the data you need. But then this raises a question of how do prepare the data to inject into a given class?

  • Do you create a method in one class and pass it into another?
  • Do you pass a piece of private or protected information into it?

Then again, I think it depends on if anything has to happen to the information before it’s passed into a class.

Anyway, I could go back and forth on this for the rest of the post and never come to a conclusion so why not work through some source code until there’s something reasonable.

Continue reading

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

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

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑