Stop #2 on the 2010 Michigan Pairing Tour

2010 March 4
tags: , , ,
by Nayan Hajratwala

Yesterday, as part of the 2010 Michigan Pairing Tour, I had the opportunity to spend a day at the new offices of BillHighway in Troy, MI. They have a very nice setup including an area with leather couches, a large screen TV and XBox + Wii consoles.

BillHighway “bills” themselves as a “Quickbooks for Communities”. One of my longtime friends works there, and I’ve had the privilege of getting to know their CIO over their past few years of impressive growth.

BillHighway is primarily a  VB.NET shop. I’ve never spent more than 5 minutes looking at .NET code, and the last time I used VB was about 12 years ago. It promised to be an eye-opening experience.

In the morning I paired with André LaMonde, a VB.NET hacker. We were working on standardizing some of the UI components to be in line with a new Look & Feel for their site. I was briefly thrown for a loop by the unfamiliarity of Visual Studio and strange syntax, but quickly recovered and was able to follow what was going on without too much trouble.

Unit testing is not regularly practiced by the team, so we had some good discussions about some of the challenges that dealing with legacy code bases brings about, and some strategies for integrating tests going forward. We struggled with NUnit for about 15 minutes, then bailed out and were able to get some tests up and running with the framework built into VS 2008.

In the afternoon, I paired with Meghan Letscher. She was very quick and was whizzing around Visual Studio like a pro. We worked on a similar task as in the morning, and delved into a bit of JavaScript & CSS to round things out. After struggling with some DLL permission problems and having fun with caspol.exe for a while, we were able to get some tests running and even managed to do a bit of TDD.

Overall, I had a great time, and picked up some 3l1t3 .NET skillz. I’m looking forward to the next stop!

Pairing on Concurrency & Facebook API

2010 February 4
by Nayan Hajratwala

Last Friday was the first stop on the 2010 Michigan Pairing Tour.

I sat down with Ilya Sterin at a Caribou Coffee in Grosse Pointe, Michigan and we started off by discussing a few of the projects he was currently working on.

We decided to write some tests around code that he had written to post Facebook status updates. This led use Mocks for the Facebook API, and refactor some of the code to be more testable.

During this refactoring, Ilya brought up the question of whether we should favor writing testable code at the possible expense of simplicity. I think that writing testable code generally results in simpler code (not gold plating, etc, etc), but I replied that it’s only important to write testable code if you care if it works.

After lunch at a nearby Sushi bar we tackled a different project that had a lot of concurrency going on. Ilya has a lot of experience with java threading and he has an excellent handle on how it all hangs together. I learned quite a bit from him in this segment, include exposure to the Guice DI framework.

We were able to bring a couple consumer/producer classes under test. This again required some refactoring–mostly along SRP lines–and resulted in a simpler and cleaner design.

Overall, it was a great experience, and exactly what I hoped to get out of the pairing tour. I’m looking forward to my February date which is tentatively scheduled for next 2/12/2010. I’ll post more details when it’s confirmed.

First Stop on the 2010 Michigan Pairing Tour

2010 January 27
by Nayan Hajratwala

On Friday, 1/29, I’ll be making my first stop of the 2010 Michigan Pairing Tour in Grosse Pointe, Michigan. The plan is to pair with Ilya Sterin on what he describes as writing tests for:

a highly concurrent producer/consumer implementation for data messaging through numerous sources

Aaahh, legacy code testing and refactoring. One of my favorite pastimes I love it! :-)

The Tour Calendar is now available for anyone interested.

The February and March dates are *almost* confirmed, so i’ll be announcing those shortly.

Announcing the 2010 Michigan Pairing Tour

2010 January 21
by Nayan Hajratwala

Inspired by Corey HainesJourneyman Tours, I’m kicking off the 2010 Michigan Pairing Tour.

To start with, I’ll be spending 1 day per month pairing with individuals anywhere within about a 2 hour driving distance from Ann Arbor. (Yes, I realize this puts the top of Ohio in play as well. If you’re nice, maybe I’ll cross the border for you :-) )

I’ll pair in any language, on any project. We can write code, write stories, write acceptance tests, you name it.

Goals

What am I trying to accomplish?

  1. Enhance my own skills from hands on experience with other practitioners.
  2. (Hopefully) enhance my partner’s skills.
  3. Meet more like-minded folks throughout Michigan.
  4. Inspire others who don’t have the availability for a full Corey-style tour to go out and grow themselves and the community.

