Archive for September, 2007

About Me

I finally got around to creating an About Me page for my blog, which I’ve been meaning to do every since I read Jeff Atwood’s commentary on it in his Thirteen Blog Cliches post.

My name is Russell Ball and I am 35 years old. I currently live in Kansas City, Kansas with my wife and six year old step-daughter. I’ve been a developer for almost eight years. I spent 2 years with the job title of architect, but recently switched jobs so I could be a developer again because I missed coding. I’ve mostly worked in Microsoft-dominant development environments, but I have become very interested lately in expanding my horizon to other tools, platforms, and languages. My blog subtitle comes from my Starbuck’s caffeinated beverage of choice.

A Few Random Things You May Not Know About Me

  1. I lived in the Dominican Republic for a year when I was 17 and still speak passable Spanish
  2. I taught first grade for three years in an inner city school in Washington, DC. where 95% of student population qualified for a free lunch and 100% were minorities.
  3. I own about 20 books on chess and used to play speed chess in the park in Dupont Circle almost every day when I lived in Washington, DC, but I haven’t played in several years.
  4. Besides trying to qualify for the 50 state club by running a marathon in each state, I have also run in a few ultra-marathons. I finished a fifty miler last year in just over nine hours and have been toying with the idea of running a hundred mile ultra-marathon some time in the next few years.
  5. I’ve been sky-diving three times and would love to go again if I could somehow convince my wife to let me do it.
  6. I have been in an earth quake, blizzard, hurricane, drive by shooting, and a coup d’etat.
  7. I am a bit of a beer and coffee snob (the darker and stronger the better). I’ve even made a few batches of homebrew before with the help of my running/drinking buddy.

Favorite Books

  1. Cider House Rules – John Irving
  2. Skinny Dip – Carl Hiaasen
  3. Anansi Boys – Neil Gaiman
  4. Lonesome Dove – Larry McMurtry
  5. Wizard of EarthSea – Ursula Le Guin
  6. Angels and Demons – Dan Brown
  7. Shantarum – Gregory David Roberts
  8. The Curious Incident of the Dog in the Night-Time – Mark Haddon
  9. One Hundred Years of Solitude – Gabriel Garcia Marquez
  10. To Kill A Mockingbird – Harper Lee
Favorite Musical Groups

  1. RadioHead
  2. Green Day
  3. Nirvana
  4. Cold Play
  5. Death Cab For Cuties
  6. Weezer
  7. Rachmoninov
  8. Beck
  9. Dashboard Confessional
  10. Nine Inch Nails

Popularity: 7% [?]

I’ve Been Raymondized…

Raymond Chen, the mastermind behind the popular OldNewThing blog, linked to my New Employee Hall of Fame post a few days ago and my web traffic stats took a brief, meteoric spike (at least by my humble standards). I even got a few comments from readers who got errors when trying to listen to the wav file because the bandwidth limits on the google storage service that was used to host it had been exceeded.

I wonder if Raymond Chen stays up at night plotting how he will next wield the power that comes from his vast geek fame. He should print “I’ve Been Raymondized” bumper stickers and give them out as souvenirs to all of us “15 minutes of fame” welfare recipients.

By the way, if you somehow missed it, Raymond Chen’s new employee story has mine beat. It involves someone hitting Bill Gate’s car on their first day and has spawned a mini urban legend debate in the comment section of the post. Truth or fiction, it makes for pretty amusing reading.

Popularity: 4% [?]

I hate to talk about another guy’s tool, but…

If you work with PowerShell and don’t already have PowerTab installed, take a few minutes to download and install it now. It’s a painless setup, especially if you just keep hitting enter at the prompts to accept the defaults, and the ansi-art intellisense magic just starts working everywhere without you having to learn anything.

If you’re still not convinced, take a minute to watch this quick flash demo. I made the mistake of thinking that I had to master the basics in PowerShell before experimenting with extensions and specialized tools so I didn’t install it until recently and I am still kicking myself. You will definitely make PowerShell your b**ch much more quickly if you just install this from the start.

As an aside note, this is yet another example of how much a single talented geek with a good idea can accomplish. The Mark van Orsouw (a.k.a /\/\o/\/\ or The PowerShell Guy) has definitley joined the ranks of Lutz Roeder (Reflector), Patrick Smaccia (NDepend), Roy Osherove (Regulator), Jamie Cansdale (TestDriven.NET), Ayende Rahien (Rhino.Mocks), and countless other tool developing cowboys in the geek hall of fame. Now if only more women would throw their undergarments at famous developers, perhaps I would have the final motivation I need to start working on a cool developer tool or add-in of my own.

As a double aside, there is simply no good comeback when your wife asks you why you are so interested in another man’s tool.

Popularity: 4% [?]

Is Typing a Required Developer Skill?

I just took this online typing test and found out that I type 73 words a minute with a 97.5 % accuracy rate, which I assume is average at best.

