Best of drmaciver.com

In an act of self-indulgent navel-gazing I decided to have a look through Google analytics and see what my most popular articles of all time were. This then caused me to want to signal boost and resurrect some old and not-so-old posts. It’s closer to what I think is interesting and worth a read than just the most popular because, well, most of my serious traffic comes from reddit and hacker news, and I don’t necessarily agree with their opinions of which ones are worth reading, but all of the most popular ones are in here too.

I don’t expect you to read all of them. There are a lot, and who the hell has the time? This blog has been going for about 7 years and I don’t know where in that I found the time to write all of these, but I’ve tried to arrange them in such a way that a skim through should find you something interesting.

Also, some advance warning: Some of these posts are quite old. Some of them may contain opinions I no longer hold. Most of them were probably well thought out at the time (or at least I thought they were), but it turns out that that’s no protection against being wrong.

So here you have it. Some highlights from the archive.

Edit: Updated May 13 with some links to fiction

Sections

Some quick navigation links for you if you’re not interested in all of this:

A perfect voting system

At 14k visits (yes I know that’s not a lot), this is my most read article ever. It got linked from a bunch of places, including one of the new scientist blogs.

Which really makes me wish it weren’t so badly written. In order to compensate for that I rewrote it. The new version is substantially better written but was so much less topical by then that it’s not had nearly the same level traffic.

The essential idea, which I proposed mostly as a thought experiment, is that when electing a large number geographic constituencies the correct election procedure to use is random ballot – everyone votes, you pick a random voter and use their choice. I’ve since come around to thinking this is actually a really good idea, but alas it will never get implemented.

I’ve written more on this subject since:

A less perfect system for which I will nevertheless be voting

I got very vocal and angry about the AV referendum. This is in fact what prompted the random ballot post. I had recently written Hammer Principle and so gone down a bit of a rabbit hole of voting theory. As a result it was really obvious to me how bad the existing system was. The fact that the no to AV group were lying through their teeth helped fuel my outrage.

I’ve since written various things both on the practical details of the vote in the UK and on voting theory at large:

Understanding Scala Arrays

I stopped using Scala long ago, and this article is no longer relevant to the current implementation, which I believe uses an explicit manifest object and is much more reliable. This was my description of the old mechanism where arrays could be backed by either an object array or a primitive array and what would happen was essentially that when you realised it as a primitive array the implementation would “snap” to that form. It was a very clever but ultimately quite flaky way of getting around the limitations of the JVM for generics.

The reason it’s got quite so much traffic over the years is that it’s linked from the proposal for the fixed array implementation that came in in 2.8.

Some other “Here’s how this bit of Scala works” posts:

  • How packages work in Scala. This is the old system. I still think it was a good system in itself, but unfortunately it was completely shafted by the combination of the Java conventions and the way package resolution from the file system worked.
  • A note on a useful feature of the Scala class system that most people seemed to miss. I believe this one to still be valid.
  • An introduction to implicit arguments. There are very few programming languages so bad that they have nothing to recommend them (Scala is pretty far from being one), so as a result pretty much every language I’ve ever used has features I miss when I’m not using it. Scala has a few of them, but implicit arguments unquestionably top the list. This is my attempt to write an introduction with lots of an examples on how to use them. I believe it to still be accurate – certainly it still gets linked from places and gets some traffic, so I hope its’ still accurate.
  • A little detail on the difference between Java wildcards and Scala existential types.
  • A more substantiative post about Scala existential types work. This seems likely to still be mostly accurate but I don’t know if it’s still 100%. It’s certainly still quite popular.
  • Once upon a time there was a Scala trait called Application which broke everything. You ended up running your entire application inside class initialization. This turns out to be a really bad idea on the JVM. I believe this was fixed by introducing deferred initialization rather than by removing Application.

Other posts from the Scala years:

  • No, seriously, why scala? An attempt at a pro-Scala advocacy piece that was a little more interesting than the standard “zomg functional programming is amazing!!1” fluff pieces
  • Why not Scala? A post on its downsides. Obviously some of these have now changed. I could write an updated piece, but I’m not going to. Someone who actually still uses the language is far better placed to complain about it.
  • How do you talk about Scala? In which I asked people about how they sold other programmers on Scala.

