Archive for March, 2008

Shouldn’t you know a bit before teaching it?

Friday, March 21, 2008

I’m once again back on hiring, aggressively I shall say.
It occurred that I’ve got some resumes from guys graduating soon at UofT in Computer Science. I’ve found good preparation and generally a high level, even though it seems to me that quality of graduates from Waterloo is generally higher. But that’s not the point.

The point is that at a certain point I was making questions about candidates’ knowledge of agile themes, starting from TDD and rapidly moving towards pair programming. One candidate stroke me in particular because he clearly seemed reluctant to admit that he had problems with pair programming. I started digging and it soon turned out that he was afraid of working the way he was taught at some course while at UofT: an assistant explained to those poor students that in order to practice pair programming they had to work in pairs, where one person sits at the keyboard and the other one looks for syntax errors over her shoulder… for one hour and a half! And then switch, another 1.5 h of clear separation of roles, one works, the other watches.

I was livid. I reacted pretty badly. I explained to him immediately that that assistant didn’t have any idea about what he was talking about (plus some other words that can’t be repeated here). My candidate seemed dubious. It took me a while to convince him and I’m not sure I’ve succeeded.

Now the question is: how can this possibly be? How is it possible that an “assistant” with no experience about something actually pretends he can teach it? How?

I thought that those things happen only in Italy…


Missing MethodTimer.computeTotalTime() in Implementation Patterns

Thursday, March 13, 2008

While preparing a review of Kent Beck’s Implementation Patterns book for I stumbled upon a missing detail in Appendix A (Performance Measurement): where is the implementation of MethodTimer.computeTotalTime()?

I didn’t pay much attention while reading the book: Appendix A is one of my favourite chapters because you can finally see what Beck means in practice, but I haven’t really considered all the implementation details, only the overall philosophy. For the review I decided to go deeper and I couldn’t really understand what happened to MethodTimer.computeTotalTime(). In addition, until you realize how that method should look like, maybe you find yourself in troubles trying to fully grasp the design. I certainly did. Google didn’t help (I guess that Beck for whatever reason didn’t want to publish the code), so I did it by myself.

 private long computeTotalTime() throws Exception {
 	long start = System.nanoTime();
 	for (int i = 0; i < iterations; i++)
 		method.invoke(instance, new Object[0]);
 	return System.nanoTime() - start;

This is not rocket science of course, but I had a few false starts before getting it (also because I made a few mistakes copying the code from the book and I was misled by the results). Hope it can help you as well.