Monthly Archives: June 2008

Editor wars thread

I don’t actually expect it to lead to a flamewar here, but I am nevertheless invoking one of the longstanding Internet disputes with this announcement: I have recently switched from emacs to vi1.
For the uninitiated: emacs and vi are the two most common text editors in Unix environments. They’re meant for editing unformatted text such as computer programs. I’m doing a lot of Unix programming these days (in Perl and C++) so a good text editor is essential. The two have fairly different philosophies: emacs does more or less what you would expect, in that you can type words and they appear on the screen, but it also has a ton of extra functions (such as programming with butterflies). Unfortunately even simple ones like, say, “save” have to be accessed by typing a sequence of obscure key commands, usually while holding down the control key.
On the other hand, if you open up a file with vi and start typing, words will not appear on the screen. If you’re lucky it’ll just beep at you repeatedly; it might also start deleting portions of your file apparently at random. Fortunately you’ll never figure out the command to save, so your original file will be unharmed; unfortunately you’ll never figure out how to quit either, and be stuck there forever (or until you open up Google and look it up).
At least, that was my first experience with vi, and having concluded that it was designed by alien intelligences I quickly became a convert to emacs. However, I recently began to question that decision, for a number of reasons:

  • Peer pressure. Almost everyone in my department uses vi. In fact, when I was assigned to a newly assembled Unix box and complained to the sysadmin that emacs wouldn’t run there, his response was “Well, most people use vim.” (He did set up emacs for me despite his disdain for it.)

  • It reminds me of playing nethack. At some point in the past I had to learn to play nethack on a laptop keyboard (i.e. without the number pad), and only later found out that I had thus inadvertently learned how to move the cursor in vi3. This was actually the biggest part of the learning curve. There are other similarities to nethack, such as the primitive-looking interface, the obscure extended commands, and the fact that a typo at the wrong time can kill you.
  • I got tired of holding down Control every time I wanted to do anything. (But hitting escape to get out of insert mode is almost as bad. Maybe I should remap it to some other key.)

Anyway, I went home one night and went through the vim tutorial, and discovered that it’s not as hard as I thought, and ended up switching entirely.
Rather than actually make this an editor wars thread, consider this a place to suggest your favorite Unix programs for software development (or whatever else).
1 Actually, vim2.
2 Well, technically gvim.
3 Except that the diagonal movement keys do other, more drastic things in vi, which can cause trouble when I forget I’m not playing nethack.

Thought I was done with exams

Tomorrow I take the Series 7 exam, which is the standardized licensing exam for stockbrokers. Even though I work in a proprietary trading group, and don’t go anywhere near any brokering-related activities, this is apparently one of the certifications I need if I’m going to be involved with the details of trading.
I think the last time I studied for a standardized test was when I was preparing for the physics GRE; needless to say this is a very different experience. I’m used to tests where I reason out the answers from a few basic rules, but the Series 7 mainly tests knowledge of the regulations concerning brokerage firms, so it’s almost all memorization and nothing more. There’s some logic to the general boundaries of these regulations but almost all of the specifics are arbitrary: there’s no way to derive the Regulation T margin requirement from first principles.
So I’ll get a question like, “How many additional shares may an underwriter sell under the green shoe option?”, and unless I can remember the one line in the phone-book-sized study guide that referred to this, and not get the percentage mixed up with the countless other similar numbers in other regulations, I’ll be stuck. And it doesn’t help that “green shoe option” only makes me think of this:

If only securities laws were as easy to remember as Mario trivia…
(Actually, there’s a mnemonic here: the Kuribo’s shoe only appeared in world 5-3 of Super Mario Bros. 3, and 5×3 is 15, exactly the percentage allowed in the green shoe option. Having discovered this, I’m unlikely to miss a similar question on the actual exam. This suggests that if I can just create a mapping between my Mario knowledge and the Series 7 material, I’ll do very well (and then I can write the Super Mario Guide to the Series 7 Exam). However, I expect to pass the test as is and higher scores are frowned upon in my group, as they indicate too much time spent studying rather than doing something more productive.)

Arcane Gazebo meets T-Rex (at MoCCA)

