Caffeine Peter Colijn
(RSS)

January 04, 2009 (link)
Regarding Air Canada

In response to dcoombs: I just have to ask, if you know that Air Canada sucks so hard, why do you keep flying them? Have you tried a European carrier like Lufthansa or Air France or something? I generally find that pretty much any major airline that is not based in North America is preferable to one that is. With the notable exception of Aeroflot. Geaawd they're awful. I've been particularly impressed with Finnair, though I'm not sure they fly anywhere useful to you from Canada.

My latest Air Canada horror story involves a cancelled flight, a rescheduling two days later instead of the next day on a super early morning flight, and sitting on the tarmac for 4.5 hours. A small hint to Air Canada: when you make people get out of bed at 5:30am, their plane had damn well better leave on time.

Variety Coffee and Espresso

After dropping off some laundry today I noticed a new coffee shop in the neighborhood. It's in what used to be a corner store, and the storefront still says "variety" so they named it "variety coffee and espresso". In true Williamsburg style, it's full of hipsters sipping cappuccinos while looking at friend pics on facebook on their MacBooks. Anyway, despite the overt clichés, their coffee is freaking awesome. Possibly even better than Gimme! Coffee, my former NY favorite. Mini-review below.

Variey Coffee and Espresso. Order: 1 skinny cap.
Foam: excellent. Latte art: a carefully crafted big white dot :P
Espresso: delicious, chocolatey flavour.

I'll definitely be going back to see if they are consistently good.

January 09, 2009 (link)

Rant: Bike Lanes

This is one of those cases where a scourge of stupidity seems to be sweeping the world, so naturally, I may as well rant about it.

I've cycled in many cities, including Alkmaar, Amsterdam, Calgary, Waterloo, Oxford, Toronto, Montreal, Palo Alto/Mountain View and, of course, New York. By far the most pleasant of those places to be a cyclist was Alkmaar, with Amsterdam a close second, and really only because of cycle congestion (!) there.

The worst is probably a toss-up between Calgary and New York. I'll get into more detail, but in Calgary, the oil capital of Canada, a cyclist generally encounters drivers who don't even know what a bicycle is and are completely dumbfounded to see one on the road. Once they overcome their bewilderment, it turns to anger as they realize their manly gas guzzling SUV is sharing the road with wimpy environmentalist scum [1]. However, probably because of most Albertans' refusal to acknowledge the existence of bicycles, Calgary hasn't yet succumbed to the stupidity of bike lanes. So the behavior of drivers towards cyclists, while hostile, is at least consistent and relatively constant.

New York, and many other North American cities (this includes pretty much all the others on my list), however, are engaging in the bike lane stupidity.

Now I probably need to explain myself. You are probably asking "hey, don't you like bikes and cycling? Wouldn't you then, by extension, like bike lanes, which make cycling easier and safer?" The problem here is the premise. If bike lanes made cycling easier and safer, I would indeed like them. The thing is that they do not. First, though, let me be clear. When I say "bike lane", I mean the kind of thing that is really just a line painted on the side of the road with a bicycle symbol between it and the curb. Physically separated bike paths are a completely different beast.

I suspect what is happening, is that around the world (and especially in North America), city councillors are realizing that their city dwellers are more concerned about "green" issues. Wanting to get re-elected, they are looking for ways to "green up" the city. Somebody mentions bike lanes, and points out that they are super cheap and easy ("just paint a line on the side of the road on you're done!") and the city councillor is sold. Something cheap, fast and easy that lets them claim they greened shit up just in time for the next election! Yay! Bonuses all around, good work everyone!

Of course in their haste for political survival, they missed a few things. These "side of the road" bike lanes fail all over the place. First, people park in them. I don't care how illegal it is, they do it anyway and the tickets aren't enough to be a deterrent. What this means for the cyclist is that as you are biking along, you frequently have to move out into traffic to avoid a parked car. You are also at risk, when passing the parked car, of being doored by the driver as they get out. That's a risk with any parked car, of course, but in the case of the bike lane parked car, you're more likely to have to pass it closer, since you're moving out into traffic and there may be other vehicles on your left.