Understanding Timsort, Part 1: Adaptive Mergesort

One of my more read articles, mostly because it’s linked from the Wikipedia page on Timsort (not my doing, I promise).

I unfortunately never followed up with a part 2. I got about a third of one written before it got stuck in the eternal drafts folder of doom but decided not to bother – I got further with my understanding (although I certainly couldn’t recite all the details off from memory) but then realised I wasn’t all that interested in learning the details of the sorting algorithm.

A manifesto for error reporting

This was part of the storm of activity I had at the beginning of this year. I think I had three popular articles going in a week (and yet unlike last week HN didn’t bring my site down once. Oops). I forget what triggered this. I think it might have been the way Padrino handled certain problems, but really it could have been anything Ruby related. Basically: People who handle and report errors often seem to go out of their way to make things difficult to debug. This makes me sad and angry and you, the reader, thus get to listen to me being sad and angry. Apparently this sad angriness (sandgriness?) struck a chord with a lot of other people.

I also published A rewritten version of the manifesto because some people misunderstood the first one. There’s less shouting and more condescending prescriptivism. A friend described it as “the most passive aggressive thing she’d ever read” because of how obviously pissed off I was and yet going out of my way to be scrupulously polite in it. This is almost as popular as the inspiring post.

Relatedly, I appear to have strong opinions on exceptions:

How to quickly become effective when joining a new company

(original title: How did you get started so quickly?)

A rather recent post, so if you’re reading this archive post close to when I wrote it you’ve probably already read it. This post had the surprising characteristic of being remarkable well received on hacker news and derided on reddit. Clearly this means that Hacker News are better people than Reddit. Um.

This starts out with some practical advice on the philosophy of learning and rapidly descends into some very speculative things about mental models and how to apply them. I actually have more of the mental models stuff to come which I’m currently procrastinating from by writing this post instead. Such is life.

I’ve written a follow on post about how to apply this technique as a way of reading code.

In general I care quite a lot about the art of problem solving and how it’s applied to software development, and I have a few other posts on that subject:

OpenVPN repeatedly losing connections with inactivity timeout

You have no need to read this post. I practically guarantee it. If you’re not experiencing this problem then you don’t care. If you are experiencing this problem then you’ve probably found this page due to my advanced SEO skills (read: I struggled for ages to find anyone explaining what in the actual was going on, couldn’t find anything, so when I figured it out made sure that other people would not suffer this problem). This still gets a lot of traffic and every now and then someone will give me warm fuzzies by saying “Thanks! This completely solved a really annoying problem for me”.

Another example of my doing this that you don’t really care about is my posts on Linux wifi recently. Unfortunately those are less helpful because I haven’t actually solved the problem (I still haven’t. I’ve avoided it with a £15 wifi dongle).

Writing things right

This was a surprisingly popular article about a cute hack you can do in Haskell. I totally stole it from someone else at the time but was never able to figure out who I stole it from (I think it was someone on some mailing list). Basically: You can mess with Haskell syntax to make it look almost exactly like an OO language with surprisingly little difficulty.

This is part of what I think of as “The programming language years”. I still care about programming languages and like picking up new ones (it’s pretty easy using the “How did you get started so quickly?” guide, though knowing a variety of them already definitely helps with that). But once upon a time I was really quite obsessed with languages and thought that solving them was the key to a lot of software development’s problems. These days I think not being so completely dysfunctional is the key to solving a lot of software development’s problems and that most of our problems are social. I miss the days when I thought it was about programming languages. Those were nice, cuddly, delusions.

