March 2004

Electronica and The Flintstones


I like electronica. Some of it, like
Daft Punk, Chemical Brothers, Fatboy Slim, Amon Tobin, and Jason Dunne quite a bit. Not to mention Trip-hop, esp. Portishead and Emilana Torrini.

And I like to listen to Trance music at work. I put on Rhapsody’s Trance station and code like the devil. But I gotta say, that trance music is a lot like watching the Flintstones drive somewhere.

Flintstones driving: you see Fred and Wilma pedaling their stone-wheeled car pretty hard. You see the background whizzing by. Then you realize that it’s the same background being repeated over and over to give a sense of motion.

Trance music: you hear some melody. You keep time with a pretty driving beat. You have the sense of time passing and interesting things happening. But really, it’s just the same thing being repeated at some rate just beyond your attention span.

Trance music is nearly modeless. This is a case where I prefer something more modal most of the time. Though not that kind of modal. But trance music sure helps me code, especially when it’s fairly deep coding. And I have to keep the leg jiggling.

Music

Comments (0)

Permalink

Ian, the Basketball Star

Anna had girl scouts last night so Ian and I got some “hangout time”. It was really fun. There was a slight drizzle coming down. We were going to go for a walk, but after Ian got in the double stroller, he discovered a basketball and decided to play the “throw the basketball in the street” game. I finally redirected him to the neighbor’s house where they have a full size basketball hoop. He tried to make some baskets and really enjoyed it when I made baskets. By now it was starting to rain a bit more.

I redirected him back down to our house (under no small amount of protest) and I got out our kid-sized basketball hoop. He had a blast shooting baskets in our driveway. Though he was only pointing at the hoop for about 10% of the shots. The rest of the time, he was just shooting into the air. It’s pretty cool to see what kind of control he has with a ball at 20 months.

It finally got to pouring down rain. Ian was soaked and covered in dirt and gravel from having fallen down a bit. Nonetheless, he didn’t want to stop. I finally convinced him to climb into the stroller by putting the basketball in the other seat of the stroller. With that, Ian, basketball, and I walked to Payless and picked up some groceries.

Kids
Old Family Blog

Comments (0)

Permalink

VBR MP3s and the iPod

I got a 40GB iPod a few weeks ago. I have my entire CD collection (~500 CDs) ripped and encoded with EAC (secure mode) and LAME (–alt-preset standard). This gives me VBR MP3s with a bitrate averaging about 190kbps.

Unfortunately, unlike every other mp3 player I’ve used (Winamp, WMP, RCA Lyra, Rio PMP500, iTunes itself, you name it), the iPod cannot correctly calculate the length of my VBR tracks. I get 30 seconds or more of silence after nearly every track. Occasionally, I also get a track that cuts off prematurely.

I did discover that if I set the stop time manually in iTunes to 1 millisecond less than the track length (it won’t let you set it to the exact end of the track length), it plays to completion properly without any additional silence or cutoff on my iPod.

So I wrote a small hack to parse and update my “iTunes 4 Music Library.itl” file so it sets the stop time on every track to its length. (I also set it to start 1ms into the track just in case) This was done in elisp and can be found in the extended entry of this blog entry in case anyone wants to use it. I imagine that the union of the set of iPod users (a highly user-friendly device) and the set Emacs hackers (a highly user-hostile editor) approaches zero. But here it is for that small cadre of you. I’d be glad to help anyone else a) get Emacs set up to use this or b) by updating their iTunes library file with my script (at their own risk).

Continue Reading »

Music

Comments (0)

Permalink

A Quick Access Frontend