It would be nice to be able to type faster, but I’m not going to waste any cycles trying to improve at this point because I think that typing speed means very little in the overall scheme of developer productivity. Someone who pecks away 20 words a minute but has deep technical knowledge, sound design skills, a logical thought process, and a mastery of productivity tools and debugging tools will outproduce someone who is just an average developer but has super-human typing skills by an order of magnitude.

I’d rather spend my time mastering Resharper hot-key combinations and figuring out how to leverage a good ORM tool like NHibernate so I don’t have to write as much tedious data access code than I would trying to squeeze out a few extra words a minute from my typing. Even increasing my reading speed would likely have a much more profound affect on my overall coding speed than typing would because it would allow me to read as many geek books as Justice.

That being said, it is just painful to watch an otherwise talented and experienced programmer peck away with two fingers. We have a senior developer we have on staff gets teased mercilessly about his rather lackluster typing skills. To be fair, he has done well to mitigate his handicap by being an advanced Resharper user. Nevertheless, I hereby challenge him to take this typing test.

For the record, I in no way condone whatever devious public display of humiliation that his other co-workers will surely devise to punish him for an embarrassingly low score (although I reserve the right to laugh whole-heartedly). I would recommend, however, that this test be supervised to avoid cheating. I would also like to get a head start on the wagering by laying claim to 25 words a minute. Let the games begin…

Popularity: 3% [?]

Cultivating Good Audience Karma with the 10/20/30 Rule

It looks like I’ll have a chance to test out the10/20/30 rule of PowerPoint by Guy Kawasaki next Tuesday at the next KC .NET User Group meeting where I will be giving a presentation on PowerShell. I was only recently introduced to this rule, which states that PowerPoint presentations should contain only ten slides, last no more than 20 minutes, and use no smaller than 30 point font. However, since I naturally have a small attention span when it comes to presentations that aren’t concise, I was immediately sold on the wisdom of the advice.

Unfortunately, this philosophy is turning out to be more difficult than I had anticipated. I definitely tried to cram too much information into my presentation the last time I gave this talk at the Topeka .NET User Group meeting. My slide deck contained over 20 slides and I had to skip a few at the end because I had used up my allotted sixty minutes. After much soul searching last night, I finally managed to cut the number of slides in half although I must admit that I am still struggling a little to comply with the font size part of the equation. My plan is to finish my slides within the 20 minutes and then leave the rest of the time for interactive code demos and discussion.

If all else fails, at least I will have built up some good presentation karma for at least making a concerted effort to not zombify the audience with too many slides.

For those of you who will also be giving technical presentations in the near future, these blog posts by Scott Hanselman and Jeff Atwood also provide some good advice.

Popularity: 3% [?]

New Employee Hall of Fame

A new employee on the networks side started earlier this week and has already been nominated to the new employee hall of fame based on this voice message that he left on his boss’s phone on the morning of his second day. Apparently he had a little incident with the alarm system and calmly explains his predicament to his boss on the message as the siren is wailing in the background. It has been a great source of entertainment in the department all morning. Enjoy.

My boss was kind enough to secure the proper permission from all the parties involved, so the star of the voice message is definitely a good sport.

Popularity: 5% [?]

Two Month Progress Report on Being a Better Developer

It’s been two months since I set out on my 6 month self-improvement plan to being a better developer. During my last one month update, I set out some specific goals for month two that involved learning about Resharper, NDepend, F#, the Windsor Container, and the ROTOR codebase and then writing some blog posts about my efforts. How did I do this last month?

First, I accomplished one major thing that wasn’t even on my radar screen when I came up with my goal list. I resigned my position as an architect and took a job closer to home as a C# developer. I think it finally occurred to me that if I was on the right career path, then I would have written a post about being a better architect rather than one about being a better developer. Certainly, the most important step to becoming a better developer is to actually spend the majority of your time developing, which was something I was doing less and less of at my old job.

I also think that it is important to challenge your biases by periodically exposing yourself to new languages, processes, and problem domains. In that sense, I think my decision to leave my comfort zone in a VB.NET shop in the banking industry and switch to a C# shop in the prepaid card industry will do more to make me a better developer than all my original goals put together. That being said, how many of my original goals did I manage to accomplish?

I do feel pretty good about the amount of time I spent on my tool goals this month. With Resharper, I actually took the bold step of shelling out my own money for a personal license so that I could use it at home and on my new job (ok, I was spoiled as far as licensing goes in my old job). I also wrote a few posts sharing some learning resources I used, expressing my desire to be a Resharper Jedi, and singing the praises of the unit test runner. For NDepend, I mused on its proper place in the ever elusive quest for code quality, shared my experiences with analyzing WatiN, and explained some of the basics of CQL.

I also made satisfactory progress on my code reading goal, although I didn’t do it with ROTOR like I originally planned. I did actually download ROTOR, but once I realized that the codebase was in C++ and thought about the fact that I should probably be spending my time looking at C# code because of my new job, I opted to spend time digging into WatiN instead. I wrote some general thoughts on exploring a new code base and shared some setup notes that gave me trouble when first trying to build the project.

