Programming is different from a lot of other creative endeavors because it feels good when you expunge your recent work. If I’m editing my book and I realize an entire passage is redundant, I don’t enjoy killing it. Without an editor pushing me, I might even leave it in. Same goes for when I’m making music. If I lay down a bass line and later realize it’s just not working, I don’t get a thrill from canning it. Likewise for texture maps and 3D models. If it’s something I made recently, then I hate to get rid of it.
For contrast, if I come up with a shorter, clearer, more elegant piece of code, then deleting the old code is pretty satisfying. Sometimes I get caught up in the desire to make the code as small as possible and mess around with small details that don’t matter, just because it feels good to have something happen in five lines rather than six. (It only counts if I’ve really simplified something. If you take the complexity of line #6 and add it to line #5 than you’ve made the code shorter, but not simpler. And you may have made it a little more convoluted, which is worse.)
For those of you browsing the archives from the futureI do wonder why you’re browsing the boring “Notices” category, but that’s your business., last week the site looked like this:
I’d planned to just do a small update. There were a bunch of little annoyances that had been eating at me for months and I wanted to fix them. The RSS links were a little hard to read due to being small blue-on-black text. The Twitter rollout was crooked. Sometimes blockquotes and other enclosed text would use the giant red drop cap, which is only supposed to happen at the start of a post. There was an annoying horizontal scrollbar that would appear at certain screen widths. You could only see the link to the forums if you were browsing on a desktop at 1080p or more. It was hard to read mouseover text from a mobile screenThe mouseover text is now automatically visible in mobile view.. And so on.
But then my site went down. I spent about 24 hours watching the CPU gauge bounce up and down between 96% and 100%, which really got me thinking about performance. You might remember that last January I was trying to figure out how much load my site puts on the server. WordPress themes are not created equal and a badly-designed theme can consume an order of magnitude more power than a good one. I like knowing about resource usage, and since I moved to my new webhost I now have the ability to monitor things like CPU, memory, and bandwidth usage. I’ve been wanting a feature like that since the early days of this site.
For those of you reading the archives in the future, I have changed this site to look like this:
Yes, this is a very dry theme. This style was all the rage a couple of years agoThere’s a built-in WordPress theme that features this exact style of layout. It’s called “Twenty Fifteen”. So if you’re following what the hip youngsters are doing in web design, this layout is a little out of fashion.. I set things up this way because this layout is fairly trivial and I was able to throw it together in a couple of hours.
In the process, I completely gutted the code that runs the site. (Yes, I use source control. Don’t worry. Nothing was deleted for good.) This theme is a fraction of the size of the old one. I deleted much more than I wrote. This theme has accumulated a lot of cruft over the years. Unused CSS. Redundant PHP. Superfluous SQL queries. HTML clutter. I’ve never made PHP code that I found to be beautiful, but this code is probably the least ghastly PHP I’ve ever written.
I think that what we’re left with represents the bare minimum of features required to make this site go. We’ve lost the rotating backgrounds, the thing that shows off popular posts from the archives, the big links across the top, and a bunch of other stuff. I doubt the raw HTML is all that much smaller, but it’s created using a fraction of the lines of code and about a dozen fewer database queries for the front page.
My plan is to see how this theme performs during busy periods. Once I get some sort of baseline measurement for resource usage, I can start adding bells and whistles until this looks like a videogame site again.
So What’s New?
I’ve added a feature to do a “boxed quote”. Sometimes I want to break up a giant wall of text. The most obvious way of doing this is to insert an image. But sometimes an image is overkill. Or it will end up too close to a later image and drown out the text. Or there isn’t a contextually appropriate image to go with the topic at hand. In these cases, publications often toss in a boxed quoteI’m not sure what the real print media lingo is for this concept. I thought it was “pullquote”, but that seems to be something else..
[quote|Like, how am I supposed to know what parts of my article are worth quoting? It makes it look like I’m broadcasting that I think I’ve said something clever.]It wasn’t until I added this feature that I realized how odd it is to use on your own material. Choosing a good quote to fill the box is something an editor normally does for you. But I’m my own editor, and it feels vaguely narcissistic to put my own quotes in boxes. It makes it look like I’m broadcasting that I think I’ve said something clever, and announcing your cleverness is a great way to undermine it. It’s the print equivalent of going, “Did you see what I did there? Huh? Did you? Pretty good, right?”
So I dunno. Maybe I’ll be too self-conscious to use it. On the other hand, inserting a boxed quote requires way less effort than finding, sizing, saving, uploading, and embedding an image. So perhaps laziness will prevail and you’ll see these things all the time.
For the record: A lot of site features aren’t enabled on small screens. There’s a boxed quote in this article, but if your screen drops below 1440px wide then the theme hides a bunch of details to save space.
As always, let me know about any usability issues you have.
EDIT: After I made the theme live, I was hit with another botnet attack.
Yes, I know my site is still down / running slow. This is what it's looked like for the last 12 hours. pic.twitter.com/o2OQjmTxfe
— Shamus! Young! (@shamusyoung) August 21, 2018
Which means that a lot of the feedback is muddled. Maybe the reply system is malfunctioning because of the new theme, or maybe files / transactions are getting lost in the deluge. How annoying.
Last night I wrote a twitter thread about the attack. Here’s the start of it:
Since my site is down, I'll just continue blogging via Twitter. Here's where we are now:
A botnet is trying to brute-force the password on my site. I've removed the login page so it's a waste of time, but the flood of traffic is still choking the site.
— Shamus! Young! (@shamusyoung) August 21, 2018
 I do wonder why you’re browsing the boring “Notices” category, but that’s your business.
 The mouseover text is now automatically visible in mobile view.
 There’s a built-in Wordpress theme that features this exact style of layout. It’s called “Twenty Fifteen”. So if you’re following what the hip youngsters are doing in web design, this layout is a little out of fashion.
 I’m not sure what the real print media lingo is for this concept. I thought it was “pullquote”, but that seems to be something else.
Good Robot Dev Blog
An ongoing series where I work on making a 2D action game from scratch.
A programming project where I set out to make a gigantic and complex world from simple data.
Juvenile and Proud
Yes, this game is loud, crude, childish, and stupid. But it it knows what it wants to be and nails it. And that's admirable.
A horrible, railroading, stupid, contrived, and painfully ill-conceived roleplaying campaign. All in good fun.
PC Gaming Golden Age
It's not a legend. It was real. There was a time before DLC. Before DRM. Before crappy ports. It was glorious.