Logistics

If you’d like to be on my tour, please contact me via email or twitter. If you need to get permission from your boss, I’m happy to talk to him/her or sign any corporate NDA’s that are required.

My current plan is to do this on Fridays, but I’m pretty flexible, so let me know what works for you.

I’ll put up a Google Calendar shortly with all the booked dates. (Update: Google Calendar is posted)

Thanks for your interest, and I hope to see you on my journey!

Snow Leopard Upgrade Experience

2009 August 29
by Nayan Hajratwala

I upgraded my 17″ MB Pro last night to Snow Leopard. The installation went smoothly, and took about 45 minutes. the Mac rebooted a couple times on it’s own and then I was done.

This morning, as I started using the new OS, I experienced the following issues:

  • Dev tools not installed – easily solved by installing the XCode package off the DVD
  • QuickSilver not working — solved by upgrading to SL version, and removing
    • ~/Library/Application Support/Quicksilver and
    • ~/Library/Preferences/com.blacktree.Quicksilver.plist
  • MacRuby seems to be broken — seems like 0.5 is needed.
  • Quicken 2007 needs Rosetta — quite a nice implementation, as SL automatically downloaded Rosetta and installed it.
  • Electric Sheep 2.7b16 does not work — waiting for devs to update
  • iStat not working — waiting for devs to update
  • Xmarks not working — waiting for devs to update
  • Growl has strange behavior — upgrade to v1.2b fixes it http://code.google.com/p/growl/downloads/list — final release should be available soon.
  • Nambu not working — switching (permanently?) to Tweetie or TweetDeck
  • Weird font problem in Firefox — some sites indicate a problem with 3rd party font managers, but i have none. No solution yet.

Nothing critical (for me), but hopefully these will get worked out soon.

UPDATE (2010/01/20) – All issues have been resolved!

Agile 2009 is Almost Here

2009 August 3
by Nayan Hajratwala

The Agile 2009 conference is less than a month away! Need to convince
your manager to send you? See our justification toolkit:

http://agile2009.agilealliance.org/justificationtoolkit

Consider personalizing your program, and seeing how much value you can
receive for your time and money:

http://agile2009.agilealliance.org/personal_program

The program is also available online and in PDF format on:

http://agile2009.agilealliance.org/programOverview

We are almost out of Early Bird registrations, so register soon if you
want to snag one. Our 5-pack registration is the best deal. See
http://agileregistration.org for all the details.

Freshers’ Faire

We know that the crowd at Agile Conference can be intimidating, so don’t
miss the Ice Breaker on Monday. It will include a college-style
Freshers’ Faire where communities will be happy to introduce themselves
to you. The communities that will be represented include so far:
* Real Options
* CITCON
* Testing
* Leadership
* Agile Requirements
* Agile Coach and the Agile Coaches Gathering
* User Experience
* Telling Our Stories
* Agile Game designers/ enthousiasts
* Agile France
* PairWith.Us
* Kanban
* PMI
* Facilitation & Facilitation Patterns

Feel free to tell other communities about it and refer them to our blog
entry:

http://agile2009.wordpress.com/2009/07/16/freshers-faire-make-your-community-visible/

Programming with the Stars

One of the most fun events last year was Programming with the Stars, a
contest where you can pair with legendary programmers, and impress a
panel of ruthless judges. Programming with the Stars is coming back this
year, and you can apply too!

Check out an account from last year:

http://agile2009.wordpress.com/2009/07/19/programming-with-the-stars-coders-wanted/

Details on the contest there:

http://agile2009.agilealliance.org/programmingwiththestars

Personas

This year we are using “personas” as a quick way for attendees to tell
which sessions will be most relevant to their needs.

Personas are currently being described on the Conference blog. Watch for
them appear every few days!

Here is what we posted so far:

* http://agile2009.wordpress.com/2009/07/28/meet-billy-business-analyst/
* http://agile2009.wordpress.com/2009/07/25/meet-ellie-agile-explorer/
* http://agile2009.wordpress.com/2009/07/23/meet-rose-researcher/

* http://agile2009.wordpress.com/2009/07/21/meet-alex-architect/
* http://agile2009.wordpress.com/2009/07/15/meet-tara-tester/
* http://agile2009.wordpress.com/2009/07/08/meet-chandra-consultant/

