Category Archives: Uncategorized

Life Changes Announcement: Academia Edition

This is just a small blog post to let people know what’s going on in my life.

I wrote a little while ago that I was thinking about starting doing a PhD. Well, thought turned into action remarkably quickly, and in October I will be starting a PhD with Dr Alistair Donaldson’s Multicore Programming Group at Imperial College London.

Despite the group title, my focus will be almost entirely on the sorts of things I’ve already been doing for the last few years and probably won’t involve that much multicore programming at all (I’m interested in them because they do a lot of work on language based fuzzing for GPUs, and also because Ally and I really hit it off and there’s a bunch of other interesting related work at Imperial). I’ll be focusing on Hypothesis and related technology, but with a goal of validating and publishing some of the research I’ve been doing on it from a more academic standpoint.

Separately, though not unrelated, to that, I’ve also started a part time research assistant job at Imperial with the same group. I’ll be doing three days a week there for the next three months, helping them with some of their work on GLFuzz (I somehow convinced Ally I knew a thing or two about programming in general and writing fuzzers in particular. Not sure how). So I am now officially an academic.

Feels weird, to be honest. Also not really sure it’s sunk in yet.

For now this doesn’t mean I’ll be around London any more often than I have been, as it will mostly be a remote working position, but come October or so when I start my PhD I will be moving back. I have decidedly mixed feelings about this, but it will be very good to see my friends and family who live there more often.

This entry was posted in Uncategorized on by .

On persuasion and anger

Humans are messy and complicated, and there are very few universal rules of human behaviour, so when you encounter a useful one it’s worth paying attention to it, because it’s basically gold dust.

There’s one I’ve had to learn the hard way. Most people seem to know it when you point it out, but very few people seem able to bear it in mind in their actions.

The rule is this: The angrier you make someone at you while trying to persuade them of something, the less likely they are to be persuaded of that thing and the harder they will be to persuade of it in future.

That’s it that’s the whole rule.

Importantly, the rule applies no matter who is correct. Sadly, truth is not nearly as relevant to persuasion as one might hope.

Obviously it’s not actually completely universal – there are always going to be a few exceptions, whether they are people, subjects or specific circumstances – but it’s close enough to universal that I think it’s worth just treating it as true until you’ve got overwhelming evidence that you’re in one of those special cases. Certainly I’ve seen it play out this way a lot, from both sides of the argument.

A little bit of introspection will probably give you plenty of evidence of your doing this. Think of someone condescendingly explaining your error to you, insulting your intelligence along the way. Are you likely to want to listen? What if you’re actually wrong? Will you get the point faster or slower than if they’d just said “Hey, are you sure about that? I think X, Y and Z”.

I was going to include some examples here, but the problem with doing that is that it will just make the groups I use as examples angry and they’ll not be persuaded of this point. Also it’s somewhat unnecessary given that my primary example is everyone.

So if you can’t think of examples of this yourself, feel free to disregard this post, but I wish you wouldn’t because I think it’s really important if you have any desire to change peoples’ belief.

Because so many attempts to evangelise or persuade completely ignore this and instead go straight for making the person you’re talking as angry as possible.

If you lecture someone, or treat them like they’re a bad person for being wrong, or declare your superiority over them in some way, you will make them angry.

If you try and engage with them calmly, try to understand where they’re coming from, and work with them to find common ground and identify where your disagreement lies, you probably won’t. You won’t necessarily succeed at persuading them, but you’re a lot more likely to than if you told them they were an immoral idiot and the correctness of your position was obvious to anyone with two brain cells to rub together.

Most attempts to persuade on issues that people feel strongly about look a lot more like the first form (“How can you disagree with my obviously correct position you monster?”) than the second (“I’m not sure I get where you’re coming from. Can we discuss this?”), despite it being an entirely ineffective strategy.

I’m not totally sure why this happens, but I can think of a couple of plausible reasons:

  • Persuading people is hard. Most attempts are going to fail, so it’s hard to get feedback on what actually works because most of the time nothing does.
  • When we are angry, it takes a lot of self-control to behave calmly, and behaving angrily will tend to cause people to reciprocate.
  • Engaging people constructively is intrinsically hard and doesn’t feel that rewarding. A good rant will make you feel good about yourself and is much lower effort. If you don’t really expect to succeed, why not go for the easy option that makes you feel better?
  • We socially reward posturing and dominance much more than we do a successful conversion. The people who already agree with you (who probably make up a large fraction of your social group) are much more likely to go “Nice put down! You really showed that guy!” than they are “Well done on patiently sitting there educating that person”.
  • There may be other non-persuasion benefits to getting someone angry (e.g. what it reveals to the audience. Though I think this one often backfires)

So we’ve got an easy option that will make you feel good and a hard option that won’t. It’s perhaps not actually that surprising which one we tend to pick.