Second, most of these bike lines are on the right side of the road. Suppose I get to an intersection and I want to turn left. WTF am I supposed to do? "Side of the road" bike lanes completely overlook this rather fundamental use case. In theory, I guess I am supposed cross like a pedestrian. In New York, where sidewalks and street corners are crowded, this is often awkward and impractical. In addition, part of the point of riding a bike (or most any other vehicle) in the first place is that it's faster than walking.

Finally, the most crucial fail of "side of the road" bike lanes is the psychological damage it does to the driver-cyclist relationship. The "side of the road" bike line effectively segregates cycles and cars, which sounds ok, except that because of the previous 2 fails, you cannot, as a cyclist, actually avoid moving into the car traffic lanes from time to time. However, car drivers expect that since you now have your cute little lane over there, they should never have to see you or deal with you again. WTF are you doing in my way, stupid cyclist? Go back to your little lane where you belong! As a result the drivers are more hostile and careless, which ultimately makes things more dangerous.

Because of all the fail, I generally try to avoid roads in New York with this kind of bike lane. I find the same thing applies in many other cities, though on really quiet streets the fails of a "side of the road" bike lane don't matter much because there isn't any traffic anyway. For example there are some bike lanes in Palo Alto, but they're completely unnecessary since the roads they're on are pretty much completely unused. You might see a car or two far in the distance, if you squint.

Now, moving on, physically separated bike lanes. Good, right? Well, maybe. Nobody parks in them, so they succeed on that count. But if no attention is paid to how they are supposed to interact with traffic and pedestrians at intersections, they can still be pretty annoying to use and can leave a cyclist feeling "trapped" and not having any way to actually get to where they want to go. One of the things that totally kicks ass about all the bike paths in the Netherlands is that they have separate signals for cyclists that make it extremely clear what you are supposed to do. This totally takes the guess work out of navigating a complex intersection, and reduces hostility, as everyone just follows the signal (and yes, most cyclists there actually do stop for red signals!) So I am more mixed on the physically separated lanes, and in general I really don't have confidence in city planners, especially in North America, to actually think about all the traffic implications of a physically separate bike lane and introduce the kind of signalling that makes them a joy to use.

So why am I mentioning this now? I mean cities have been fucking over cyclists with "side of the road" lanes for years. Well, two main reasons. First, the pace and scale at which this stupidity is being forced upon us is really picking up. Soon I might not have any bike-lane-free roads to use any more! Second, I hear Barack Obama wants to fix roads, so I am fearful that cities, flush with stimulus package cash, will further the damage even faster. How do we stop this stupidity?

[1] Ok, this is exaggerating and a bit harsh. The thing with Calgary is that actually it has a great system of bike paths, and people use them a lot. However, cycling there is seen as purely a recreational or fitness activity, like jogging. So people are really surprised to see a bicycle on a city street, especially downtown.

January 10, 2009 (link)

Perspectives of a Westerner

So as many of you know, I grew up in Calgary (and a little bit in the Netherlands, which is a very different place), and then came to Ontario for school. Many of my friends from school are thus native Ontarians, and find nothing at all unusual about the place. But for somebody from "the west", there are a few bizarre things. I'd been meaning to write this up for a long time, but just hadn't gotten around to it.

First, LCBO and Beer Store. Seriously guys. Come on. I'm not the kind of person who supports privatized everything, but honestly, does the government really need to be in the business of selling alcohol? Make fun of the name "Liquor Barn" all you want; they still have vastly superior selection. In addition to selection, I always found the LCBO's hours very inconvenient. I remember in Waterloo they closed at like 9 or something pretty early, even on a Friday. My brother in law likes to joke that after buying a case of beer in Waterloo you just need to go home and relax for the rest of the day, because getting the beer was so hard.

Next up, using "hydro" to refer to electricity. I'm not sure where that comes from, but it's confusing. Because as far as I understand, most of the electricity consumed by Ontarians is not, in fact, generated by hydroelectric dams, but by coal burning or nuclear plants. Perhaps in the past hydroelectric was a more significant portion of the grid? In any case I've never been anywhere else in the world where people so universally referred to electricity by a means of generating it. In New York people generally just refer to the company supplying it.

