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

Sanitizing URLs in WordPress with Its API and Built-In PHP Functions

Working with user-centric fields in WordPress – such as input elements, textarea elements, or any type of field in which a user can supply their own values is a place that should always be a target of sanitization.

Sanitizing URLs in WordPress with Its API

Fortunately, the WordPress API provides a number of functions to help with this. Depending on your use case, you may need to do one of the following:

And those are all well and good but there are also ways in which you can work to sanitize the data using functions provided by PHP.

Sure, sometimes regular expressions are the way to go but, other times, you may want to use facilities that are built into the language, easier to understand, and easier to follow.

When writing my own code (and when reviewing others) I try to keep that in mind. So with that said, here’s a process that you can use that may make your efforts easier when working with URLs in WordPress.

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

Ship It or Die (With or Without Quality, Though?)

One of the ideas that intrigue me is the “ship it or die” mentality. Regarding what it’s called, there are variations thereof, but the idea behind the phrase is simple:

If you have an idea, get it from concept to product as quickly as possible.

Sure, the idea of getting to concept to a product may also be called “concept to cash” but there’s never a guarantee that you’re going to generate cash, right? There is a guarantee that you can get it into a tangible product, though.

And in software development circles, there’s always a lot that a person can argue for or against the idea. Off the top of my head, the two pros and cons that come immediately to mind are:

  1. Pro. Getting something done quickly that works and that [potentially] generates revenue.
  2. Con. Weak architecture, maintenance, scalability, testability, and so on.

In short, there may be a tradeoff between how fast you can get ship something for a market and the architecture behind the project. Sometimes there is, sometimes there isn’t. Generally speaking, though, I think it’s safe to assume the former.

Furthermore, some may see the former as the easy way out, some may see the latter as an exercise in YAGNI or, even more simply, that the problem can be addressed whenever it comes up.

But what does this have to do with anything at the moment?

Read More

Adding a Body Class Based on a Template

Working with templates in WordPress is something that’s not uncommon. Everything is a template of sorts – from the main page template, single page template, 404 template – all the way to custom templates.

Sometimes, though, you may want to apply a class to the body element based on the template that’s being used so that you can style this particular template a bit differently than the rest of the site.

Body Class Based on a Template

Though you can do it in a number of different ways, to do it we all have our methods so I thought I’d share mine.

Read More