You probably think I’m going to tell you that you have to do the hard thing, but in all honesty I’m not sure it’s really worth it most of the time.

By and large, persuasion will only happen when someone is ready to be persuaded. If someone seems able and willing to be persuaded and tries to engage you in productive dialogue about it and you feel up to reciprocating, go for it. It might do some good, or at least you might get an interesting conversation out of it.

The rest of the time though? It’s up to you whether you really want to or not. I’m increasingly disinclined to, myself.

But I do recommend doing less of the easy thing, or at least be aware of what it is you’re really doing: If you find yourself shouting at someone, maybe stop being surprised that it doesn’t result in them agreeing with you no matter how loudly or repeatedly you do it, or how obviously correct your position is.

If you want to keep doing it anyway because you’re angry and it feels good, go for it I guess. I’m probably not going to be able to persuade you not to.

(This post was done as a Patreon request, but I won’t try to persuade you to donate beyond noting that here, regardless of whether it would make you angry)

This entry was posted in Uncategorized on by .

A deterministic improvement to Hare-Clark Single Transferable Vote

Quick note: I’ve been redesigning this in my head and think I have a version that is both simpler and better. Alas what I don’t have is a keyboard. I’ll write up the improved version when I’m back. For now consider this inspiration rather than a good idea.

I was thinking about my problems with Meek’s method and trying to figure out a way around them when I accidentally hit on what might be a good idea. I don’t have time to sit down and work through the implications just yet, and I’m about to head off on a road trip without my laptop, so this is just me writing it down the details so that I don’t forget them.

It starts from Hare-Clark counting instead of Gregory counting: We don’t transfer fractional votes, but only ever transfer whole votes.

However unlike Hare-Clark it is not randomized but is in fact entirely deterministic modulo one detail (that one details is basically that when two candidates are clones of eachother you might have to break some ties arbitrarily).

For this purpose of this piece I’m assuming that ballots are total orders of all the candidates. This method could doubtless be adapted to handle incomplete ballots, but I’ve not thought through the details yet.

The key idea is this: We start by ordering the candidates according to some rank aggregation voting method. This can be more or less anything you want. It could even be completely random if you want, but you’re probably better off using Borda count or Borda majority judgement or something. All that matters is that you get a total ordering of the candidates though, and I’m not sure how much impact on the end result the specific ordering has. It is however essential for making the process deterministic: Once you have this ordering there is no further randomness involved.

We call a candidate more mainstream than another if they rank higher in this ordering. We call a voter more mainstream than another if on the first entry in their rankings that differs the first’s candidate is more mainstream (i.e. it’s the lexicographic order with respect to the candidate order). Given any two voters, either their ballots are identical or one is more mainstream than the other.

Now, the vote proceeds as follows:

At any given point, every vote is allocated to a single candidate. Initially start by allocating every vote to their first choice candidate.

Now we proceed to reallocate votes so that no candidate has more than the quota required for election allocated to them.

To do that, we go over each candidate in order of decreasing number of allocated votes, breaking ties by starting with the more mainstream candidate.

We will reallocate just enough of the candidate’s votes to try to give them exactly the quota of remaining votes (and we will succeed unless in the course of doing so some other candidate reaches quota) by removing the least loyal voter one at a time.

One voter is less loyal to a candidate than another in the following circumstances (the first one that applies wins):

  1. If they rank the candidate they would transfer to higher than the other voter ranks the candidate they would transfer to (the candidate they transfer to is picked in the usual way – the highest rank candidate in their ballot that has not been disqualified and has not reached quota)
  2. If they rank the current candidate lower than the other voter did
  3. If they are less mainstream than the other voter

If neither voter is less loyal than the other then their ballots are identical so it doesn’t matter which one you pick.

For each vote in turn we transfer it to its next preference. If this causes that preference to reach quota we immediately stop, leave all the remaining votes where we are, and begin the process again from the beginning (this is because changing the set of candidates who have reached quota immediately redraws all the loyalty boundaries).

This process continues until all candidates have no more than the quota of votes allocated to them. If this results in all the seats being filled, stop. If it results in some vacancies, it’s now time to disqualify a loser.

The loser is the candidate with the fewest votes allocated. If multiple candidates have the fewest votes allocated, the loser is the least mainstream amongst them.

What happens now could go in various ways: You could either do a complete restart as per the Wright system (but note that I think that you probably should count disqualified candidates when considering ranks for loyalty). Another way that I think would work well is that you reallocate them to their first choice non-disqualified candidate even if that candidate is currently above quota. Votes will then get reallocated by the normal way as per above. This lowers the impact of tactical voting for spoilers in much the same way as the Wright system does but fits in better with how this system works (and is probably fractionally more efficient but I doubt that matters).

