I used to do a fair bit of frontend development in my spare time, but in recent years it's been increasingly difficult to find the time and energy to do so.
Today I wanted to make some changes to the CSS of my website. I've got a repo for this that I set up a few years ago. I run gulp, make some changes, everything gets built and minified and I copy the resulting CSS file up to the server. Job done.
Except, this time, it wasn't so simple. Here's what happened.
Trials and frustrations
I go to my local copy of the repo and run the usual gulp command to get everything up and running. Except that doesn't work. I get an unhelpful error that doesn't seem to be referring to any of my code.
After a quick search online, I find out that my version of gulp isn't compatible with my version of node. I upgrade node locally and try to run gulp again. A similar but different unhelpful error appears.
At this point I remember that the task runner in this repo is pretty out of date. It was written quite a few years ago, partly by a friend of mine, and although I've updated it once or twice over the years another update is probably way overdue.
So I update everything, all the packages, gulp itself, everything. And I run it again. And it still doesn't work, for a new reason.
Turns out I've upgraded gulp to a new major version and that involves a lot of changes. Some of the basic syntax has changed. I wasn't that familiar with it in the first place (as I said, a friend of mine did a lot of the initial work on this) but I struggle through a few tutorials and manage to fix the syntax.
Then I hit another problem. Some of my gulp tasks aren't signalling they're complete. Apparently this used to happen in gulp 3 automatically, but not anymore. So I do some more digging, get more confused, and fail to solve the problem.
At this point I'm so fed up with the whole thing that I decide to start over. This all started because I upgraded node, so if I downgrade it and downgrade gulp back to version 3, maybe it'll all work and I won't have to make changes to my gulpfile that I don't understand?
And of course, that didn't work. I now have a new error, which again I don't understand.
At this point, I'm feeling pretty depressed and my confidence in my abilities has dropped massively. Despite my many years of experience as a frontend dev, I feel like I have no idea what I'm doing. It's been nearly an hour since I set out to make some minor changes, and I've yet to even write a single line of CSS.
How did frontend development get so complicated?
My example is very small (Hackernoon has a much better article on the complexity of being a frontend developer) but this problem isn't going to go away by itself. If I want to make changes to my website, using the repo I have in its current form, I'm going to need to re-learn how to write gulp. Or maybe I shouldn't be using gulp anymore? Maybe there's something newer, and better. I have no idea.
I remember when frontend development was much simpler. I remember when things like task runners and frameworks and all these other things started to appear, and the promise and excitement they brought with them. Look at what we could do! the future seemed to say. And then it all got complicated and full of too many options.
The problem seems to be that frontend developers are a whole mixed bag of people. We're fickle. We're zealous. We like what someone else is doing, but that gave us a great idea for something we could make that's better. We used to like doing things one way, but that got too complicated so let's start over with something new.
There's a lot of creativity in the world of frontend. But there's also a lot of shiny whiney - chasing after the next new thing and complaining about the old things. So we end up with not one or two ways of doing things, but dozens - and the noise is deafening.
I'm probably beginning to sound to you either like a wise old man or a rambling dinosaur. I'm okay with either, because I've made a decision. I'm not going to care anymore.
Realistically, I don't need a task runner for the thing I want to do. I just want to write some CSS, test it and minify it. So that's what I'm going to do, even if I have to do it manually.
And when I next need to build something complicated, I'm going to look carefully at the requirements, and ask myself some questions. Such as, is there a way of doing this that doesn't rely on the current cool frontend technology? Can I just build something using HTML, CSS and Javascript, and stop having a hundred dependencies?
The answer might be no. But I'm going to at least consider that before committing myself to a technology that might break at some point because someone decided to change how it works or drop support for something I've been relying on.
I'm pretty tired of that. Aren't you?