*

http://agile2009.wordpress.com/2009/07/04/meet-padma-struggling-product-owner/

* http://agile2009.wordpress.com/2009/06/25/meet-rubin-reluctant-agilist/
* http://agile2009.wordpress.com/2009/06/18/meet-brooke-business-executive/

5-pack registration saves $400 per person!

Register now and get a $400 discount via a 5-pack registration.
Go to http://agile2009.agilealliance.org/ and choose “Register”.

A regular non-member single registration is a great deal at $1799, but
with a corporate group 5-pack, each person attends for only $1399 – a
savings of $400 each! It will work for you and your 4 friends too, no
need for you to be co-workers ;-)

There’s no better way to check out the benefits of Agile for your
company than to turn your thought leaders loose among hundreds of
expert-led sessions at Agile 2009. See you there!

Maven 2.1.0 is out!

2009 March 23
tags: ,
by Nayan Hajratwala

After much anticipation, Maven 2.1.0 has been released. My personal favorite new feature is the parallel downloads of artifacts. This alone should significantly speed up builds on CI servers that refresh the repo on each build.

Go get yours today.

Leaving India: My Sister’s Book!

2009 February 24
by Nayan Hajratwala

My sister’s book is now available on amazon. Go check it out!

Getting OCMock to work

2009 February 19
by Nayan Hajratwala

I started using OCMock yesterday, and was quickly hit by a problem when trying to stub out return values.

My test method was (sorry for the lack of highlighting – the plugin i’m using doesn’t support Objective-C)

- (void)testReturnsStubbedReturnValue
{
	id mock = [OCMockObject mockForClass:[NSString class]];
	[[[mock stub] andReturn:@"megamock"] lowercaseString];
	id returnValue = [mock lowercaseString];

	STAssertEqualObjects(@"megamock", returnValue, @"Should have returned stubbed value.");
}

However, when running it, I would get the error:

  warning no '-stub' method found
  warning no '-andReturn' method found

After scrolling through all the OCMock test code, I finally was able to get it work by adding:

  #import <OCMock/OCMock.h>

That’s where the methods are defined, but not being an Obj-C guru, I don’t fully understand how the code knows it’s actually using the OCMock class, etc.

Anyway, it appears that the minimal code needed to get an OCMock test running is (i wish this was on their web site!):

In OCMockSampleTest2.h:

#import <SenTestingKit/SenTestingKit.h>

@interface OCMockSampleTest2 : SenTestCase {
}

@end

In OCMockSampleTest2.m:

#import "OCMockSampleTest2.h"
#import <OCMock/OCMock.h>
#import <OCMock/OCMConstraint.h>

@implementation OCMockSampleTest2

- (void)testReturnsStubbedReturnValue
{
	id mock = [OCMockObject mockForClass:[NSString class]];
	[[[mock stub] andReturn:@"megamock"] lowercaseString];
	id returnValue = [mock lowercaseString];

	STAssertEqualObjects(@"megamock", returnValue, @"Should have returned stubbed value.");
}

@end

I hope this helps someone!

Why I Use Maven

2009 February 12
by Nayan Hajratwala

I was asked recently why I like Maven so much. Here’s why:

  • The most basic project structure will compile code, run all your unit tests, and build a jar file:
    <project>
      <modelVersion>4.0.0</modelVersion>
      <groupId>com.chikli.testprojecct</groupId>
      <artifactId>testproject</artifactId>
      <version>1</version>
    </project>
  • Due to the standardization, and logical defaults/conventions, I can open up any project that uses Maven for it’s build system and immediately understand the build process and the generated artifacts. This is in stark contrast to ant buildfiles which are custom from project to project.
  • Since all needed artifacts (jars) are versioned and live in a Maven Repository, I don’t have to include the actual jar files for third party libraries within my project structure.
  • I can run a single command and immediately see if any of the libraries that my project uses has released any updates (i.e. new versions of spring, hibernate, commons-*, etc):
    • mvn versions:display-dependency-updates
  • I can change the version of a library that my project uses simply by typing in the version I want.
  • Documentation – this has traditionally been horrible for Maven, but Sonatype has recently created an excellent free online book that covers all you need to know about using Maven.

I’m pretty sure there’s more I like about Maven, but these are the ones that came to me right away.