Wednesday, May 31, 2006

Is it all coming back to Smalltalk and Lisp?

Read Glenn Vanderberg's excellent article from "No Fluff, Just Stuff Anthology" now. He makes a strong case for Smalltalk, Lisp, Ruby and dynamic languages in general. The revolution is coming. Are you ready? Go get your squeak on!

Pair Programming: Is All The Time Too Much?

I work in an eXtreme Programming shop and we pair on ever single line of code. But, too much pairing can be bad. Some pairing partners, while excited initially to try something new, grow complacent after the honeymoon wears off. It's hard to keep them engaged. Pairing all the time stifles creativity because developers are simply uncomfortable taking risks in front of others (we are mostly introverted). It creates a strange group think atmosphere where pairs do what is comfortable and familiar. Few branch out and try new things. The ones that do, do it at home without the fear of failure in public. Sad but true.

Pairing on every single line of code is the path to broken windows. eXtreme programming enthusiasts scoff and grumble at this notion. Why? To ignore that developers are mainly introverts is fighting an uphill battle against human nature. The very thing that eXtreme enthusiasts claims that they embrace. Agility to me is about thinking to solve problems, not adding stifling processes or pithy mantras.

If pairing all the time is bad, is it alright to go back to our lonely cubes? NO! There is immense value in pair programming. In a good session, there's an unparalleled exchange of ideas and an unbeatable code review process. I find the good things happen if the pairing is not constant. Always pairing can be tiring mentally and physically. We all need time to recharge our batteries and reflect. Extended breaks can give us the spark of inspiration to solve that complex puzzle in our design that's been plaguing us.

The key is balance. Doing anything to the eXtreme risks team burn-out. Balance should really be the point of being agile. Take the advice of your mother. Everything in moderation is a good thing. Otherwise, you risk off going off the edge. Constant pairing erodes the benefits of it. Of course, the opposite is also true. The lonely coder can be a dangerous tumbleweed in your codebase.

My proposal is simple: Pair during design and creation of unit tests, not coding. This is where collaboration is a must and the most fun. A test-first approach helps a pair to design the domain language for business. It boils away all unnecessary abstractions and allows the pair to get to the heart of the problem. It becomes the design while providing the harness to verify its validity. Pairs challenge each other to write tests that express the business the most succintly.

Allow pairs to break apart to write the code that satisfies the tests that they write together. This allows personal time for reflection and to try out new ideas. It gives the much needed time to reflect and the exhilaration of collaboration. The pair should come back together after the code is complete and review what each other has done. A refactoring of each other's code is good at this point. Allowing the sharing of information without one pair becoming disenfranchised with a dominant other. Of course, if pairs feel the need to discuss issues as they come up in the code, they should. Remember, it's all about balance!

I have seen first hand the pitfalls of pairing too much. The code and design eventually suffer. Spaghetti ensues and no one wants to work on the brittle system. Quality slips and the team descends into finger pointing and negativity. Pairing only amplifies the problem because developers have no way to get away and heal their wounds. Everyone needs some time alone. But, we also need interaction to stay fully engaged. Everything to the eXtreme is bad. Balance is the order of the day. I will not offer any cute quotes or clever acronyms, just simple advice.

If you're thinking of trying out pairing or are just a burnt out XPer, try out my advice. It offers the best of both worlds. It's a meeting in the middle and is good to try out a new way of working together. You can have your cake and eat it too. Just don't eat only cake. You need your vegetables too.

Friday, May 26, 2006

Thursday, May 25, 2006

Rails Is Coming To Omaha

June 6. Be There. Matt Secoske will be giving the Rails presentation that will leave everyone breathless. If you live in Omaha, you do not want to miss this. The Ruby onslaught is coming. Grab the nearest closure and hold on for dear life! Extreme productivity might just run over you.

The location for the Omaha Dynamic Language User Group has changed for just this presentation. Attendance expected to me in the millions. Come early with your appetite for technological wonders.

See everyone there!

Eclipse Thesaurus Plug-In

I have a new version (1.01) of my Thesaurus Eclipse Plug-In. I basically had a bout of inspiration while I was researching SWT. It now has back and forward buttons. I added the ability to get more entries without scrolling down the page. There's quite a few bug fixes too.

The source is included. The model has been tightened up. I moved responsibilities to where they should have been in the front place. Hind sight is a wonderful thing. I'm still having fun with SWT and amazed that it does exactly what you tell it to. It's a nice framework to deal with. It all makes sense and looks wonderful!

Devil Horns



I have a confession. Metal did not originate the devil horns hand thingy. I have a second confession. I don't know who did. I have a third confession. The same hand gesture is used at P-Funk shows and has been like that for years. Ronnie James Dio is attributed as the originator in metal circles, but I think P-Funk has been using the symbol for years before him.

