Making the ugly elegant one day at a time
Gerald Jay Sussman
...And So Many More...
05/01/2003 - 06/01/2003
06/01/2003 - 07/01/2003
07/01/2003 - 08/01/2003
08/01/2003 - 09/01/2003
09/01/2003 - 10/01/2003
10/01/2003 - 11/01/2003
11/01/2003 - 12/01/2003
12/01/2003 - 01/01/2004
01/01/2004 - 02/01/2004
02/01/2004 - 03/01/2004
03/01/2004 - 04/01/2004
04/01/2004 - 05/01/2004
05/01/2004 - 06/01/2004
06/01/2004 - 07/01/2004
07/01/2004 - 08/01/2004
08/01/2004 - 09/01/2004
09/01/2004 - 10/01/2004
10/01/2004 - 11/01/2004
11/01/2004 - 12/01/2004
12/01/2004 - 01/01/2005
01/01/2005 - 02/01/2005
02/01/2005 - 03/01/2005
03/01/2005 - 04/01/2005
04/01/2005 - 05/01/2005
05/01/2005 - 06/01/2005
06/01/2005 - 07/01/2005
07/01/2005 - 08/01/2005
08/01/2005 - 09/01/2005
09/01/2005 - 10/01/2005
10/01/2005 - 11/01/2005
11/01/2005 - 12/01/2005
12/01/2005 - 01/01/2006
01/01/2006 - 02/01/2006
02/01/2006 - 03/01/2006
03/01/2006 - 04/01/2006
04/01/2006 - 05/01/2006
05/01/2006 - 06/01/2006
06/01/2006 - 07/01/2006
07/01/2006 - 08/01/2006
08/01/2006 - 09/01/2006
09/01/2006 - 10/01/2006
10/01/2006 - 11/01/2006
11/01/2006 - 12/01/2006
12/01/2006 - 01/01/2007
01/01/2007 - 02/01/2007
02/01/2007 - 03/01/2007
03/01/2007 - 04/01/2007
04/01/2007 - 05/01/2007
05/01/2007 - 06/01/2007
06/01/2007 - 07/01/2007
07/01/2007 - 08/01/2007
08/01/2007 - 09/01/2007
09/01/2007 - 10/01/2007
10/01/2007 - 11/01/2007
11/01/2007 - 12/01/2007
12/01/2007 - 01/01/2008
01/01/2008 - 02/01/2008
02/01/2008 - 03/01/2008
03/01/2008 - 04/01/2008
04/01/2008 - 05/01/2008
05/01/2008 - 06/01/2008
06/01/2008 - 07/01/2008
07/01/2008 - 08/01/2008
08/01/2008 - 09/01/2008
10/01/2008 - 11/01/2008
01/01/2009 - 02/01/2009
09/01/2009 - 10/01/2009
Sunday, April 30, 2006
Chris Petrilli writes about one of the things that I love about the Ruby community:
Spiffy. In some ways they’re juts rediscovering what the Smalltalk world has had for a long time, but there’s a lot of new stuff happening too, and the “spirit” of the community is what attracts me. There is a certain unwillingness to accept wrote answers and look for new solutions. They also seem, unlike so many others, to not have forgotten where so many of the ideas come from.
The youthfulness and excitement of the Ruby community attracted me to the language even before Rails. It was the knowing your past, but looking at the future that got me. I love it. It makes me look past a few shortcomings in the language (like & and that blocks are not first class objects). But, it's going to be a fun journey with so many passionate people.
When I won my iShuffle last year, I was very angry with Apple after installing iTunes. It installed itself itself between my computer and the CD-ROM (which I found out when I uninstalled it and my CD-ROM disappeared). And let's not forget that it tried to rearrange my existing MP3s after I told it NOT to. It was a frustrating experience and it cooled my desire for a Mac real fast. So, I uninstalled it; set my computer back to its initial before-iTunes state; and downloaded a Python script to add MP3s to my iShuffle. I love my iShuffle.
Fast forward another year and I have won another Apple product: the Nano iPod. I have talked to several people who think of me as crazy for my rants against iTunes. They told me that iTunes is wonderful and what is my problem? Well, I told them that I hate the "by song" view. I listen to albums gosh darn it! They assured me that they too have big collections and iTunes is awesome. Maybe I'm missing something here, no? I install it; try in earnest to use it; and go as far as to download Podcasts.
To cut a long story short, I've spent the weekend with iTunes. I learned how to get around what I thought were deficiencies. The path to liking iTunes is underway. My real complaints were really that it was a different way to work on my MP3s. It's already forcing me to tag all of my MP3s in my iRiver so that they can be easily imported into iTunes. I even learned how to sync both of my iPods.
My lust for a Mac is increasing.
Saturday, April 29, 2006
Adriaan van Os has posted some great pictures of Smalltalk Solutions 2006. I especially liked this one:
Hold on one minute while I channel the gods of Smalltalk past
I never thought I looked silly but, this proves it! The pictures are fabulous. They are pure fun!
Friday, April 28, 2006
I've been spending most of the day recovering from the massive idea exchanges at Smalltalk Solutions 2006. I had so much fun talking with everyone. I'm starting to feel comfortable giving presentations and I think it shows. As given by this review by James Robertson:
Blaine gave a good talk. He was funny, self deprecating, and well prepared.
If he only knew how many times I practiced and the amount of time I used for research. I'm glad it showed. I enjoyed giving it and I can't wait to unleash it on Java and Ruby crowds! So, what were my favorite presentations? Bar none, it had to be Brian Foote's keynote and Lukas Renggli's talk on Pier. But, I must admit I got private sessions where Colin Putney showed his design for Monticello2 (WOW). Andres's thoughts on the coding contest, and Hans-Martin Mosner showed me some "Behavior" magic. I will soon be taking over the universe with the information given to me.
I learned so much during the conference. Everyone I talked to gave me fresh perspectives on a wide range of topics. I'm still busy writing in my journal all of the great conversations I had. I can't decide if my brain is hurting from caffeine withdrawal or all of the possibilities. I think it's the latter.
My only real complaint is that we didn't have a space to have a Camp Smalltalk. I would have loved to paired with some folks. Maybe next year, we can find a spot in one of the coffee shops and take it over.
I can't wait till next year!
Thursday, April 27, 2006
I became the number two Smalltalker in the world this past week. It feels great. The coding contest this year was so much fun. Michael Lucas-Smith came up with such a great puzzle to solve. I loved every minute of it. I used Dolphin 6 for my player and it was an absolute pleasure to program in. My brain hurts.
My great friend, Andres Valloud is number one and for good reason. I knew I was beat when we compared designs after the contest. Andres's design was just gorgeous I hope he blogs about it. I learn so much from him. I wish he would blog more about what goes on inside of his head. It's refreshing how he thinks and he's the type of person that makes you push yourself harder to do better work (or shall I say art?).
Great design won the contest. I hope Andres blogs about his design and decisions in the contest. It would be a lot of fun to read.
We're talking about doing the coding contest next year and we're batting around a lot of ideas. Now, we'll get to think about the contest from the reverse direction. I'm excited about working with him on that.
Saturday, April 22, 2006
I'm leaving for Toronto tomorrow to attend Smalltalk Solutions. I'm so excited! I will be presenting as well as you all know. Nervous doesn't even being to describe my anxiety. Let's hope I don't get booed off the stage when I present "Controlling Pain: Augmenting Unit Testing". I've been practicing to reduce my twitches and it should be an incredible experience. To give everyone an extra incentive to show up, my talk is all in Squeak (No PowerPoint here, buddy).
After Smalltalk Solutions, I will be focusing on presenting the talk in Java and Ruby versions. I'm dubbing it "Reflective Testing" and it should make for more fun presentations!
I can't wait to see everyone! See you guys at the pub tomorrow night!
April showers bring May flowers or shall I say another awesome Dynamic Language User Group Meeting. This month we are honoured to have Scott Hickey presenting Groovy. His presentation will cover an overview of the language highlighting Groovy's dynamic programming features. He will also show some common Java programming idioms and show how we can replace Java with Groovy to make our application code more readable. I simply can't wait! As always bring everyone you can.
Friday, April 14, 2006
One of the things that I love about Ruby is the ability to treat methods and blocks as the same:
At first glance, you might think this happens because of method and block having a common method in :call. But, you would be wrong. Try this code and watch it fail:
Well, the first clue is the weird "&" in front in all calls. This converts a Proc object to a block to be passed into the call. The interpreter expects an object to be a Proc after the "&" or it complains you didn't give it one. What are we to do? Well, thankfully, the interpreter tries to do the conversion by calling :to_proc. Let's try it:
This works like a charm! Now, by simply implementing :to_proc we can use any object to a call that expects block.
I do wish Ruby just allowed me to implement :call and be done with it, but implementing :to_proc isn't much more work. Have fun!
I moved my blog to a bright new location and you can access the feed right here. It's been a long time coming. If anyone runs into any problems, let me know!
Thursday, April 13, 2006
James Robertson talks about the market that Nintendo is after and it's the causal gamer. I must admit they get all of my gaming money (which isn't much). I'm probably what they consider a casual gamer. I don't play that much and when I do it's just to have some mad fun to clear the mind. Nintendo has the best "fun" games. Bar none, my favorite games ever are the Mario and Donkey Kong off-shoots (Donkey Kong Country, Mario Kart, Mario Bros, Wario, Yoshi, etc). Plus, I like carrying my games with me. The PSP peeked my interest when it came out, but I really don't enjoy racing real cars, shooting people, or robbing people. I want escape. Nintendo gives me that and fun in spades. Besides, the DS touch screen and on-line play is awesome. I dare anyone not to get addicted to Mario Kart.
Wednesday, April 12, 2006
From Blabbermouth comes this funny bit of news about MiniKiss vs. TinyKiss. It does't get much stranger:
Robert W. Welkos of the Los Angeles Times is reporting that Joey Fatale, the 4-foot, 4-inch New Yorker who heads the all-dwarf KISS tribute band MINIKISS, is denying published reports that he tried to sneak past security last month at the Hard Rock Hotel and Casino in Las Vegas to confront a rival band leader, 4-foot "Little" Tim Loomis of TINY KISS, for allegedly ripping off his idea for such a group.
Sunday, April 02, 2006
I've been looking through old code as of late and well, it's...it's...EMBARASSING! There I said it. Does anyone else do this? I was looking at my Thesaurus project (my Squeak version and soon-to-be Java version) and was appalled at a lot of the code. So, I spent sometime refactoring and getting the code back into shape. My Thesaurus project in Squeak was a quick excursion into writing Morphs and that code was fine. What made me crinch was my parsing code! For one thing, I put all of the code for parsing into one class. It was doing all sorts of stuff with the HTML elements that it had no business doing. The first order of business was to move all of the low-level HTML traversal code into a new class. This made the parser much more readable and took away the noise inside of it. The next order of business was the actual traversal code. I made some huge blunders in my implementation of the depth-first/breadth-first algorithm. I knew the first problem was when I couldn't even understand what I was doing!
Here's the original code:
elementsIn: anElement do: aOneArgBlock depthFirst: aBoolean
YUCK! What was I thinking with two checks for depthFirst or not? Here's the new code (which is a new class by the way!):
pvtDo: doBlock depthFirst: isDepthFirst
Now, you might notice some weirdness like the #pvtCurryForContinue:. All it does is to call the continue block by default if the block only accepts one argument. Otherwise, it let's the block continue through. Here's it's implementation:
This is my functional programming training shining through. This code is much cleaner and easier to read than the one before.
This was just one simple example. I used the Thesaurus project to refactor to see how enforcing private members in Smalltalk would feel. So far, I found a lot of breaches of encapsulation that I had not noticed in the heat of development. Even with categorizing methods as private and with comments, I still broke the boundaries. The pvt at the beginning makes it obvious and Squeak's compiler tells me immediately when I have done something wrong.
After the refactoring, I felt my design was much cleaner overall. So far, I'm enjoying using pvt at the beginning of my private methods. It makes me get into the habit of "telling" my objects instead of "asking" which I generally do well. But, it helps when I'm weak in the rush to get something done or simply not as focused as I should be. The public protocol is obvious and minimal. Plus, if I have too many pvt methods, I start looking through my methods to break the object down further.
My Weekly Top 20 Artists