My non-MS goals did not go nearly as well. After successfully registering for the ALT.NET conference, I decided to swap out my F# goal for my Ruby on Rails goal in this category. I did get a few chapters read in Ruby For Rails by David Black, but I’m still making my way through the basics and haven’t reached any epiphany moments yet that were worth writing about. I got nothing at all done on my Windsor goal and did not make any contributions or opening inquiries into an open source project yet. I think I am going to wait until I figure out which tools I will be using extensively in my new job before committing to an open source.

So what’s on my agenda for the next month?

  1. Tools: Regulator, MBUnit, and more on NDepend
  2. Code Reading: Rhino.Mocks
  3. Non-MS: Ruby on Rails
  4. Higher on the Abstraction Stack: NHibernate

Once again, I will aim to write at least one post on each of the topics in the next month. Hopefully, I will attain all of my goals this time around.

Popularity: 5% [?]

Analyzing WatiN Code Quality with NDepend’s CQL

In my recent post on code quality, I mentioned some of the high level features of a static analysis tool called NDepend. I’ve been exploring some of the pre-built CQL (Code Query Language) queries in the tool by running them against the WatiN codebase. Here are the results from selecting “Types with Too Many Methods” query. NDepend shows you a list of the classes and number of methods in each on the left along with a visual Tree Map visual representation on the bottom. 

Once code is analyzed while first loading the assembly, the GUI is blazingly fast and dynamically updates whenever you highlight a new query. You can modify queries to suite your own standards and then double click to drill into the exact spot in the code. Here is what the CQL query looks like for identifying types with excessive methods:

WARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE NbMethods > 20 ORDER BY NbMethods DESC

Here are some other pre-built queries that I found especially compelling:

  1. Methods too big ( > 30 lines of code)
  2. Methods with too many parameters ( > 5)
  3. Too many local variables ( > 15)
  4. Methods too complex (cyclomatic complexity > 20)
  5. Poorly commented (% comment < 20 and # lines > 10)
  6. Fragile base class (depth of inheritance > 6)

NDepend showed that WatiN had the following issues that could potentially be refactoring opportunities.

  1. One method with too many parameters (SendMessageTimeout has 7)
  2. Ten classes with too many methods (Document has 97)

There are also a very helpful group of queries that are designed to just help you better understand the codebase by identifying the most used methods, types, and namespaces.

As an interesting aside, this tool seems to have been written entirely by one person, Patrick Smaccia. I want to personally thank him for giving me indisputable proof that I barely qualify for a bottom-dwelling, plankton-like status on the alpha-geek food chain.

Popularity: 7% [?]

An Open Letter to Google Recruiters

Dear Google Recruiters,

Here is my answer to one of your interview questions that was posted by Tihomir Nakov.

Question: Every man in a village of 100 married couples has cheated on his wife. Every wife in the village instantly knows when a man other than her husband has cheated, but does not know when her own husband has. The village has a law that does not allow for adultery. Any wife who can prove that her husband is unfaithful must kill him that very day. The women of the village would never disobey this law. One day, the queen of the village visits and announces that at least one husband has been unfaithful. What happens?

My Answer: All the villagers laugh at the Queen for being so naive as to think that only one married man in a hundred would commit adultry even when faced with certain death.

Please send me a cash advance on my first paycheck at your earliest convenience.

Yours Truly,
Caffeinated Coder

Popularity: 6% [?]

Don’t Forget to Verigoogle

I knew that SQL Server 2005 had structured exception handling, but for some reason I assumed that you could only use it within CLR sprocs. Since I still haven’t actually heard of anyone using CLR sprocs for anything other than demos or sample projects (at least not without being pummeled by hoards of angry DBA’s), I mostly ignored this new feature until now.

Today I worked on a sproc that involved over a dozen DML statements (it was a utility sproc to handle security and setup steps for developers as part of our build process, so there is no need to chastise me about it being bad design to have so much logic in the database). The thought of copy-pasting dozens of tedious procedural error handling code snippets was so distasteful to me that I decided to do a quick verigoogle. Verigoogling is my freshly coined word for challenging one of my assumptions through google. I was delighted to discover that this new Try/Catch syntax is available to the masses to be used in plain vanilla sprocs. Instead of checking the @@error variable after each statement, we can now be lazy..er..I mean concise and consolidate all the error handling code into the catch block like we’re used to doing in good ole’ OOP code.

For those of you like me who haven’t been taking advantage of this new feature yet, here is some sample code that demonstrates the how easy it is to use. As for the rest of you, please restrain yourself for making fun of me and go verigoogle one of your own assumptions.

BEGIN TRY

      BEGIN TRANSACTION

          DELETE FROM table1

          DELETE FROM table2

      COMMIT

END TRY

BEGIN CATCH

    IF @@TRANCOUNT > 0
           ROLLBACK

     DECLARE @ErrMsg nvarchar(4000), @ErrSeverity int
     SELECT @ErrMsg = ERROR_MESSAGE(),
     @ErrSeverity = ERROR_SEVERITY()

     RAISERROR(@ErrMsg, @ErrSeverity, 1)

END CATCH

 

Popularity: 6% [?]

Next Page »