Now with Django!

Please let me know if anything on any of my web sites doesn’t work, or looks bad!

It’s likely there will be problems, because I’ve rebuilt all of the sites using a different technology, Django. Mostly this was forced by the technologies I had been using gradually succumbing to bit rot. However, it also enables some improvements that were previously impractical.

New site

In the Cells of the Eggplant, which had been buried in the depths of Meaningness, now has its own site—the one you are reading now! As I wrote last summer, it needs a different web presentation, because it has a different audience and a different conceptual “shape.”

I’ve based the “look and feel” of metarationality.com on the hypertext book Crafting Interpreters, which Brian Slesinsky recommended as a model (thanks!). It’s a good match for the readership, I think?

Crafting Interpreters has features I didn’t copy, but hope to eventually incorporate here. One is sidenotes (rather than footnotes) on wide-enough screens. This is something I’ve wanted for more than a decade. Some of the weirdness of the look & feel of Meaningness is due to my leaving space for sidenotes, which I never quite got working.

It turns out that web tech makes doing sidenotes right extremely difficult. There is no good solution, currently. Gwern Branwen recently wrote an exhaustive survey of available methods and their different drawbacks, which is fascinating if you are a web typography geek. None look adequate to me, which unfortunately means I may have Javascript in my future.

Other sites

I’ve done a major reorganization of my Buddhist sites. Vividness now has a coherent book structure, where previously it had been forced to act as a blog by the tech it ran on. I also merged two other old sites into it. I’ve written about it over there.

Meaningness and Buddhism for Vampires should appear nearly unchanged—although under the hood, they are completely different. Or, the analogy I used in my email newsletter is a reconstruction project on a historic building where the developers carefully preserve the front three inches of the structure while demolishing the rest and rebuilding from scratch.

Plumbing

Oil refinery
Image courtesy Patrick Hendry

Web programming is plumbing. It’s just ripping out old pipes and putting in new pipes. It’s a dirty, ugly job. The old pipes are covered in greasy grime and the new ones are cheap plastic that keeps breaking and nothing fits together like it is supposed to.

Django is not an obvious choice for small personal web sites. It is “enterprise software,” so Django development is industrial plumbing. The pipes are bigger and heavier and there’s way more of them. You need a forklift to move them around1 and elaborate blueprints to keep track of what’s supposed to connect to what.

It was a bigger, uglier job than I expected.2 There’s a lot to say about it, because reality has a surprising amount of detail. If you have some sense of wonder, anything becomes interesting if you pay attention, even web dev. So part of me wants to bore you with that.

However, no one is interested in plumbing except plumbers; and for professional plumbers, this was a pretty routine job.

The one question pros have asked is “why Django?”, with the unstated implication that this was a stupid amateur mistake: using the wrong tool for the job. They are probably right! But…

Comments

Ten years ago, when I set up the sites I’ve now rebuilt, blog comments were the most vibrant part of the internet. That’s where the really interesting conversations were. As everyone knows, twitter and facebook and medium ate blogs, with catastrophic consequences.

What not everyone knows is that part of the reason was on the side of blog technology, not the social networks. It gradually became nearly impossible for individuals to run their own commentable sites, independent of a social media platform.

The reason was blog comment bots. Discussion was overwhelmed with spam. The big social media platforms had the resources to fight it. The open-source software that individuals used for independent sites lost the technology arms race to sophisticated illegal spam companies.

I decided that retaining commenting on my sites was worth considerable effort. When choosing a technology for the redevelopment, that was must-have.

I did some investigation, and as far as I can tell, the only mostly-working self-hosted comment system left is Wordpress’.3 Maybe I should have used Wordpress; that was the obvious choice.

However, Wordpress is awful and looks to me like it’s in a downward spiral. Django is a reasonably competent implementation of a reasonably well-considered design, and it will probably run without requiring much maintenance for another decade.

Django doesn’t have a comment system4, so I built one from scratch. It uses some secret anti-bot sauce that I developed in 2014, and have recycled into the new tech.

Anyway, since that’s all new code written by an amateur, if you are going to find bugs, it’s most likely to be in commenting!

You do need to enable cookies for your comments to get through. This is a Django thing, not me, and the error message it generates is pretty opaque. (Maybe I need to override that…)

  1. 1.Dev tools, I mean. All the ones I’m using now I learned for the project.
  2. 2.More of the job was ripping out old plumbing than putting in new. That is: getting the data out of Drupal and wordpress.com was more than half the work. Notably, wordpress.com makes it artificially difficult, presumably to force vendor lock-in. Their export files are deliberately garbled, as far as I can tell.
  3. 3.There are a million others, but as far as I could tell, none are serious contenders.
  4. 4.It used to have one, which got removed because it didn’t adequately deal with spam.