It's funny how similar early funk and metal truly are. Both are extensions to a group of people disenfranchised by the establishment. Funk in my book will always be a more organic, yet still loud form of rock'n'roll. Same thing with metal. It's just funny that two of my favorite forms of music use the same symbol to show respect.

I'm sorry I just had to post on this topic. I couldn't be quiet any longer. It's just not right for metal to take all of the glory and not acknowledge our alter egos in the funk world. I hope everyone understands. I got to go put on a "Motor Booty Affair" followed by "Holy Diver"! Funk and Metal on!

Back on Planet Statika

At work, I've been doing Java work again. It's weird going from Smalltalk to Java to Smalltalk and now back to Java. I've kept up to speed on my Java skills, so it's not like I'm starting from ground zero. We've been using Java5 and the generics are not as bad as I thought. They are actually quite handy to catch those pesky cast problems. But, they can get hairy if you don't have a proper object model.

Java is a different way of thought and there's advantages and disadvantages. The advantages are the sheer number of frameworks to pick from. It can be overwhelming. We decided to go with simply Hibernate/Tomcat/Axis for a simple SOAP web service. It's strange going back to a compile/wait cycle, but it's not bad. As for the disadvantages, it's a lot of configuration files with awful error messages if you happen to miss type your class name.

It's an interesting journey. I'm curious as to how Groovy makes the Java experience easier since it gives me my beloved "cheap" closures. It integrates tightly with Java (similiar syntax) and accepts the fact you are running on the JVM. Hopefully, I'll get a chance to try it out on a small piece.

Don't worry I still love Dynamica and will travel there in the evenings to dream. I will never give up my Smalltalk, Lisp, or Ruby, my brothers!

Monday, May 22, 2006

Positive

Just to a note to anyone that sees me being negative. Quickly remind me to:
Stop Complaining and take action. Return to positive form.

I've been trying to be a lot more positive these days. I was stressed at Smalltalk Solutions (not the conference, but other things in my life) and it showed. I took action when I came back and I've been in the best mood. My new mantra is to take action whenever something is making me unhappy and negative. Work toward eliminating the negative situation.

I quit smoking. I quit over-eating. I can quit being negative too.

Rock on!

Saturday, May 13, 2006

The Power of Blocks in DSLs

Charles Nutter has a great blog entry on a Bytecode DSL written in JRuby. If you look closely at the code, he's making great use of Ruby's blocks. It makes the code succint and powerful. Oh yeah, it's fun, too! The example could be done in any dynamic language with closures (Groovy for example).

I'm loving the examples of DSLs coming out of the Ruby community right now. They show off the expressive power of method_missing and blocks (or doesNotUnderstand: in Smalltalk). There's a lot of power in those two simple features that allow you to express higher level concepts easily.

Tuesday, May 09, 2006

My First Eclipse Plug-In

I got my first Eclipse plug-in working! I'm so excited! It works in Eclipse 3.1, Windows XP, and Java 1.5. I'm so proud of myself. It was a lot of fun to program. You might ask yourself, what is it? Well, it's a Thesaurus that accesses www.thesaurus.com and reformats the output to make all words clickable. It still needs more work like keyboard shortcuts, the ability to click on a word in the editors, and back/forward buttons.

SWT was a complete pleasure. It's an elegant design and far better than Swing (I could write a book about all of the bad design decisions in it). So now, I have one of my favorite tools in Eclipse as well. ROCK! My next project is the ability to give presentations in Eclipse. I'm thinking Groovy might be the perfect vehicle.

Sunday, April 30, 2006

What I Love About The Ruby Community

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.

Learning To Like iTunes

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

Cool Pictures

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

Smalltalk Solutions 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

Number Two In The World!

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

Smalltalk Solutions Cometh

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!

May Omaha Dynamic User's Group

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.





WhenMay 2, 2006, 7pm-9pm
WhereCafe Gelato

156th & Dodge

445-4460

Friday, April 14, 2006

Playing With Procs And Objects

One of the things that I love about Ruby is the ability to treat methods and blocks as the same:
def square(number)
number * number
end
method = method(:square)
block = lambda {|number| number*number}
numbers = [1, 2, 3]

#prepare to get the same answer
p numbers.collect(&method)
#result: [1, 4, 9]
p numbers.collect(&block)
#result: [1, 4, 9]

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:
#This fails
class Symbol
def call(*all)
method(self).call(*all)
end
end
p numbers.collect(&:square)
#result: ERROR!

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:
class Symbol
def to_proc
method(self).to_proc
end

end
p numbers.collect(&:square)
#result: [1, 4, 9]

This works like a charm! Now, by simply implementing :to_proc we can use any object to a call that expects block.
class MyComplicatedCalculation
#lots of instance variables..too heavy for a mere Proc
def to_proc
#calculations that could end world hunger go here
#For now, simply return a simple answer
lambda { | number | 42 }
end
end

p numbers.collect(&MyComplicatedCalculation.new)
#result: [42, 42, 42]

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!

Moved

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

Nintendo and Casual Gamers

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.