Anyway, that’s how the system works. I haven’t analysed it or written an implementation of it yet, but I suspect it’s actually rather good. I guess I’ll find out when I get back in a week or two.

This entry was posted in Uncategorized on by .

On racist intermediaries in hiring processes

Up front disclaimer: I am not currently hiring. Right now I’m a one man shop just about managing to pay myself. This is based on past experience, and intended for the benefit of others. This just came to mind for a variety of reasons recently so I felt the need to write it down.

I’ve been part of a moderate number of hiring processes. I’ve not generally had final say, but my voice was pretty loud in the decisions and the designs of some of these processes.

In that time, I have never been part of hiring a black person. This is pretty bad, particularly given that I was entirely hiring for jobs in London which is about 13% black by population.

I’d like to fix it if I’m part of a hiring process in future, but at the time I didn’t even understand why it was happening. I’ve since partially figured it out.

It certainly wasn’t a deliberate choice on my part. I’m able to say with reasonable confidence in this case that it’s not the result of subconscious racial bias, or even the result of an unintentionally biased interview process.

That’s not to say I didn’t have those things. I’ve done my best to minimize them, but they’re hard to spot and eradicate completely. But regardless, in this case they weren’t the factor for a much simpler reason: To the best of my knowledge, no black candidates have ever applied for a position I was interviewing for (it’s possible that some have and not made it past the pre-screening stage. I don’t think so, but I don’t know for sure).

I don’t present this as a defence, but as the place to start when fixing this problem.

It took me far too long to even realise this was happening, and even then I didn’t really figure out what was going on until after I stopped being part of hiring processes.

I’ve mostly been part of small companies, and the biggest reason a small company doesn’t hire anyone is quite simple: The company haven’t heard of the candidate, and the candidate hasn’t heard of the company (or maybe has heard of the company but didn’t know they were hiring / didn’t think to apply there).

This is sourcing: The process of getting candidates into your hiring pipeline in the first place.

The biggest clue in retrospect that sourcing was the main problem was a hiring process I was part of that did a very good job of removing bias: A lot of it was done with blind review, so we we didn’t know who the candidate was when we were reviewing that part of the work. All the questions were kept consistent across different candidates and had relatively objective scoring. The words “culture fit” never appeared at any point in the process. Our job ads were maybe not great, but we’d run them by people and they weren’t awful and lacked obvious red flags.

The result was that although we still hired entirely white men, we got a lot of older people and a lot of eastern Europeans. This wasn’t a total failure: Ageism and prejudice against eastern Europeans are certainly problems in the tech industry, and the fact that this was quite different to our usual set of hires suggested that the system had worked, but it’s still pretty telling that the result remained a bunch of white men.

And this is the big problem of sourcing: You can (and should) remove all the bias from your interview process you want, but if the set of candidates entering the process isn’t diverse then the set of candidates you hire won’t be either.

Sourcing is really hard. It’s a specialised skill I don’t have, and I can’t teach you how to do it. If you want to know a bit more about sourcing, Eva Gonzalez did a good talk about it at PyCon UK.

Most small companies aren’t hiring regularly enough that they can afford to have someone on staff who has this specialised skill. As a result, we tend to work around our lack of skill in it in one of two ways:

  1. We hire our friends and friends of friends.
  2. We use external recruiters

(This is often how it works at larger companies too, but I have less experience of hiring there so I won’t talk about it)

The first is problematic because it tends to reinforce demographic problems: The friends we hire tend to be from “the tech scene”, which tends to be even more young, male and white than the background of tech overall, and even without that friendships tend to be skewed along racial lines.

On the other hand, it’s basically impossible to persuade people not to do it, because it’s a good way of getting good candidates and most hiring processes end up caring far more about the candidates you get rather than the candidates you exclude. So I won’t talk about that further.

Recruiters though can be a major source of unintended bias.

The problem is that at the receiving end, you only really see the people who the recruiters let through. You don’t get to see the people they don’t send your way, and that’s where a lot of bias can creep in.

This doesn’t even necessarily have to be the result of direct racism on the part of the recruiters (I wouldn’t be surprised to learn that it often is. Certainly I know from female or non-binary friends that they’ve experienced a lot of sexism at the hands of recruiters. I… actually don’t really personally know any black people in tech inside the UK, so I can’t ask them), but there are plenty of other ways it can occur. e.g. a lot of recruiters select for only people who went to “top” universities, which tends to select for a certain amount of socioeconomic class (which is correlated with race). In all honesty, these universities are probably still doing better at diversity than tech is, but when you combine the two factors it makes things even worse. Another issue is that recruiters often get candidates in the same way that tech firms do by spreading along social lines – e.g. recommending the recruiter who found you a job to your friends, so small effects get magnified again.