Other things from the programming language years:

  • Tell us why your language sucks. The thesis is that all languages suck in one way or another, and most criticisms of languages are shallow because they come from people who don’t use that language. This was an opportunity for people to complain about the languages they actually use and like. I think it went pretty well.
  • Criticizing programming languages. Me deliberately saying some good and bad things about different languages I used. Some of these are quite shallow (e.g. I could probably say more interesting things about python now), some of them are pretty fair.
  • Functional code != Good code. This might actually be an early sign of my disillusionment. A post that spells out in detail the seemingly obvious point that making your code more functional doesn’t automatically make it better and that what you actually need is better factoring and more modularity.
  • Functional programming lies. AKA “Please engage in truth-based advocacy, thanks”.
  • A problem of language.  What do we actually mean when we say “This is a functional programming language”? Draws the distinction between “This thing exhibits X behaviours” and “This is an X thing”, which I think is important and undervalued. I keep meaning to write another post on a similar subject in a different context.
  • I later elaborated on how you don’t actually need definitions to seek agreement.
  • Notes on the design of a Haskell API. Some problems I had when trying to design a metric space API in Haskell.
  • What’s a monad? So, yeah, I’ve written a monad tutorial. I’m not proud of this.
  • Then I accidentally wrote another one.
  • Interest bandwidth. The theory that interest in programming languages is strongly correlated to lack of interest in what you’re doing with them. This was my theory at the time for my waning interest in the subject. I think it was true but incomplete.

A more recent thing which isn’t from the programming years but fits into a similar category is How learning Scala made me a better programmer, in which I reflect on the fact that writing code in a language with a buggy compiler is surprisingly useful.

Commiting to calling out sexism

This was a bit of a transition point for me. The actual post itself is not that phenomenal, but it marks the point where I started writing about feminism and related issues and started being more vocal about them, both online and in person. I’d been what I suppose you might call a closet feminist before that – it’s not that I was secret about my feminism, but I didn’t make a big deal of it. This was the point at which I realised that this was not OK and that I needed to start getting on with helping make the world a slightly less shit place.

Annoyingly I haven’t actually done all that much explicit calling out of sexism recently (I’ve corrected some people on various things, but it was more of a “Hey, actually the world works like this” “oh, ok” scenario than “Hey you’re being sexist. Can you stop?”). I think this is mostly because I haven’t been in situations where it was necessary, but I’m not sure why that is and I think I’ll keep an eye on this.

I have done a certain amount of shouting on twitter on the subject, and I’ve definitely been a bit more vocal on the subject in casual conversation, but I’m not sure how substantial that’s really been.

I also promised at the time to try and document this. Again, failure. The only documented case of it was relatively near the beginning with if programming language articles were people. A workplace incident in which someone forward around a “If programming languages were women” post. I was not amused.

A more recent example is my I am angry too piece, in which I write about men’s tendency to dismiss women’s anger as a way to avoid hearing about things that make us uncomfortable.

This discussion around hiring practices maybe also counts. I think I might be reaching though.

I do have a bunch of posts about identity, which are clearly inspired by a lot of thoughts around intersectional feminism. I don’t know if I would call them explicitly feminist, but I think that’s clearly where I’m coming from:

  • I believe I can fly. Some thoughts about what we consider part of our identity and how these may not correspond to “objective” reality. I’m clearly on the fence on the subject (and remain so) but as a result people from both sides basically went “Yes exactly! This completely supports my point!” about it. I still think it’s an interesting exploration though.
  • You are not your labels. A post about the difference between your identity and the words you use to describe your identity, especially in the context of sexuality. In it I attempt to explain everything ever by the failure to understand the difference between these two. This had an interesting split in its reactions. People who knew me received it mostly positively (they didn’t necessarily agree, but they thought it was an interesting point). People who didn’t know me so well were… more mixed. Apparently a mostly-straight cis white dude who works in tech gets pattern matched to some relatively unpleasant behaviours when talking about identity. Not all that surprising and hard to blame people for.
  • So I wrote a follow up post in which I made it fairly explicit that I wasn’t saying that identity wasn’t important.

How to write good software

In which I outline my three step program for writing better software. It approximately goes:

  1. Smash the system
  2. Smash the patriarchy
  3. Figure out how to write good software

It’s proven to be fairly popular, I think mostly because people who are interested in both social justice and software are extremely keen to share it.

