What’s the Purpose of a Boilerplate?

Regardless of the library, framework, or code with which you work, you’re likely going to encounter the concept of a boilerplate at some point.

There are a handful of them for WordPress, right 🙃?

But it seems to be an increasingly popular trend that people are creating more and more boilerplates, which isn’t inherently a bad thing, but that there may be confusion as to the purpose of a boilerplate.

The Purpose of a Boilerplate

Photo by NeONBRAND on Unsplash

So, as defined by Wikipedia (which I think offers a great definition):

In computer programming, boilerplate code or boilerplate refers to sections of code that have to be included in many places with little or no alteration. It is often used when referring to languages that are considered verbose, i.e. the programmer must write a lot of code to do minimal jobs.

But notice there’s a phrase that should not be missed. Specifically:

…that have to be included in many places with little or no alteration.

And in some observations I’ve seen within the WordPress economy, at least, boilerplates seem to require that code be removed, modified, or stripped away rather than simply included or added.

That’s what I hope to clarify.

Read More

Using the Registry Pattern in WordPress

I’ve had a few conversations with various friends and others on Twitter about the notion of global variables in programming languages. For those who are new to programming or who are unsure as to why they are bad:

The use of global variables makes software harder to read and understand. Since any code anywhere in the program can change the value of the variable at any time, understanding the use of the variable may entail understanding a large portion of the program.

This isn’t to say they don’t have their use, but if you’re interested in object-oriented programming (especially in a WordPress setting where you’re going to be using PHP), then it’s important to understand some better alternatives than global variables.

That is, there are ways to work with passing data around your application without the need for global variables. And one such way is the registry pattern.

Read More

Musing on Modern Package Managers

I was recently talking with a friend about all of the available tools that are on the market for us today (some free, some open source) that help us with our development needs.

Modern Package Managers: Yarn

These include things like:

Of course, each of the above is not necessarily comparable because some are front-end tools, others are backend tools, and there are some that offer a hybrid of sorts.

Further, some are premium, some are open source, some appear to be abandoned, and some have even lead to broken build processes.

This leads to a series of questions several of which I’d like to cover. So here, if nothing else but musings on modern package managers, are the things about which I’ve been thinking.

Read More

What’s The Simplest Thing That’s Needed?

There’s a quote often attributed to Albert Einstein that I quite like (and I’m sure most do):

Everything should be made as simple as possible, but no simpler.

There is some investigation as to if he said it or not, but the point remains regardless of who said it.

The Simplest Thing Possible: And No Simpler

It’s easy to take this idea and apply it to things that we do in everyday life that we don’t want to do, right?

  • I don’t want to clean my room, so I’ll tidy it up just enough.
  • I’ll do just enough work to satisfy the clients, and that’s enough.
  • I’ll fulfill [whatever responsibility] the to [lowest degree possible] and because Einstein [allegedly] said it, who am I to argue.

Even though I don’t agree with it (and the discussion for that is outside the scope of this post), I do consider this idea within the context of web development.

And to be clear, I’m not talking about web design. I’m not a designer. I don’t want to speak on behalf of something of which I’m not a part. But regarding providing solutions for people using software or, rather, web development, I’m far more inclined and positioned to talk about this.

Strictly speaking, I find myself often wondering if we’ve made web development more complicated (and why we’ve done so) and if using the simplest thing that’s needed is all that’s really needed when building solutions for others.

Read More

Tools, Processes, and More for The Independent WordPress Developer

One of the things that the Internet has made possible that we couldn’t have seen even a decade ago is the proliferation of self-publishing that would happen.

And in this instance, I’m not talking about blogging. I’m talking about self-publishing in the form of eBooks and the like. I mean, looking at anyone with a Kindle that has targeted advertisements (I had a previous version like this), you can see offers for books that are being published by those who have no publisher other than themselves.

I’m not here to argue whether or not that’s a good thing or a bad thing, but it is a thing, and it’s something that I think is worth looking to especially in our space.

The Independent WordPress Developer: Tonya Mork

I mean how many people do you know that have self-published material in some way? Off the top of my head, I know Tonya Mork has published material as has Chris Lema.

The Independent WordPress Developer: Chris Lema

It’s kind of neat. And I suppose this is the part where I’m supposed to say something like:

And coming in just a few weeks, I’m going to have my own eBook published!

But that’s not [exactly] where I’m going with this. Instead, I want to talk a bit about memberships on this site and what we may call the independent WordPress developer, the independent WordPress freelancer or the indie WordPress developer or whatever term you like the most.

Read More