Skip to main content
 

Building from scratch in 2020

I've been continuing work on my recording life project. At this point, the questions are finalized, and I've been building the first version of the platform. The working name is Four Questions.

It's been a long time since I've built new software from scratch under my own steam. The first question I had to answer is: how will I build it?

I roll my eyes at people who are snobby about any programming stack: whatever is productive for you is the right choice. Of course, if you're running a new business, "productive for you" has to cover a lot of ideas: you need to consider if you can build stable, resilient code that supports a delightful user experience at speed, whether you can hire a great team that builds in that language, and what the infrastructure landscape looks like. But for a personal project, it's all fair game.

For this project, I've decided that I want to stretch myself a little. I don't want to build this stack in the same way I chose to build Known in 2013, or Elgg in 2003. Both of those were based on PHP, albeit in very different eras; it'd be a fast build, but kind of boring, and the hosting options are limited.

I started writing node.js code at Medium four years ago, and although my learning curve was steeper than I would have liked, I eventually fell in love with it. JavaScript has traditionally been clunky and ambiguous, but ES6 and ES7 turned it into a much more elegant, expressive language. The combination of these improvements and npm - which gives you instant access to over a million libraries - makes it a hard platform to beat. It's also incredibly easy to build automatic testing and linting with npm, including as a pre-commit hook into git.

I've also become a fan of more modern versions of React; we used it at Unlock, and I was taken with how easy it is to build genuinely reactive interfaces. The web has become a place to access applications as much as a place to access documents. A lot of older-style web apps, from earlier in this transition process, feel more like slightly interactive documents. React apps can be made to feel like a real application, with a minimum of development effort. If you don't want to build on the web using JavaScript, you do you, but there's nothing inherently wrong with it. And adding Next.js allows pages to be rendered on the server, reducing the time to largest contentful paint and allowing non-JS browsers (including headless browsers) to access the content.

To node.js, Next.js and React, I've added Material-UI, which makes Google's material design framework easy to access from React.

So now my biggest question is: what should I use as the database? I'm torn between using a straight Postgres database, something like a MongoDB, Firebase, or FaunaDB. The latter is completely new to me and seems to be designed for serverless architectures, so maybe I'll try that. I'll try it and report back.

There's a lot of choice out there, and no correct answers. The downside is that setting up your development stack in 2020 is significantly more time-consuming than it ever was. The upside is that you have more choice, more developer support, and friendlier tools than ever. It's a different kind of fun to old-school web development - my first web scripts were written in Perl, and this is a universe away - but it's still definitely fun.

If you're a developer, what are you using these days?

· Posts · Share this post