There are almost certainly more sources of bias at the recruiter level, but the key point is that it is very difficult for me to know what these are: When hiring, I have little to no visibility of them. When going through a recruitment process I don’t experience them because I’m white. There probably are good written resources on this, but I don’t know what they are despite a moderate amount of googling (I’ve read things like Hire More Women In Tech, which have good advice if you’re sourcing yourself but mostly seem to stop at “hire a professional recruiter” for this problem).

I also don’t know how to solve this. I didn’t really figure out what the problem was until it’s too late last time, so I’ve no practical experience of making this work.

But here are some things I’d try next time that might be worth other:

  1. Listening to responses from other people to this blog post! “I used this recruiter and they appeared to do a good job of sourcing candidates who weren’t just white men” or “I used this recruiter and they weren’t racist to me” style recommendations are particularly welcome. More generally, I’m happy to hear any sort of recommendations on this subject at all.
  2. Prefer recruiters on retainer rather than on commission. I don’t know for sure that this will help, but this post by Thayer Prime on why she hates recruiting on commission is pretty good, and it lines up with a number of problems I’ve seen. Recruiters who are on commission will tend to be fairly aggressively uninterested in doing anything that decreases the hiring rate of people they send you even if it also decreases the false negative rate, which is why you get behaviours like selecting based on the university people went to represented so heavily.
  3. Look for recruiters who are, themselves, black or other people of colour. I think every recruiter I’ve worked with so far has been white (and most have been men), and I don’t think that’s a coincidence.
  4. Have a long hard talk with recruiters I’m using when I notice this is happening. If that doesn’t go satisfactorily, find a different recruiter.

I’ve no idea which of those are good ideas (OK, I’m pretty sure the first one is a good idea), and I don’t know which of them will help, but I do think this is a problem that needs solving, so we can but try.

It’s also likely that once the sourcing problem has been fixed (or at least improved) all other sorts of problems in the hiring process will be made visible, but that’s at least progress.

 

This entry was posted in Uncategorized on by .

Two extremes of problem solving

(Side note: I swear I’ve written this blog post before but if so I can’t find it).

Back in university a friend and I were often partnered on supervisions. As a result, I got to compare and contrast our problem solving styles a lot. They were quite different.

If I had to characterize the key difference between our styles (and bear in mind this is filtered by time, perspective and biases) it was at what point in solving the problem understanding happened.

For me I would tend to mull over a problem, trying to get to the core nature of it. Eventually once I had what I though was the “key idea” of the problem I would split the problem open along those lines, everything would fall into place and I’d end up with a nice tidy solution.

(Sometimes of course I would try to split the problem along those lines, find that I’d been wrong about the key idea, and have to go back to the drawing board. Possibly even often).

I don’t have access to his internal state, but I’d be surprised if that’s what he did. His approach looked more like bulldozing a path to a solution, always solving the part immediately in front of him.

The resulting solutions were typically longer than mine and, at least to me, much harder to follow.

Lets call these two approaches “theory building” and “direct problem solving”.

At the time I thought my theory building approach was better. These days I’m not so sure.

One distinguishing feature of our two styles was that my solutions were nicer and tidier. But the other distinguishing feature is that he got to his solutions sooner and would often succeed in cases where I failed.

And I think this is often the case with these two approaches. In many ways it’s surprising how often theory building works – many problems just aren’t nice, and no amount of thinking about them is going to make them so. Many problems are actually nice but require tools that are so far from obvious a priori that you’ll never see them except in retrospect. Having tools which can just soldier on and deal with these sorts of things is incredibly important, because otherwise you’ll just get stuck and fail to make progress.

I do still think the theory building solutions are better, but sometimes what you really need is just to get things done and they’ll tend to fall down there. And sometimes the theory only becomes visible once you’ve seen the direct solution and can refine it down to its essence.

The feedback also goes the other way: Once you’ve done theory building, you’ve provided yourself with a tool you can use the next time you want to do direct problem solving.

I’m talking about mathematics here, but this carries over almost verbatim to programming. A lot of Hypothesis has been constructed theory building style, but there are parts of it where there was nothing to do but just brute force my way into a solution. I’m currently trying to finally crack py.test function scoped fixtures, and while there ended up being a clever idea or two in there that I needed to come up with to crack specific problems, by and large there’s nothing to do here but sheer brute force.

Ultimately I don’t think either approach is actually better, because I don’t think you can get very far if you try to make do with just one or the other. Excessive reliance on direct problem solving will sometimes lead you to some very strange and unnecessary places, while excessive reliance on theory building will eventually lead to you getting nowhere fast.

So the real solution is to let both work in tandem and refactor mercilessly: Theory build where you can and it’s easy or worthwhile, direct problem solve where you can’t. But when you engage in direct problem solving, the theory building should be sitting there at the back of your mind trying to see what’s really going on, and then maybe can come in and pick of the pieces and replace it with something nicer if it turns out to be possible.

This entry was posted in Uncategorized on by .