This site is boring

Nov 16, 2020

I've always had trouble with writing long form. I hear my voice reading what I write and I take the fingers off the keyboard.

"Is that really a good sentence? Do you really say it like that? That doesn't sound like me".

The best way to practice would be to actually start writing more, and more often, which is what I intend to do from now on. Or at least try.

To motivate myself I wanted to create something of my own, something that would motivate me to write. I could see myself loathing to write when I had to do it using WordPress or another blog engine. Using markdown to create a static site using Next.js or Gatsby is just plain boring. I've been using Next.js at work for almost 2,5 years and when I start to use something at home that I already use at work it feels like a chore.

So I decided to write my website from the ground up, with a hand-made CMS.

A screenshot of my CMS


I'm sometimes ashamed of how bad I am at mental calculation. As a kid I had a hard time learning and conceptualizing the basics which has left me to believe I was terrible at math. It followed me through the teenage years and even now when I'm an adult I can choke when I have to do simple multiplications. I sometimes have the same feeling for programming.

Early in university I was terrible at programming. Understanding the concepts, connections and the mental model. Having a CS professor as a program leader meant we had a lot of programming in the curriculum. I would often copy my classmates answers for individual assignments. I thought it would never click for me and I just accepted that I would at most be mediocre.

Out of boredom I would sit with assignments on weekends, often hours on end, just forcing myself to understand what each thing was doing. It didn't make sense and just felt like a pain.

One day I decided I would stop just trying to understand what I was reading and just do. Create a project and just see what I could stitch together, it didn't matter if I understood it. Looking back at it now I can see what I happened: I stopped looking at programming as math and started using it as a design tool.

It was like pulling the bathtub plug - I was flying! The assignments felt much easier and I even started coding for fun and participated in hackathons. After a while my professor saw the progress I made and asked me if I wanted to assist in the Java lab.

But I can't program, I'm just a fraud. I just take bits and pieces and put them together. Since you got paid for correcting assignments I said yes anyway.

By being a tutor I often had to explain programming concepts to other students and I could feel their struggles. It was the exact same that I had had. So I did my best explaining programming as a design tool. Sometimes it felt like someone else was talking when I instructed, where did I learn all that? By taking a step back and explaining things to others what I knew I could feel how I grew in confidence. I know this!

When I wrote this website I wanted to do the same; take a step back and reflect on the things I actually know. I wanted to remind myself that you don't always have to be out there in deep waters, feeling like someone else is leading.

So I picked a really boring tech stack, tried to limit the dependencies and stick as close as possible to the metal that I could. This is what I ended up with:

Node 12 and Express.js
I decided to go with regular, uncompiled javascript. Javascript is my main language and I didn't feel like spending a lot of time configuring webpack or rollup. All pages are server rendered and the static assets are handled with sirv (except for blog post images). The CMS (that I made) where I write the posts use regular cookie sessions.

Eta for templating
It's pretty new but has a lot of similarities with EJS. No React in sight.

I'm used to use Prisma when interacting with databases but the Rust binary in Prisma didn't work with my hosting provider. So it got even more boring with plain string queries insted.

I do have some css-variables and dark mode. Otherwise it's just a straight up all-in-one css file.

It's my own javascript framework for doing DOM manipulations. I mainly use it for form submissions and CSS class toggling. It's very useful when when you do server rendering and want to add some interactions. I import Embroidery as a module and no code goes through a compiler.

It will probably never be open-sourced. But hopefully I will continue to write.

- Anton