I’m a slacker

I was thumbing through Joel Spolsky’s new book on hiring talented programmers at the bookstore the other day. He asserts in the first chapters that great programmers are ten times more productive than bad ones. Could that be true? I played around with git today to generate statistics to see how it looks on our refactoring project this year:

user    commits   files changed  LOC added  LOC deleted         
dev0:       453            4258     +81538      -100344
dev1:       152            2297     +54462       -45343
dev2:       104             550     +24779       -17475
dev3:        82             250      +6465        -7852
dev4:        73             209      +3920        -2782
dev5:        56             208      +5158       -10049
dev6:        24             116      +3297        -7823

Wow. Of course KLOC isn’t everything, but take it on faith that dev4 causes more problems than he solves (dev5,6 were only on the project a short time), and that dev0 is the most awesome programmer that writes on this blog. And I thought surfing the web 7 hours a day was too much…

Wake up!

Dear Windows,

If you feel the need to download printer drivers at 3 AM, please don’t announce it by playing cutesy chimes. People are trying to sleep ya know? That goes double if the chime is just to announce a prompt to ask you if you want to search for updated printer drivers.

In other news, I’ve been using git at work a lot lately. There’s a steep learning curve and it took three tries to convince me that git is better than (version control of the day), but once I grokked it, I was hooked. So many hours have been lost waiting for subversion to show commit logs or perform commits. Also, I’m going back and forth to my laptop without being able to connect the latter to the network, so git-bundle and git-svn are much better than my previous solution of extensive use of patch(1). Branching and merging is so easy that I invent excuses to do them.

Buzz


Buzz
Originally uploaded by bluesterror

It’s like those bees with dogs in their lap, and when they stand up they shoot dogs at you?

From my camera phone.

sed

Sometimes I look at a long Unix pipeline and think, “I should do this in perl.” Other times, it is, “I bet I can do this all in sed.” So, here’s how to print just the lines of a file following a successful match in sed:

sed -n ':s; /^regexp$/{b l}; n; b s; :l; p; n; b l' file.txt

Lazyweb, is there a shorter way?

July

I suppose I must make a blog entry this month so that I do not get logged out for inactivity. Like the blog, I have let the projects slide lately. I have a half-drawn schematic sitting in Eagle and a new kite in the design phase, but I haven’t hit these particular projects too hard. How have I been spending the last month, then? Here’s how:

  • Working. Yay for compulsory overtime.
  • Teaching myself Spanish. I don’t know why.
  • Various wedding things. Invites are in the mail.
  • Going to a baseball game.
  • Guessing the plots of Sherlock Holmes stories after reading the first two pages.
  • Being unmotivated to do other stuff.

Angeline and I had engagement photos taken and we got a couple of proofs back. Check out the one I put one on the website.

Gibson pocket sled


Gibson pocket sled
Originally uploaded by bluesterror

Continuing with the dumb projects, here is my latest kite, a pocket sled (so called because you can fold it up into your pocket) with a Gibson guitar logo appliquéd onto the front. Mostly I was just practicing some complicated sewing here rather than shooting for the end product, but it came out well enough. I might tackle a large kite bag next, and then perhaps the big rokkaku I have been planning for a while. Or maybe another practice kite.

Oh, I’m going to hotlanta this weekend to make up some BBQ with the relatives. I think this is my favorite new family tradition. Pork!

Toronto

I’m killing time in the Toronto airport after having spent the last couple of days visiting with Angeline’s family while she and her sister and brother-in-law are here for an endocrinology conference. All in all it was a great trip if too short — I had a nice time playing with Angeline’s nephews, drinking beers with Sameer, and wandering the city on my own whenever I had unscheduled free time.

Rather than bore with details, here are some of my general ugly-american impressions of the city from my fourth visit:

  • Toronto wants to be NYC it seems, but I have to say that I find TO more enjoyable than its stateside counterpart. Perhaps it’s the general lack of rudeness.
  • Every Canadian knows every famous Canadian. This is because every time Alex Trebek, say, is mentioned on Canadian TV, they say, “oh by the way, Alex Trebek is from Canada!”
  • In Toronto, the movie “13th Floor” was called “2nd Floor,” because in some buildings only non-prime numbers that start with ‘S’ are considered lucky. Okay that’s a lie, but the elevator in Angeline’s brother’s condo really takes number skipping to an extreme.
  • There’s a store called ‘Bowring Canadiana’ which I pronounce “boring” in my head and I giggle to myself
  • Lots of US brands here have different names than in Canada. I saw a commercial that said, “It’s not delivery, it’s Delissio!” And it makes me wonder if DiGiorno is the name of a Canadian serial killer or something. You know, it’s the little things, le big mac, and so on.
  • Meals:
    • best: eggs, bacon, potatoes, crepes, cantaloupe, pineapple, strawberry and
      two pieces of toast at Cora’s which I found serendipitously a few blocks
      from the hotel
    • worst: Ritz Caribbean, which had jerk chicken for $3.99 CDN. Cheap and
      edible, but the pointyness of the jerk-flavored chicken bones was somehow
      off-putting.
    • trendiest: SushiTrain on Yonge, where Angeline and I split four maki rolls
      and a pair of nigiri. The Japanese-modern decor blended well with the
      dance music overhead and the tasty fusion style offerings. Place was
      dead on a Saturday night though.
    • best deal: danish and (harsh) OJ for $2.68 at the airport Tim Horton’s.
      Same would cost $8 at Charbucks.


I am looking forward to a nice nap when I touchdown in DC in a few hours.

Arduino POV


Arduino POV
Originally uploaded by bluesterror

Since everyone else is doing it, I decided to hack together my own persistence of vision thing this evening. This is a circuit where you have a single vertical line of LEDs, but if you turn the LEDs on and off fast enough and wave them around, your eyes are fooled into seeing complete letters. It only took about 20 minutes to write the C code to load up onto my trusty ATmega8, then I used a camera with a long shutter period to take the picture to the right.

I realize my blog has devolved into Bob’s Dumb Project Of The Week lately. I’ll have to work on that. Lots of travel is coming my way soon: Toronto this next weekend, Atlanta in three weeks, and Warrenton, VA somewhere in between. I shall report on them soon enough.

Arduino Clock


Arduino Clock
Originally uploaded by bluesterror.

I spent part of yesterday and today assembling this monster of a digital clock. The brains behind it, like my previous project, is a Dallas RTC chip; the rest is just microcontroller glue to read the time over the bus and write the hours and minutes to a quartet of seven segment decoders. The arduino microcontroller board can run off of a 9V battery so this assembly is portable, like the, er, $0.50 worth of electronics that are in your wristwatch.

Angeline had a good question for which I didn’t have an entirely satisfactory answer: “Why?”

Brian K

Last Monday I attended an ACM lecture featuring Brian “Zapp” Kernighan, coiner of the name “Unix,” the ‘K’ in awk, as well as the ‘K’ in K&R. The gray-haired professor reminisced about the golden days sitting across from Ken Thompson’s and Dennis Ritchie’s desk (Ritchie is a slob of the first order). The salient points: make software more simple, avoid the second system effect (as in Multics), and find a small group of talented guys and start a revolution (probably not in operating systems). In other words, a pretty good summary of The Mythical Man Month.

A bunch of nerds got him to sign their copies of The C Programming Language. It was sad.