Software Engineering in Web Development, Backend Services, and More

Category: Articles (Page 212 of 258)

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

Modular Procedural Programming The WordPress Theme Customizer

One of the things that I love about working with WordPress is the entire hook system – you know, the various `add_action` and `add_filter` calls that you can make in order to manipulate content prior to sending it up to the browser.

I think that it provides a really powerful mechanism for working content prior to saving it to. or retrieving it from, the database.

Now, to be clear, I’m not someone who thinks that everything should be object-oriented versus functional versus procedural. Generally speaking, I think that certain paradigms lend themselves to certain strategies more so than others.

Case in point: The fact that WordPress `functions.php` file is nothing more than a collection of functions is fine with me; however, I really like the fact that I can write plugins using object-oriented programming.

Anyway, one of the the things about the hook system is that it can result in writing repetitive code – which I’ll show in a moment – which can in turn make for very long, very tedious, and very redundant functions.

Or, more generally stated, it can result in less than stellar programming practices.

So when these situations arise, I try to look for opportunities that help to keep functions lean, but yet maintaining a purpose, as well as easy to follow. I think it pays off significantly when it comes time to read back through the code, maintain the code, and to document the code.

Continue reading

Fear The Publish Button (For Your Words and Your Code)

For aspiring bloggers, one of the things that we often hear in podcasts, read on other blogs, and in other articles is “Don’t Fear The ‘Publish’ Button,” or we read “just hit ‘Publish!'”

I get the idea behind that mentality – it’s mainly motivation for saying that nothing you write will ever be perfect, so write, hit publish, and you’ll get better as you go.

Embarrassed By The First Version

Embarrassed By The First Version!

There’s a lot of truth to that – you do get better as you go – but I think that this advice (any advice like it) should be taken with a grain of salt.

In fact, I’d go as far as to say that if you don’t have some type of healthy fear associated with hitting the publish button, then you may later regret some of the material that you’ve published.

Arguably, there are a lot of parallels in writing a blog post as there are to writing code: Publish too soon, and you have something that isn’t worth reading or using; Wait too long for complete satisfaction and you may never end up releasing anything at all.

Publishing a blog post, just like publishing code, is something for which you should have a healthy fear.

Continue reading

The CSS Single Responsibility Principle

In software development, there’s this set of principles called the SOLID principles. As with most things in computer science, it’s yet another acronym in which each letter stands for the following:

  • Single-Responsibility
  • Open/Closed
  • Liskov Substitution
  • Interface Segregation
  • Dependency Inversion

Though these ideas are geared towards software engineering and object-oriented design, there’s one principle that I think is relevant to front-end web development (well, actually a few but I digress for now).

Specifically, I think the idea of the single-responsibility principle is applicable to CSS – namely, within the popular LESS and Sass preprocessors.

Continue reading

On Open Source Entitlements: Users

This post is part two of two on a series of open source entitlement.

In the previous post, I mentioned that working in the world of open source has the potential for others to feel a sense of entitlement. The thing is, I don’t believe that this isn’t limited just to contributors.

Granted, I don’t think those who end up using free and open source software aim to present themselves as being entitled – I mean, they are taking advantage of the software that contributors have made available, right?

But the flip side of this is that users who find themselves working with open source software set expectations that may far exceed the amount for which they paid for the software.

Continue reading

On Open Source Entitlements: Contributors

This post is part one of two on a series of open source entitlement.

One of the challenges that comes with working with and using open source is the danger for it breed a sense of entitlement.

For the most part, I don’t think those get who involved in open source software aim to become entitled – after all, building open source projects is a labor of love, right?

We spend our time that could be spent doing other things volunteering to work on something that we’re passionate about, and that we believe will help to make the world (or at least a few people’s lives) a bit better.

But the underbelly of this is that people who find themselves involved in open source either as contributors or as users end up acting entitled from time-to-time.

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