If you haven’t read Part 1, you may want to backtrack a bit and give it a glance, for the sake of context… Or not. Totally up to you. 🙂
Alright, we’ve got the site up. Everything seems to work like a real web page. What else is there to do? It works now, it’ll work later, right?
Look, it’s hard to break a lot of this stuff down without getting verbose and boring, so I’m going to do my best to help boost the mood, whilst explaining, via webcomics and memes. Just about every piece of software you’re using, websites included, look something like this underneath.
Did I also mention I really don’t know what I’m doing? Cause yeah, I definitely don’t.
I’ll get this out of the way and let the world know that this site is run on WordPress, not the service (WordPress.com) but the software (WordPress.org). That may or may not get me some flack as for many it’s seen as a platform for “non-developers”, which to a certain extent it is, meaning someone with little to no coding skill could get a reasonably OK site going while writing next to no actual code. However, the flip side, and the true reality of it is that it’s just another PHP based CMS (Content Management System), just like Drupal or Joomla. It also happens to be the most popular, and therefore, well documented CMS out there. So while not writing any code and getting stuff done is absolutely possible, the only real way to get the most out of WordPress, or any CMS, is to write lots and lots and lots and lots of code.
I’ve never counted (and who would?), but there AT LEAST 10,000+ lines of custom code holding this site together, and it’s growing every day, which is something I’ll dig into here in a bit. But suffice to say, WordPress is a developer’s platform just as much, if not moreso, than a designer’s platform. Toss in the fact that admin panel is familiar and fairly user friendly for the other folks at Dancakes, who are just writing posts and creating products for the store… It was pretty much a no-brainer for me.
That’s to say, programming languages aren’t forgiving, and while computers are “smart” they’re also incredibly stupid, unlike humans they can’t infer or assume meaning, you have to tell them exactly what to do and exactly how to do it. This is the reason self-driving cars seemed just around the corner for so long and only recently we realized it’s WAY harder than it looks. Because computers are terrible at improvising, and if they do it’s only within specified parameters. Humans on the other hand are surprisingly good at improvising in situations they’ve never encountered.
Do you even remember what we were talking about? Oh yeah! Copying and pasting code. So, while the fact that I was copying and pasting a lot of the code on this site, I really had no clue exactly how or why most of it worked, or didn’t, and that can definitely lead to some “interesting” problems to say the least. I would look specific things up that I was trying to do, find some code snippet that claimed to do what I want, or said it would do something cool like make the site faster or whatever. Sounds great! Ctrl+c & ctrl+v away!
You do this a few dozen, (let’s be honest) probably hundreds of times and you end up with, what one might call… A bit of a clusterfudge. Did I mention I had no idea what I was doing?
Somehow it all worked reasonably well (no clue as to HOW), far better than the old site, but at a certain point after reading thousands of pages of documentation and blogs and stack overflow question some of this stuff started making sense. And once you start to (barely) understand what you can do, and the logic and flow of exactly how you can do it, well, that’s when the gears in your brain start turning. Ideas, ideas and more ideas! And a whole whole lot of, “Holy crap, what the hell was I thinking when I put that in there?” as I methodically rip out nearly all of the old code holding this site together (nearly the entire original codebase is gone at this point). I fully expect (and hope) that in 6 months time I’ll be thinking the same thing about the code I’m writing right now.
Lest we forget that code isn’t the only thing we’re managing here, our VPS is completely self managed, one more notch to add to my belt… I guess?? When I first built this site I used Google Clouds nifty “Click to Deploy” that creates a VM with WordPress, Apache & PHP already installed. It’s a great tool if you’re just starting out and wanna dip your toes in the VPS waters. But just like every other pre-built solution, it never does everything you need, exactly the way you want. And eventually you’re going to throw your hands in the air and wave them like you just want to hit the “Remove VM” button and start all over again.
Anyways, I feel like the story is getting lost here a bit and I’m just describing web servers and stacks. Short story long, just like everything else in this process it looks nothing like did at the start, and it will continue to be a wondrous tedium into the next phase.
OK, so wrapping up here. What’s the moral of the story here? Is there a moral? I have no clue, I’m just kind of rambling on about the process and/or journey, and it’s been a very strange one. I’ve been asked more than a few times what I enjoy about doing development work, and I’ve had some time to muse on it, and the best answer I can come up with is that I enjoy the creative logic of finding a solution to a problem and at the same time bending a piece of software or a machine to my will.
It doesn’t always work, and it definitely never works exactly like I expect, and by the end of it I sometimes feel like I’m just flailing around hoping against hope that it’ll work.
So I guess it’s a lot like jazz, but more listenable.