Site Overhaul (and written in Go!)
I've finally decided to flesh out my personal website. Many years ago, butlerpc.net was a custom PHP site with a WordPress blog, then a simple single page overview, and then it was reduced to basically a digital business card.
Over the years when I stopped the blog, I tended to just put random things on gist.github.com, for my own reference but also for others. Some of these gists actually got picked up by search engines, so I feel that it's time to maintain a personal blog once again.
PHP has always been my strongest programming language; since I have had so much professional work revolving around PHP, I can do pretty much anything with it, and quite fast and efficiently. However, for personal development I have decided to redo this website in Go! It turns out that Go is actually very well suited even for personal websites — even though it is a compiled language, it has a great number of time saving syntaxes and developer workflows that can make it almost seem like one. Plus, it's super fast and memory efficient, and will be a great learning experience for anyone.
This is a fairly simple site right now, so there is not much to talk about. But for the basics, the
top navigation is htmx "boosted", which basically means that the HTMX framework (a 46 kB file) listens
for events on the top nav anchor tags. It intercepts clicks and looks at the href, performing an AJAX
GET request at the given URL. Then it simply swaps the whole
<body> DOM element with the body of
the response. However, it does this intelligently (I assume), keeping any element attached event handlers and likely
skipping elements that haven't changed. This means that my backend basically assumes that every page
sprinkled in as needed, following progressive enhancement techniques.
This article, and all articles on this blog, were written without the use of any AI, GPT, or Language Learning Models. It's old fashioned I guess.