October 8th, 2008


Hejlsberg and Steele on Concurrency and Language Design

Folks who are interested in Where Programming Is Going may want to listen to this talk on MSDN. It's an interview with Anders Hejlsberg (Microsoft's main guy on .NET) and Guy Steele (famous for Common Lisp and Fortress) talking about issues in modern language design, with a particular eye on concurrency. Nothing revolutionary, but it's a good talk with two of the most important current figures in the field, about what they've been trying to deal with in the languages they're propounding at Microsoft and Sun.

It tries to push the Silverlight version of the talk at you, but if you look down the page a bit, there are lots of other options if you don't have Silverlight installed. (I listened to it on MP3, since I was backgrounding it while I worked...)

Discipline to Habit

One of the less obvious reasons to be disciplined about good programming is precisely that, if you do so, it becomes steadily easier.

Consider: if you only refactor and clean up your code occasionally, then it's a painstaking project each time you do so. You have to remind yourself what it *feels* like to clean up your code. It's an intellectual exercise that takes a bunch of effort, examining it and trying to figure out which refactoring pattern to apply. As a result, it's not so much fun.

By contrast, if you do so *regularly*, it becomes a little easier each time -- no longer so much a matter of effort as of habit. The result is a virtuous spiral, producing better code every day simply because it's easier to do so than to produce bad code. The refactoring literature uses the metaphor of smell on code: Fowler's classic book on the subject is mostly an encyclopedia of "bad smells" to learn. Once you've done it long enough, the metaphor becomes more and more apt -- recognizing and replacing the bad smells gets downright instinctive.

I am reminded of this today, when I'm pretty braindead and attacking a new feature that didn't fit in with the grungy IM stack very well; as things would have stood, it would have required a bunch of duplicate code paths. But since I'm so used to refactoring the code (and have good enough test suites for it), I didn't even *think* about it before refactoring to clean up those paths. It was intuitively obvious that it had to be done, so even with my morning Clover buzz wearing off I could just shove code around until adding the new feature was just a one-line enhancement. Very satisfying, especially on a day where I'm not up for hard thinking...
  • Current Music
    Lo Cor De La Plana - Mi parlètz pas de trabalhar
  • Tags

Oh, and that track in my last post?

I should do a bit of signal amplification here. Thanks to siderea for recommending the group Lo Cor De La Plana. (Warning: their homepage is MySpace, and a little crappy. Don't hold it against them.) Based on her review, I just picked up their album Tant Deman, and having just catalogued that for my iTunes, I have to agree: these guys really rock.

See her review for more details, and then note that the album is only $7.99 as a download from Amazon. IMO, it's a no-brainer if you like kicky music (and don't mind lyrics in a foreign tongue). I think I'm going to need to keep an eye out for the next time they're in town...

Those songs again, now with answers and commentary

Since a bunch of people did play along with the "guess the song from the first line" game yesterday, I should give the full answer key:

1. "My shoes went out with a pair of red hot high heels last night" -- My Shoes, the Bobs [One of those fun, catchy, weird songs that the Bobs are so good at.]

2. "Tonight's the night we'll make history, as sure as dogs can fly" -- AD 1928/Paradise Theater, Styx

3. "Who are you" -- Who Are You, the Who [The gimmiest of the gimmies: arguably ambiguous, but the obvious answer was correct in this case.]

4. "Now I dialed 911 a long time ago" -- 911 is a Joke, Duran Duran [jadasc got the song, but as it happens my iTunes was weirdly stuck on Duran Duran yesterday, so it was their version.]

5. "Captain's on a holiday, first mate has gone away" -- Mr. W, Ookla the Mok [The song I think of as the "Mister Worf rap". ladysprite was the only person to get this, as I'd figured she would be: she's the one who originally turned me on to Ookla, the world's best SF-geek rock band.]

6. "Don't let's start, this is the worst part" -- Don't Let's Start, TMBG

7. "Movin' on the floor now babe, you're a bird of paradise" -- Rio, Duran Duran

8. "Put down your remote control, throw out your TV Guide" -- UHF, Weird Al [A favorite of mine: while I'm fond of much of Weird Al's music, his original stuff is often my preference.]

9. "Six o'clock in the morning, I feel pretty good" -- Cathedral, CSN [Caught by oakleaf_mirror. This is one of my really old favorites, a song I still find particularly haunting.]

10. "How's everybody doing tonight -- you, you, and you (way in the back)?" -- Kooza Dance, Cirque du Soleil [A bit obscure simply because it's so new, but keshwyn caught it. This is the beginning of Act II, the big Las Vegas Day of the Dead number.]

11. "Any dolt with half a brain can see that humankind has gone insane" -- My Eyes, Dr. Horrible [Lots of people got this one, which is pretty much what I would have expected from my flist.]

12. "Ecce gratum et optatum ver reducit gaudia" -- Ecce Gratum (club version), Qntal [shalmestere made the entirely reasonable guess that this was from the Carmina Burana, but in fact it is a brilliant piece of electronic club music from the album Illuminate. I blow hot and cold on Qntal, but this one is fabulous.]

13. "I'd drive a million miles to be with you tonight" -- Everybody Have Fun Tonight, Wang Chung [The song whose epilepsy-risking video exemplified 80s MTV.]

14. "At first I was afraid, I was petrified, kept thinking I could never live without you by my side" -- I Will Survive, Gloria Gaynor [I hadn't even realized until the discussion on this one that it was a cover, and there are several versions of it. A couple of people were surprised to find disco on the list, but Priscilla, Queen of the Desert is a favorite movie of mine, and much of the soundtrack is in my "Better" playlist.]

15. "I'm never relaxed, even when I say I am" -- Hell Above Water, Curve [Perhaps not surprisingly, the heavy metal parts of the playlist were the bits that nobody guessed. Of course, this may have to do with the fact that the lyrics are almost incomprehensible: I had to double-check this one online to decipher the line.]

16. "Sometimes I feel I've got to (BAMP BAMP) run away" -- Tainted Love, Soft Cell [Now with annotation from new_man.]

17. "Shake, shake, shake, signora, shake your body line" -- Jump in the Line, Da Vinci's Notebook [Lots of people knew the song, but asdr83 gets the extra point for correctly guessing that I'd have the DVN cover on my playlist.]

18. "Well, come on darlin', the stars are burnin' bright" -- The King and Queen of America, Eurythmics [I will admit surprise that nobody guessed this one: I consider it a classic, but I'm a big Eurythmics fan.]

19. "The Breakfast Creek hotel is up for sale" -- Dream World, Midnight Oil

20. "When they all come crashing down, midflight" -- The Only One, Evanescence [See previous comment about heavy metal.]

Putting that all together, it's a pretty good encapsulation of my musical tastes: a deeply mixed bag of geekiness, metal, 80s and 90s classics, some humor and some angst, all tied together by a strong beat...
  • Current Music
    Evanescence - Tourniquet
  • Tags