One of the great things about living in New York City is that I’ll frequently read on the internet about some event, and then realize, “Hey, I could go there!” For example, the MoCCA1 Art Festival this weekend. I’ve never been to a comics convention before, but with it being only a few subway stops away I didn’t really have a good reason not to go.
My primary goal was to acquire a signed copy of the Dinosaur Comics book, and I was not disappointed in the outcome:
ryan north sketch
I also got a copy of the new annotated Wondermark book, because it looked nice and also because Wondermark is fantastic. Randall Munroe (of xkcd) was doing free sketches, but I foolishly didn’t have anything for people to sketch on. He and David Malki ! (who does Wondermark) were next to each other, and each had a sign offering to punch the other for $1. (I even saw it happen while I was standing there.)
Outside of webcomics I knew almost none of the exhibitors (it was very much an independent, small press show), although there was obviously a lot of talent on display. I made sure to walk around and look at everything, but it’s hard to know just by looking at covers what’s good. I did see Bryan Lee O’Malley, the author of Scott Pilgrim which has recently become my new favorite print comic. (It’s kind of a hipster Ranma 1/2 with copious references to classic NES games. Anyone here who reads comics should absolutely check it out.)
Normally when I think of comics shows I think of something like the San Diego Comic Con2 with everyone in ridiculous costumes and big lines at the popular booths. This wasn’t at all like that: very low-key, no costumes and you never had to wait in line to talk to anybody (unless it was Randall Munroe, or Michel Gondry who turned up for a signing). Overall it was a fun outing and I need to keep an eye out for more stuff like this going on in the city.
Meanwhile, some of my coworkers are going to the actual Nerd Prom and I am tempted to join them… of course, I’ll need a costume.
1 Museum of Comic and Cartoon Art
2 A.k.a. “Nerd Prom”

Milkshake-drinking at all-time high

Before I talk about Friday’s jump in oil prices, I should probably state that these are my personal opinions and completely unrelated to what I do at work (which doesn’t involve energy markets anyway).
The papers emphasize that this is the “biggest jump ever” for oil, but this seems a bit misleading: “ever” only goes back to 1983 (when oil futures started trading on NYMEX, apparently), which means it doesn’t include the last big oil crisis in the 70’s. It may still be the case that $10.75 is the biggest absolute price increase, but the starting price is also higher than it’s ever been—usually the more relevant measure is fractional, so the real question is whether an 8% jump is record-setting. (It might be but it’s not clear from the articles I read.)
Next we have the question of whether or not there’s a bubble going on and oil is really overvalued at this point. According to the Times,

One view gaining ground is that the commodity market is caught in a speculative bubble akin to the recent housing bubble or the technology bubble of the late 1990s. That theory was raised by politicians in Washington and by OPEC producers, who blame speculators for the staggering oil rally.

I have to say that neither politicians in Washington or OPEC producers seem terribly trustworthy sources if you’re looking for accurate analysis of energy markets. At least part of the rise in prices this year is driven by the fact that supply isn’t increasing to match demand, but you’re not going to hear OPEC talk about this.
If I had to guess I’d say this is not a bubble, and if anything oil is probably still undervalued right now. I can think of a number of factors that plausibly contribute to the price of oil being as high as it is. Some of them are being mentioned in the press: the weak dollar, the concerns over possible war in Iran, the increased demand from Asia. On top of these things I think the long-term trends are going to cause oil prices to rise indefinitely. I’m not stocking canned goods in anticipation of a peak oil apocalypse, but the fact remains that oil is a limited resource and eventually the supply will start to decrease. We’re already seeing the growth of oil supply flatten out at the same time as demand from developing countries is ramping up rapidly, so it’s no surprise that prices would rise. (Had I the funds a few years ago I would have bet on this.)
Meanwhile, high gas prices in America will hopefully have good side effects, leading to energy conservation and spurring investment in alternative energy. Unfortunately, it’ll also bring economic hardship for a lot of people and push the economy further into recession, so I can’t really applaud it. However, I can at least be happy that I picked a good time to sell my car.

The skyscraper as climbing wall

We had the TV on at work during lunch and managed to see Alain Robert scaling the New York Times building. The feed cut away before he reached the top, which was sad because we were all hoping to see the greeting from the welcoming committee of police officers standing on the roof—this was not an authorized ascent. However, I have to assume the dialogue went something like this:

NYPD: I do not suppose you could speed things up?
Robert: If you’re in such a hurry, you could lower a rope, or a tree branch, or find something useful to do.
NYPD: I could do that. In fact, I’ve got some rope up here. But I do not think that you will accept my help, since I am only waiting around to arrest you.
Robert: That does put a damper on our relationship.

Meanwhile, some dude from Brooklyn thought this was sufficiently awesome that he went out and climbed it himself hours later. Pretty soon there’ll be guided tours up the side of the Times building…

Adventures in fume hoods

I’m still occupied with other activities (like unpacking boxes, and discovering just how many bugs I can inadvertently cram into 100 lines of perl), but in the absence of blogging I invite you to enjoy the latest PhD Comics strip on fume hoods.
This rings especially true since my lab in grad school needed a fume hood only occasionally, and therefore had only one which sat mostly neglected in the fabrication lab. This made it a fantastic storage closet for unknown chemicals until somebody actually needed to use it for science, at which point hazmat teams would need to be called. (Note to Berkeley EH&S: joking!)
In contrast, the most hazardous chemical at my new job is the curry from Teriyaki Boy, a.k.a. “The Yak”. (Angelenos: Picture the Japanese-food equivalent to Tommy’s chili.)