James Robertson talks about how we, as developers, tend to make software unneccessarily complex. I wholeheartedly agree with James on the point that we should make software only as complex as is necessary (hell, I wholeheartedly agree with nearly everything the man says). I do, however, have some sympathy for the rejection of the “quick Access front end” idea. Access is simply an unpleasant piece of software to work with. I’ve done a number of small systems with it and dreaded every minute of working with that tool. I would argue that it’s no more difficult to put together a simple LAMP (Linux/Apache/MySql/(Perl|PHP|Python) app than it is an Access app. Or better yet, a Seaside app instead of an Access app. Developer wise, it’s probably more efficient and you don’t have those pesky client update issues.

Access is about as modal as you can get for a development tool (aside from, perhaps, your average shell script), and we know how I feel about modal tools.

Software

Comments (0)

Permalink

Why Modelessness?

I’ve been uninclined to start a blog for years, honestly. I mean blogs are a bit vain, aren’t they? Do I really have anything to say that the whole world needs to read? I think I probably squarely fit the mold outlined by this Kuro5hin post. In fact, I’d better do some more tweaking to the default MT template I’m using! (I did tweak it to embed my PhotoBlog on the right - gimme a break!)

Nonetheless, there have been some interesting posts lately regarding why people do or don’t use Smalltalk. It seems like those who disparage Smalltalk haven’t really done much Smalltalk, often making claims about Smalltalk that are patently false. What is it about Smalltalk (and Lisp) that people really resist?

I joined a team at my employer, Purdue University, a few years ago where development was done in VisualWorks Smalltalk. I had wanted to join the team years prior, but I was really resistant to the idea of doing Smalltalk. For one, it was just weird. I had seen the development environment and it was ugly and very WIMP-ish. I was very comfortable with text-editing, compiling, the usual Unix-ish development model. Yeah, I’d also done VB, Delphi, Powerbuilder, etc., but Smalltalk just seemed super-strange. I was also concerned about what kind of hit my rsum would take with an unknown number of years of Smalltalk on it. I decided to try and get on the team anyway since there were some really smart people working there.

Once I took the plunge and decided to defenestrate my preconceptions and learn to do things “The Smalltalk Way”, I have to tell you - it was like a religious transformation. Working in Smalltalk as a developer is simply better. Now before you ask what was in the kool-aid on that team, I think I can demonstrate why Smalltalk (and probably Lisp) is simply a better tool for writing software than nearly anything else available.

People are notorious for having a small “stack”. By stack, I mean layers of context you have to save to operate in successive modes over time. You’re working on the next great american novel. The detective is about to uncover the critical clue to solve the mystery. You get a phone call. So you save what you were thinking about the novel on to your mental stack. You talk to the caller. Then, you get a call on your second line. You put the first caller on hold. You save what you were talking about with the first caller on your mental stack, “on top of” the stack frame about the plot of your novel. You talk to the second caller. Your Palm Pilot beeps reminding you of your meeting with the publisher tomorrow. You save what you were talking about with the second caller on your mental stack so you can decide whether the Palm Pilot is indicating something of great importance about your schedule. By the time you turn off the Palm Pilot, hang up with the second caller, and hang up with the first caller, you’ve lost the plot of your novel off the bottom of your stack. If people try to repeat more than seven numbers from a random sequence, they fail. Small stack. Evolving as hunter-gatherers, we just didn’t have a lot of context we had to push and pop on and off of our mental stacks. Couple that with a small locus of attention and you realize we’re ill equipped to write complex software.

One of the things you learn in rudimentary user interface design is to avoid modal interfaces. A modal interface is one in which the user is restricted at some point to a limited set of operations before proceeding. Modal dialog boxes, once common in GUIs, are now widely reviled. Modal interfaces confuse the user, hide functionality, and are generally less efficient to use. It’s harder to develop a modeless interface from a developer’s point of view, but it’s generally recognized as the Right Thing To Do.

How does this relate to Smalltalk? Several ways. Developing in Smalltalk is modeless. By modeless, I mean that unlike, say C, you don’t have the edit-compile-run cycle. You don’t even have the edit-run cycle of, say, Perl. Smalltalk and Lisp (and dialects) are unique in that you can change the state of the running system from the running system. This is the modelessness of Smalltalk. You add/edit/delete a class or method, and you’re done. That’s it. The power of this model cannot be understated. There are no restrictions to what you can do at any point in the development process. Want to edit a class in C++ or Java? Shut down the system, edit, recompile, restart. Wanna change a string resource in Perl? Shut down the system, change, restart. Wanna make any change whatsovever in Smalltalk? Change the method/class, accept.

Additionally, in Smalltalk, everything is an object. Everything. Some people find this restrictive. I find it extremely liberating. Why? It gets back to the limited human stack and locus of attention. Because I don’t have to keep on my stack whether, like in C++, I’m working with objects, simple type declarations, functions (which are not first class), typedefs, etc. In Smalltalk, you have objects, you send messages to those objects. That’s it. It’s a nearly syntax-free language. This makes my small-stack, limited RAM brain very happy. I can focus on the work I have to do and not whether I need to dereference a function pointer or whether I should pass a parameter by value or reference.

Sure, as programmers, we tend to have to have particularly well-developed facilites for keeping deeper stacks and more information in our L2 brain caches. And I have done enough work in the languages on the Fortran trunk of the evolutionary tree of languages (C, C++, Java) to have developed these skills and get my work done. But having those types of skills is kind of like having to develop the muscles of a world-class bodybuilder just to be able to walk down the street. It’s wasteful. I want a language that caters to me and not the other way around.

Oddly, I’m not doing Smalltalk anymore (as of the last month or so). My employer is ditching our project and bringing in an ERP. I suppose it makes sense, but I miss the power and flexibility of Smalltalk already. I’m doing some Scheme work as a consulting gig, but it is, ironically, using a Scheme->C compiler, and so I’m on the edit-compile-run treadmill anyhow.

I find that my desire for modelessness reaches far beyond just programming. I modelessness is desirable for many of life’s endeavors. At some point I hope expound modelessness in text editors, religion, fashion, and maybe, if I can put the synapses together, music.

Software

Comments (0)

Permalink