Finally, "public school". This one was for me the most confounding. In Ontario this seems to mean elementary school. A high school, even if public, is not a "public school". I have often wondered if a private elementary school is a "private public school." I've also asked Ontarians what they call a public high school, and the consensus, I believe, is that it is just a "high school" (as opposed to a private high school). Perhaps this terminology comes from a time when there were no private elementary schools so they were all public, or something?

January 19, 2009 (link)

Rant: Map<K, V>

Quick question. If you saw an interface called "Map<K, V>", what kinds of operations would you expect it to support? Maybe some of the following:

  • void put(K key, V value)
  • V get(K key)
  • int size()

Except if you're Java, it's too much to expect that second one. No, instead you have to manage with:

  • V get(Object key)

I've known this for a while, and it's just one of the many gotchas in Java that you learn to deal with. However, it is a phenomenally stupid and broken API, and I can't understand why it was done.

As you probably know, generics in Java is done with erasure so some things just aren't possible. And erasure was chosen for compatibility reasons. It does make some things overly complicated, but I actually think in this case it was the right call: even with erasure, generics added a huge benefit to the language, and telling everyone that they couldn't use it until they got recompiled versions of all their libraries would be pretty harsh.

However, this particular API blunder has nothing to do with erasure. It would technically be possible to make that API take K key instead of Object key and not break anyone who was using Map instead of Map<K, V>, since Map in Java 5 implicitly means Map<Object, Object>. So it's only going to break people who are using Map<K, V> but for some reason are passing stuff other than K into get. Prior to Java 5, that kind of use didn't even exist. K and V were always Object, so I can't see how this stupid API supports compatibility except in possibly requiring fewer code changes to migrate to a typed Map.

But if you really want to pass different stuff into get, you should just use a Map<Object, V> and get it over with.

Why do I care about this? It turns out that relatively few Java programmers actually know about it or know enough to think about it, which leads to silent failures that can be hard to find. Your code compiles, but your call to look stuff up always fails. Since Maps are often used as caches of various sorts, this can have hugely bad implications for performance, or could cause you to overload another system. It could also result in plain bugs like always treating a user as a new user or returning 0 search results or other bad things.

All this, so some jerks who lobbied the Java language bodies could get their legacy codebases migrated to generics a little faster (and, probably, with more bugs).

January 27, 2009 (link)

On Economic Stimuli

So the latest argument seems to be whether economic stimuli should come in the form of direct government spending or tax cuts. Personally, I think there should be both, but favour more direct government spending over tax cuts. Why?

When you give people tax cuts, it is essentially like giving them money. They can do whatever they want with that money, including save it. Now obviously if somebody (or some business) saves money, that doesn't stimulate demand for anything. Not a problem, you say. That money goes into a bank which lends it to somebody who does want to spend it on something. Problem solved! Except, of course, that banks aren't lending right now. So the money will just kind of sit there, being an imaginary number, and not doing anybody much good.

But but but! If we don't give tax cuts, some businesses might have to fire people! Surely we should give the tax cuts and save those jobs? The problem with that argument is there is no guarantee that you will save jobs if you give tax cuts. Businesses might still do layoffs and pocket your tax cuts to have a better bottom line. Some won't do that, others will. It's hard to say exactly how it would break down, but it is pretty obvious that less than all of the money spent on tax cuts would go towards saving all of the positions that would otherwise be eliminated.

Now it has to mentioned, of course, that direct spending on government projects has its downsides as well. If you do that in favor of tax cuts, you may well have more job losses and there is overhead in getting those people who lost their job into a new one, even if direct government spending is providing plenty of new jobs.

The question is, what's worse? The overhead of people temporarily without work, or the risk that firms will not actually use money freed up by tax cuts for its intended purpose. To a large extent, the answer to that depends on how fearful people are. The more fearful, the more likely businesses and individuals are to pocket their tax cuts without any change in behavior. And right now, everyone's afraid.

Back: December 2008 Next: February 2009

email: caffeine@colijn.ca