Ignorance is bliss for whom?

Also on a more or less feminist topic. Basically: Knowing more can make your life worse. The reason for this is not that knowing more is harmful it’s that your life was currently “better” because you were less aware that you were causing problems for other people.

Related are:

Questions for prospective employers

A distilled list of questions to ask companies before joining. I did ask all of these at my current employer, but I confess I didn’t guide my decision by these as thoroughly as I might have. To be honest, I completely failed to stick to my guns. Next time, whenever that is, I will do better.

Also, the long list from which the short list was distilled.

A manifesto for what I will do when I take over the country

(And the world)

Also in this series:

How to legally(?) and efficiently bribe a democracy

I’m pretty disillusioned with the state of modern democracy, which meant I was very receptive when Terence Edent gave a talk about how to effect real political change: By bribing MPs, because they turn out to be really quite cheap. This then collided with my peculiar obsession with randomisation and came up with this model for bribing MPs without directly bribing MPs. I then came up with another one.

Fiction

I sometimes write fiction. I’m not actually very good at it (mainly due to being unable to write good dialogue) but sometimes it turns out well anyway (mainly due to being able to avoid needing to write dialogue). Notable examples:

  • Gates – a story being told to you in a bar
  • Spam – my contribution to the rare genre of post-singularity humour
  • They called me mad – secret agent vs mad scientist. Contains actual dialogue. Also contains my favourite line from any of the fiction I have written.

Less notable but still decent examples:

  • Dark Lord – a hero rises to defeat the dark lord. Unfortunately the dark lord was already defeated with high explosives.
  • The man who named the stars – a vaguely lord Dunsany inspired fairy tail / creation myth..

A freemium model for scheduling

This was actually inspired by my world domination ideas for health care systems.

It’s an interesting way to do a business model: Give the service away for free, but dedicate a certain percentage of resources to the people who pay you the most, with people being able to pay as much or as little as they like to get access to this (and the amount of access you get scaling with the amount of money you’ve paid (plus some bonuses for regular customers). It has some problems, some of which I later patched.

On vegetarians who eat chicken

A practical and linguistic defence of people who describe themselves as “Vegetarian but I eat chicken” against people who immediately go “Well you’re not vegetarian then, are you?!” in a self-righteous “Gotcha!”. I get a surprising amount of Google traffic for this post.

Some simple theorems about dominance of probability distributions

I spent a little bit of time looking at the question of when one real valued random variable is “better” than another, where a higher score is always better but we’re not sure about the distributions. I gave a nice definition of the minimal possible partial order we accept has to be included in this and explored some of its properties.

I later proved that this was equivalent to the nice characterisation that one distribution dominated another iff it had greater or equal expectation under every monotonic increasing transformation.

I also characterised this for normal distributions. In short, a normal distribution dominates another iff it has greater or equal mean and the same variance. Normal distributions with distinct variances are incomparable under this order.

Studying a certain notion of “decision strategy”

I defined a thing I called a subset consistent decision strategy. I provided a full characterisation of all finite ones, and then did some work on characterising infinite ones:

How to get free tea from pret a manger

One of various “isn’t my life interesting?” amusing stories. Occasionally funny things happen to me and I blog about them. These tend to be surprisingly well received, although never get that much traffic. Other examples include:

Customers who read this blog might also like…

As if the 80-some links that I’m already providing in this post weren’t enough, here’s a whole bunch of book recommendations.

I also have a similar post for webcomics.

Miscellaneous

I have no idea where else to put these but think they’re worth reading

That’s it for now. I’ve missed out the cooking and fiction sections entirely, and I suspect there’s some interesting stuff lurking in the early days of my archive, but the process of curating this is exhausting. I may come back to it later, but I don’t have a good track record of doing that.

This entry was posted in Uncategorized on by .

2 thoughts on “Best of drmaciver.com

  1. skagedal

    Hi! There is an erroneous link here to the post about error reporting, instead links to post about a cute algorithm. So much interesting stuff to read here, thanks!

Comments are closed.