Software Engineering in WordPress, PHP, and Backend Development

Category: Articles (Page 70 of 258)

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

It’s Easier to Find a Solution (With Someone Else)

One of the most frustrating aspects of programming is working on a solution to a problem and bumping up against something that we should know how to do or be able to figure out how to do, but we’re unable to do so.

There’s probably a proper psychological term for this or an acronym given that I’m talking about programmers. 🤷🏻‍♂️

Case in point:

Let’s say that I’m working on a project and it has to make an Ajax request. I get the response, I display it, and I also cache the response for 24 hours.

If the user requests the information again, I pull it from the cache, and it looks fine. But what about whenever you’re the first person to hit it in the next 24 hours?

That is, you get a cache-miss, and then you get not only a longer-than-normal request, but you also get a response that needs some additional processing before rendering it to the user?

Easier to Find a Solution

Reading this, you’ve likely got a laundry list of things you’d try to do. And I’d venture to say that everything you’re thinking is likely worth trying if not right.

Ultimately, that’s proving my point. And that’s this: When you’re not as close to the problem, it’s easier to find a solution.

Continue reading

Object-Oriented Programming: Understanding Interfaces

At this point, I’d say that the foundations of understanding object-oriented programming have been laid.

Specifically, I’ve covered:

  1. Abstraction
  2. Encapsulation
  3. Inheritance
  4. Polymorphism

And, yeah, there’s some debate as to what constitutes the foundations (that is, some don’t toss polymorphism into the mix though I do). But the above four should provide a solid foundation off of which to continue building your object-oriented programming skills.

There are more, but I don’t think they are as deep, detailed, or tough to understand as some of the aforementioned concepts. Then again, different things come easier to others.

Understanding Interfaces

At any rate, the next two topics that are important to understand are:

  1. Interfaces
  2. Abstraction

I’ll talk about each separate but make sure that you’ve read the Fundamentals series first because the above two topics will allow you to rely on them and take advantage of them.

Vague, I know, but let me explain and then go from there.

Continue reading

Starting 2018

For the first time in I can’t remember when I took ten days offline. Completely.

https://twitter.com/tommcfarlin/status/944345818034778112

To be clear, when I say “I took time offline,” I don’t mean that I took time offline regarding work. I mean that…

  • I deleted applications from my phone and my computer,
  • I signed out of accounts on my browser,
  • I took time off from work and all forms of social media,
  • I spent time focused on the things I wanted to focus on (versus had to focus on),
  • I spent my time with my family and on thinking through how the past year went and what I want to do in the coming year.

At this point, it’s normal to try to segue into a post about resolutions and but I’m not so much about resolutions as I am about goals.

And I’m not about prescribing goals for anyone but me, anyway. Though it’s common in our space to look back and reflect on the year and how things went, I don’t find posts outlining what we plan to do in the coming year.

That’s probably because it’s far easier to reflect than project (after all, we know less about what’s coming in the year at this point than we do at the end of the year, right?), I still like to spend some time trying to lay out a few goals.

Robert Burns wrote the famous quote:

The best-laid plans of mice and men often go awry.

But since we typically do posts about how the year went, why not write about what we want to do so that, 52 weeks or so from this post, we can look back on what was done, what wasn’t, the surprises, and the why behind it all.

Continue reading

Merry Christmas and Happy Holidays (From 2017 To 2018)

As with most in the United States (and elsewhere), I try to take some time off of work during the week from Christmas to New Years’. I’ve not always taken a break from social media, blogging, and all that stuff, but I think I’m going to give it a go this year.

Christmas 2017

That is, I’m planning to be off the grid as much as possible starting this evening.

To be clear, this isn’t prescriptive. This isn’t based on any dramatic anything. This isn’t even blogworthy, I suppose, but it’s worth having something here at the end of the year, right? 🙂

Further, I don’t do retrospective posts, but I thought it might be worth highlighting some of the stuff over the past year and perhaps what I’m looking to do in the coming year (not new years resolutions, per se, but just a few things I’d like to do).

Continue reading

Two Pillars of Object-Oriented Programming: Part 2 of 2

As I mentioned in the first post of this series, you’re often going to hear about The Three Pillars of Object-Oriented Programming. You may also hear about The Four Pillars of Object-Oriented Programming.

And it’s not that there’s a total of seven or anything like that. Instead, it’s more about what people consider to be foundational to OOP: Are there three or four major concepts?

You can surmise from the previous article (let alone the title), I believe there are four.

Two Pillars of Object-Oriented Programming: Inheritance and Polymorphism

And in this post, I’m going to cover the final two:

  • Inheritance,
  • and Polymorphism

If you’ve done any type of object-oriented programming prior to reading this article, you’ve likely heard of at least one of these.

Regardless, let’s take a look at each of them in more detail.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