I guess people think I am tedious on this subject (people on Facebook think I am tedious on this subject), but bike share is very safe. By design, it can count the number of trips. We’re pretty good at counting deaths, too. In over 100 million trips there have been two deaths. (Death #1)

On “normal” bicycles, we’d expect to see 20 deaths in that many trips. In cars, we’d expect to see 9 deaths in that many trips. Instead, two. (As a sanity check on those rates, Canadian statistics are similar.)

If driving doesn’t need helmets, then bike share doesn’t need helmets. Don’t be distracted by “look at all the safety devices on cars, look at the safe metal cage” — with all those devices, driving is still 4 times as likely to kill you, and we don’t think it needs helmets (TBI is the cause or co-cause of death in about 40% of car crashes; car crashes are a leading cause of TBI hospitalization and death).

There are several reasons why this might be true.
Bike share bikes come with daytime running lights.
Upright posture appears to put your head at lower risk in a crash.
Bike share tends to require a credit card, and the bikes are sized for adults. Small children don’t have credit cards and thus don’t ride bike share.
Bike share tends to occur in cities and biking is safer in cities (“but wait”, you say, “driving is also safer in cities!” Yes, and that means it is more dangerous than the driving average in suburbs and rural areas, where we still don’t even discuss the need for driving helmets. If that’s not dangerous enough for helmets, then neither is bike share.) People riding bike share are almost never bombing down a mountainside, and almost never engaged in head-down bicycle racing or race training.

If you claim to pay the slightest attention to math, if you claim to take a rational approach to risk, this ought to be the end of the discussion. Does the CDC collect biased statistics? Two separate studies found similar car and bicycle crash-death rates for the US and Canada (with Canada slightly safer, as one might expect if they’d ever driven or biked in both places).

The last time I did this, I had figures through 2011.
Now I have 2012, 2014 and 2105 (2013 seems to be missing).
Now in a Google spreadsheet, so you can look at the numbers directly and poke at the links if you want to see where the numbers came from.

In words — since 2009, each gallon of gasoline or diesel is taxed between 40 and 50 cents too low even if the only purpose of that tax is to pay for road construction and maintenance. Any other taxes (carbon, pollution, noise, congestion, health care) would be on top of that. This also does not include the maintenance or construction that we ought to be doing; this is just what is spent.

Totaled over all the fuel sold, each year since 2009 the annual shortfall totals somewhere between 75 and 100 billion dollars.

This is a (very) rare work-related entry. I mostly work on the compiler for a programming language named “Go”, and one of the problems we face is if and how we should add “generics” to a future version of Go. I can’t possibly summarize easily for a non-technical reader, but the TLDR version is (1) lots of other languages have generics (2) we’re pretty sure they’re useful (3) but they come with associated costs and complexity and we’re not sure they’re worth it. Also, “generics” is not just a single thing, there’s several semantic variants and several ways to implement them (for example, erased versus dictionary-passing versus template-stamping). So our team is collecting example stories of how Go generics would be useful in various situations — the jargon term for this is “use case”. Here’s mine:

The Go compiler uses maps fairly often, but map iteration order changes from one program execution to the next (and there are good reasons for this). It is a requirement that the Go compiler always generate the same output given the same program input, which means that any time the iteration order for a map would affect program output, we can’t directly use it.

The way we usually deal with this is to also build a slice of the elements in the map, where each time a new element is inserted in the map (each time insertion changes its size), that element is also appended to the slice, thus giving us an insertion-ordered map. This makes the code slightly clunkier and also adds a speed bump for new work on the compiler (and especially for new contributors to the compiler), where new code is first expressed plainly in idiomatic Go, but the idiomatic Go lacks a constant order, and then the order is cleaned up in a second pass.

We could also solve our problem with a datastructure handling interface{} elements, but this would add a bit of storage overhead (storing 2-element interfaces instead of 1-element pointers) and a little bit of time overhead, and our users are, for better or worse, remarkably sensitive to the time it takes to compile their programs.

With generics (either templated or dictionary-passing; templated would provide the best performance for us) we could define, say, OrderedMap[[T,U]], that would take care of all the order bookkeepping, be space efficient, and fast. If we could arrange for some “sensible” overloading, the difference between idiomatic Go and the correct Go for compiler implementation would be only the declaration of the data structure itself. I think that the overloading has to be part of the use case; if we have to use different syntax for something that is map-like, and thus could not update a program by updating just the declaration/allocation, that’s not as good.

By sensible overloading, I mean that we could define a generic interface type, say MapLike[[T,U]] with methods Get(T)U, GetOk(T)U,bool, Put(T,U), Delete(T), and Len()int, and any data type that supplied those methods could be manipulated using existing Go map syntax.

Iteration methods are also required, but trickier; a fully general solution would use an iteration state with its own methods, or we could declare that iteration state fits in an integer, which constrains the possible map implementations (though would be a very Go thing to do). The integer version could use three methods on the data structure itself, say, FirstOk(int)int,bool, NextOk(int)int,bool, and GetAt(int)T,U. The you-get-an-integer approach is a little interesting because it allows recursive subdivision as well as iteration, if NextOk works properly given an input that is not itself a valid index.

The iterator-state version could instead use the map method Begin()Iterator[[T,U]] and iterator methods Iterator[[T,U]].Nonempty()bool, Iterator[[T,U]].Next(), Iterator[[T,U]].Key()T, Iterator[[T,U]].Value()U. This doesn’t by itself support recursive subdivision; that would require more methods, perhaps one to split the iterator into a pair of iterators at a point and another to report the length of the iterator itself.

Right Hook Videos

August 5, 2017

I was trying to explain to someone on Facebook that right hooks are a problem, and a problem caused by drivers, not by people riding bicycles. No dice, cyclists are jerks for yelling at drivers when this happens, and jerks for putting their license plates on the internet, thus spake the driver. But it was a lot of work to collect these videos (seriously Youtube, can I have a “search my videos” option?) so here they are:










I’ll just put these articles out here.
Note that we count overdose deaths per 100,000, Europe counts them per million.
Our best state in 2015, Nebraska, had 69 overdose deaths per million, or back of the pack for Europe. Portugal, with decriminalized drugs, had 3 per million.
Here’s the European stats referenced in that article.

Estonia, the European country with the highest overdose rate (127 per million) would sit at 13th among US states, tied with Georgia. 8 states (New Mexico, Massachusetts, Pennsylvania, Rhode Island, Kentucky, Ohio, New Hampshire, and West Virginia) had an overdose death rate about double that in 2015.

And of course, there’s all the violence that comes from pushing drugs into the criminal economy.

Portugal did the experiment, they’re not an especially wealthy nation, and they got great results. We study what they did and copy it exactly; we’ve never had a “War on Drugs” that came anywhere close to their results, and their approach didn’t require jail sentences, corrupted police forces, or no-knock warrants to “preserve evidence”. The humane choice is humane, AND it works.

Twitter algorithms

July 2, 2017

These are my rules for making Twitter more useful.

My goal, on Twitter, is a combination of finding fun and interesting stuff and to expose myself to (certain) other points of view. At work we have training on bias, unconscious and otherwise, and on techniques for reducing it and countering it. One of the instructors mentioned that you can’t just wish unconscious bias away; apparently repeated exposure to normalizing examples is required, but it takes time (this is yet another disturbing/annoying way that our brains resemble neural nets for machine learning; in this light, unconscious bias is just the result of a lifelong biased training set.)

So as a rule, by default, if I see a post from an interesting woman, interesting PoC, interesting LGBTQIA person, I try to be a little more receptive to pushing the follow button. Lately I’ve decided, if it’s someone from another country I don’t necessarily hear from, that ought to count, too.

My subject bias is bikes/transit/housing, tech-especially-security, Boston area, Florida, liberal politics, science, cute animals.

But everywhere you go, especially politics and often science, you find trolls. I can’t even tell if they’re really people, and there’s a lot of them. I won’t learn anything from them, they won’t learn anything from me, it’s annoying to see someone wrong on the internet and not reply, but that’s a total waste of time. I tried blocktogether.org and that worked pretty well once I had imported a couple of lists, but then I heard mention of something called “blockchain”, not the distributed ledger algorithm, but instead a Chrome extension for bulk blocking.

So now, if I’m reading replies to an interesting tweet and I see some especially trolly comment, I visit the troll’s profile, and if it also looks especially trolly, then I select their followers. If I see that several other people I follow also follow the troll, maybe I stop there, I scan a few of the followers to see if they also look slightly troll-aligned (and remember, I’m not sure if these are real people or networks of bots) and if they are, then I click the “Run Block Chain” button and wait. For someone with more than about 10,000 followers, this will eventually error out for some reason, but it does add the ones that it scanned before the error. Twitter block chain is open source so I have a prayer of figuring the bug out if I really cared and fixing it in my copious free time but for now it works well enough and few trolls have that many followers.

Block chain will not block someone you’re already following, but inevitably you’ll pick up someone who you’d follow if you knew about them (@soledadobrien follows 338k accounts, including quite a few trolls). Sooner or later you’ll notice someone you’re following approvingly quote-tweeting someone you’ve blocked (this doesn’t happen that often, but it happens) and when that happens, I look through the block to see who it is, maybe unblock them, maybe follow them (this morning it was @deborahblum).
I’m a little nervous that I’m blocking lots of people I might otherwise follow if I knew about them, but after passing 100k blocked accounts the troll chatter is vastly reduced and that’s a real improvement.

One amusing side-effect is that this method bootstraps itself; once you accumulate a few troll-followers in your block list, you’ll find that any new troll’s followers include quite a few that you’ve already blocked, right now around 50% for me. You can use this to quickly sanity-check whether someone you think might be a troll is likely to be one; if a scan of their followers shows a lot of already-blocked accounts, perhaps the rest are worth blocking as well.

It would be lovely/interesting to do something more nuanced — for example, @deborahblum has 17 followers that I “know”, @soledadobrien has 48 followers I know, that could be a rule for not blocking someone in a followers list. It would be interesting to see how many people on my existing blocklist have more than N “discriminating” (not @soledadobrien) followers that I know, maybe review/unblock/follow some of them. (This smells like a sort of 2-sided pagerank to me.)

Someone might ask “why block, why not mute”? I don’t want to see these people, and I don’t want them to see me. There are other people who are actually harrassed on the internet by networks of trolls; I think this is one way to blunt the effectiveness of those networks.

I use the mute button when someone that I’m following goes off on some tedious unrelated tear and I just don’t want to hear about it for a while. It would be nice if muting had a built-in time limit.

It’s a little depressing to look at how many hard it is to get all the different factions of the Democratic Party excited about helping each other. I wonder a bit if this is a case of scarcity pushing people towards fighting over scraps, and I wonder how much this is a case of Russians/Republicans using the internet to sow left-wing dissent.

At minimum, people ought to accept that each others’ problems are worthy. Is there really any question that blacks get a raw deal in this country? Or that people who are openly gay or trans are discriminated against? Or that women don’t get promotions and pay commensurate with their skills, productivity, etc? Or that unions are necessary in order to give workers an equal footing in negotiations over pay, hours, benefits, and worker safety? Or that many forms of pollution lead to statistically early death? Lack of an adequate social safety net is clearly a problem, and clearly one that can be solved, because countries that are less wealthy do a better job than we do — notably, they deliver life expectancy and lower infant mortality for less money per capita. They can afford it, so can we. Climate change? It’s happening. Slowly, but steadily, and it’s going to continue for decades-to-centuries after we finally decide to take it seriously; the only question is how fast it’s changing when enough of us finally get alarmed enough to really act. Education? College is stupidly, fantastically expensive, and to the extent this is Baumol’s Cost Disease, we should just subsidize it (other poorer countries manage to do this) and to the extent that it isn’t we should drive prices down by properly supporting public universities. Etc. These are all problems, and the Republican Party is on the wrong side of all of these issues. We shouldn’t pick just one, we should not be put off because we think labor is important but we’re a little nervous about the gays, or focus only on racism to the exclusion of college costs — there’s nothing wrong with wanting it all, we can have it all, and all of us deserve to have these problems addressed. There’s no mutual incompatibility between any of these issues.

And be a little more skeptical, say, when someone on Fox News tries to tell you that anyone who’s LGBTQ is a threat to the womean and children. We’ve done plenty to make life unpleasant for people who aren’t “normal”; if someone’s out of the closet and you notice them, they must feel very strongly about it, and must have been truly miserable in the closet. This has nothing to do with your children, and everything with them wanting to live happier lives. Anyone who tells you otherwise is trying to con you into being mean to other people for no reason at all; ignore them, they’re evil.

Or, similarly, that someone might trot out some bogus statistics to try to make white people nervous about “black crime”. Some of these stats are flat lies, in other cases the data has been tortured into confessing things that aren’t true. In practice, most people are non-violent, most people are law-abiding (well, except for traffic laws, which everyone breaks very often, and traffic violence is actually a big deal). Don’t take the bait, anyone trying to convince you that blacks are a Big Crime Risk is just plain evil, ignore them, change the channel, turn off the radio. They’re trying to turn you into a racist and create dissent on the left.

There are bullshit artists trying to sow doubt about health care, too. One dishonest clown keeps trying to claim that Medicaid is worse than no health care at all, because people on Medicaid (as a population) are sicker than people who aren’t, never mind that if you’re poor and sick you’re much more motivated to sign up for Medicaid than if you’re merely poor, in which case that might seem like more of a hassle than it’s worth. This is what passes for serious statistical analysis on the right; these guys are sad, lying clowns, don’t let their obvious bullshit make you doubt the worth of providing health care.

And so on. There’s probably better examples but I’m a cis het white guy 1%er descended (father’s side) from a family with strong ties to Dartmouth, clearly I’m a traitor to my gender, race, ancestors, etc, it’s a wonder I get any of this right. The main theme is to not let one left-wing cause be split from another, and anytime you catch someone trying to do that, think about why. I honestly wonder how many of the alleged “hard-core Bernie-bros” that get noticed on the internet now are actually left wing or even American; disinformation is a real thing, and sowing dissent is a standard tactic. I supported Bernie, I sent him money, I like (or liked) his politics. But when he didn’t win the nomination, we’re done, support the nominee, got to stay focused on outcomes. I have several friends who did the same. Ask yourself *why* someone on the left would now be interested in prolonging the primary contest after we lost the general election. It makes no sense; the Republicans are uniformly terrible for everything Bernie Sanders has supported over the years, the Democrats are uniformly better, and we tried plenty hard in the primaries and Bernie didn’t make the cut. If we don’t unite, all of us, we lose ground.