Is golang better?
By
I built a static website builder three times in three different languages. Let me explain.
I like making my own tools. It’s often easier to craft something for my specific needs than to learn someone else’s tool made for everyone. I decided to do a little vibe coding experiment.
It started with nodejs
I made a tool called “Sniplicity” back in 2011 (the name combines “snippets” and “simplicity”). It was designed to be the “anti-template” solution. It used commands embedded in HTML comments. You tell it to “copy” and “paste” commonly-used bits of HTML across your website. Navigation, footers, etc.
You could also define variables, add basic conditional statements, and include files. It was a lightweight augmentation to vanilla HTML/CSS/JS. I wrote it in JavaScript as a node.js command line tool. I’ve used it for years to build a dozen or so production websites.
Recently, I wanted to extend it. I decided to revamp it as an excuse to evaluate some AI coding agents and try to vibe code the whole thing.
The Python experiment
I rewrote it in Python using Claude Sonnet 3.7 and later 4.0. I forced myself to only vibe code it, no digging in the code. I told Claude to copy the features and logic from the nodejs version. It took a few days, but it worked.
I added features that had been nagging me for years. Markdown support, new build commands, and a few improvements.
But it was slow and Claude made code that broke in subtle ways. It was frustrating, especially since I committed to not touching the code myself.
I even tried making a desktop app using the python script. This is where it started to sour. I abandoned that side project and just used the command line version.
The Go experiment
A couple weeks later I rebuilt it in golang. I chose golang because it compiles to a single executable and has a huge standard library. No shopping around for 3rd party modules like other languages (I’m looking at you nodejs).
Claude Sonnet 4.0 (and later 4.5) cranked out go code fast, clean, and error-free. The go compiler is extremely picky. It refuses to compile things that other languages would just warn about. It forced Claude to code well.
I added more command line options, a built-in test server, automatic img tag sizing, templates, file indexes for blog listings, a web-based project manager UI, and project config files with a GUI editor interface.
I even built a feature that “bakes” color-based css filter effects into svg files to avoid Safari’s annoying habit of pixelating and blurring svg files. Really niche but I’m super satisfied with it.
Today I had Claude expand the file import feature to recognize csv files and convert them into tables so I could comfortably edit larger tables in Google sheets.
Results matter more than preference
Go was never my favorite language. I appreciate its design and utility, but I don’t like the structure. I dislike having it break a compile for what can be a simple stylistic difference. But the AI loves it. The compiler keeps it in line and the code ends up readable.
Compared with Python, Claude building with golang was 5x faster and ended up with better code.
What did I learn?
- My language preference isn’t necessarily what’s best for an AI
- Golang is worth looking at, especially if you’re working with an AI coding agent
- Vibe coding can work but you have to know what it’s doing wrong to help it succeed when it gets stuck
- The AI will happily hand code vanilla stuff that I would find tedious so I can avoid having to include 3rd party modules if I wish
- Given a fast implementation time, I’m my own worst nightmare: a crazed product manager who adds features on a whim