Today everyone knows how to build a website. It’s easy really. Just pick a framework, slap on some stock pictures, add jQuery plugins, some text, and boom! You have a website. But what happens when you eschew the big frameworks and CMS’s in favour of a blank page and the one tag to rule them all:
You realize just how fragmented your knowledge of this thing called the World Wide Web really is.
Backing it up
Let’s back it up a bit and talk about why we’re here.
Recently I decided to build a program to help me catalogue my massive collection of books. Two thoughts occurred to me: this should be a website, and I should use WordPress. After all, I love WordPress. Upon further inspection however, it became very clear that one of those thoughts was very, very wrong. For this problem, WordPress was not the answer. It simply didn’t make sense – why would I go through all the trouble of an entire blogging CMS platform, complete with user management and the like, and add on a platform that has very little in the way of user information storage requirements?
So after slowly backing myself into a corner over nearly 10 years of WordPress development I tossed my beloved CMS aside and saw the web development world as it really is: a cluster**** of frameworks being held together by the universal glue that is jQuery. With my eyes open for the first time I set forth upon the road to the WWW, dodging Django-sized potholes in my search to answer the all important question: How the hell do people build websites nowadays anyways?
The fact that I was asking myself this question was quite startling. After all, I’ve built tons of websites for paying customers, myself, friends, and family. But my present circumstance brought forth the realization that I had gotten into the practice of making every problem into a nail happily hit home by the hammer that is WordPress. Over the years I had forgotten my humble beginnings with square brackets in notepad, and widgetized DotNetNuke sites (may it rest in peace).
For what felt like the first time I had to include jQuery myself.
I consider myself a web developer, yet the notion of starting a new website from scratch without a CMS unsettled me. It’s a feeling akin to going from the world of desktop computers with their massive API’s, library’s, and environments down to an Arduino with 2kb of RAM and 8kb of program space. All of a sudden you need to get back to the fundamentals and remember how it is that you go about doing fundamental computing tasks. Not only do you need to remember how to start from scratch, but it opens your eyes to all the things you took for granted.
This is the part where you become a better programmer
As it turns out going back to the basics was exactly what I needed. After building my pet project I came back and pulled my own website up in Firebug. What I saw chagrined me deeply. I couldn’t believe I loaded a third party library from all the way across the internet for that. For what you ask? It doesn’t matter. It was something that any programmer with a brain could have written themselves, yet I had found a free and simple plugin that saved me from having to do it myself.
What I once considered standard operating procedure for a programmer under the incessant constraints of time now made me cringe. How on the earth had popular programming gone from a science to an open source puzzle with the pieces freely available online? (Spoiler alert: the picture in the puzzle is the poop emoji.) In fact, I was reminded of how a developer pulled a 17 line package from a popular code repository, and broke almost everybody’s builds.
The answer from my current position seems obvious: As developers we have gotten way too complacent with freely available code. It’s now just too easy to grab code from almost anywhere and stick it into your own website/program/app, moving on without a thought. The problem however, is that these decisions often times have non-obvious consequences that, without taking two seconds to consider them, turn into little bug-investment-accounts. Accounts that pay dividends in the form of downtime, and wasted time asking the eternal question: What the hell went wrong?
This is an easy trap to fall into, but I beg that you look at your own programming practices and examine them for these little pitfalls you’re baking into your projects. Next time I urge you to take a couple moments and strongly consider whether to write something yourself or use whatever is already available in the wild. Sure, frameworks, CMS’s, and libraries have their place, but they should not be defaults.
Plus, you might just make yourself a better developer.