Thoughts on Technology, Methodology and Programming.

Archive for August, 2005

Promiscuous Pairing and Beginner’s Mind: Embrace Inexperience

Posted by Marcus Wyatt on 30 August 2005

I’ve been listening to the Agile Toolkit’s Pod cast featuring Arlo Belshee and his experience on Promiscuous Pairing and the Least Qualified implementer.

Now what can be so interesting about pair programming you ask?

Well, in the podcast Arlo talks about how his team started to experiment with the XP processes and found that when they used metrics to measure how well they where doing when Pair programming, they found that using a concept of “Beginners Mind” when pair programming by making sure they have a least qualified member in a pairing all the time they where able to greatly improve their productivity.

So how does it work?

A pair of programmers will start out with the least qualified developer paired with another developer working on a specific piece of code, then after 90 minutes the most qualified developer in the pairing moves on to another pairing and become the least qualified developer. The developer left in the original pairing becomes the most qualified developer and thus become the teacher for the new developer in the pairing. Thus the new developer is now the least qualified developer in the pairing. And so after 90 minutes, the cycle starts over…

It is really quite interesting and thought provoking when you listen to the conversation and read the paper.

tags: , ,

Currently listening to: p *** 536. delerium – silence(dj tiesto mix)


Posted in TDD, XP | 1 Comment »

Kent Beck – Developer Testing

Posted by Marcus Wyatt on 26 August 2005

Pod casting has become really popular in the last year or so and I am starting to really enjoy listening to all the proffesionals having their say.

I’ve found this new Technical IT related padcast site with the following pod cast by Kent Beck: Kent Beck – Developer Testing

More about the site:

IT Conversations is a listener-supported web site. Many listeners contribute to our tip jar, but others contribute in a different way: They’re the people behind the scenes who volunteer their time to write and debug the software, write the descriptions, track down the photos, and engineer the audio of IT Conversations programs. Go check them out, they’ve got some really cool stuff to listen too…

tags: , ,

Currently listening to: dance – Winamp *** 290. mark siegenthaler – fast dance

Posted in TDD, XP | Leave a Comment »

Extreme Programming Explained: Embrace Change

Posted by Marcus Wyatt on 15 August 2005

Extreme Programming Explained: Embrace Change (2nd Edition) by Kent Beck, Cynthia Andres is full of little gems about how to be successful in developing software. It explains what values and principles a team needs to follow to foster a culture of trust and transparency between all the members on the team. This includes top management all the way to the junior developer on the team. The focus is on talking, yes talking, where there’s openness of the development effort, where story boards are accessible to anyone. Even the customers…

Mr. Beck also focuses on the usual XP themes like the team always write production code in pairs, test-first and continually integrating the changes into the system. The 12 principles of XP haven’t changes, but what the 2nd edition highlights are the principle categories of communication, simplicity, feedback and courage and the human element of these. This book is an excellent read and once I started I couldn’t put it down…

tags: ,

Currently listening to: sweet surrender – Winamp *** 522. sarah mclachlan – sweet surrender

Posted in XP | Leave a Comment »

Use a refactoring checklist to pay down Technical Debt as you work

Posted by Marcus Wyatt on 13 August 2005

Jeremy D. Miller on the use a refactoring checklist to pay down Technical Debt as you work.

If you’ve never heard the term “Technical Debt,” check out Martin Fowler’s definition and Ward Cunningham’s Wiki on the subject.

The triumvirite TDD coding cycle of “Red, Green, Refactor” is plastered all over the web and endlessly repeated by all us TDD zombies. If you’re going to drink at the agile Koolaid fountain, don’t stop with just “Red Bar, Green Bar.” You’ve got to do the third part and Refactor as you work to keep the code clean.

  • Can you easily add more code to the solution tomorrow?
  • Is your code becoming difficult to read and understand?
  • Are you spending too much time with your debugger?
  • Is there a class or namespace you avoid changing out of fear?

You will slow down if you let problems accumulate. If you’re using evolutionary or incremental design you probably don’t know exactly where you’re going with your design. You are purposely delaying design decisions until you have more information and knowledge about the design needs. Keeping the code clean and each class cohesive with low coupling will maximize your ability to change later. Constant vigilence and an adherence to good coding practice can extend the lifecycle of a system by reducing the risk and cost of change.

Use aggressive refactoring to keep the technical debt from building up. Integrate refactoring into your normal working rhythm, don’t let it just build up into day long tasks. Here’s the good news though — a lot of refactoring work is quick and easy, especially if you’ll invest some time in learning the automatic refactorings in tools like ReSharper.

Find the whole post and comments here.

tags: , , ,

Currently listening to: mp *** 470. umek – expire ep (b2)

Posted in Development, Refactoring, TDD | 1 Comment »

Code Smell: CallSuper

Posted by Marcus Wyatt on 12 August 2005

CallSuper is a minor smell (or anti-pattern if you like) that crops up from time to time in OO frameworks. Its symptoms are pretty easy to spot. You are inheriting from a super-class in order to plug into some framework. The documentation says something like “to do your own thing, just subclass the process method. However it’s important to remember to start your method with a call to the super-class”.

An example might be something like this.

public class EventHandler {
   public void handle (BankingEvent e){ 
public class TransferEventHandler extends EventHandler {
   public void handle(BankingEvent e) { 

Whenever you have to remember to do something every time, that’s a sign of a bad API. Instead the API should remember the housekeeping call for you. The usual way to do this is to make the handle method a Template Method, like this. 

public class EventHandler {
   public void handle (BankingEvent e) {
protected void doHandle(BankingEvent e) {
public class TransferEventHandler extends EventHandler {
   protected void doHandle(BankingEvent e) {

Here the super-class defines the public method and provides a separate method (often referred to as a hook method) for the subclass to override. The subclass writer now doesn’t have to worry his ugly head about calls to super. Furthermore the super-class writer is free to add calls after the subclass method if she wishes.

You can read Martin Fowler’s whole post here.

tags: , ,

Currently listening to: a, Part II – Winamp *** 2. Ayla – Ayla, Part II

Posted in OO, Refactoring | Leave a Comment »

The two Cornerstones of Object-Oriented Programming

Posted by Marcus Wyatt on 12 August 2005

Coupling and Cohesion: The Two Cornerstones of OO Programming: “by Samudra Gupta

In this informative tutorial, you are introduced to code metrics that will help you measure how well your classes conform to the principles of Coupling and Cohesion.

For Cohesion, the “Lack of Cohesion in Methods” metric helps you understand and gauge how cohesive your class is and “Demeter’s Law” helps with Measuring Coupling between your classes.

I think if we can use these types of metrics to understand our code better and even try to incorporate them as part of our testing suite or productivity tools, we will make a huge improvement in building more flexible solution.

Like the author said:

“Make no mistake, these metrics are vital to measuring the quality of an application.”

tags: , ,

Currently listening to: g (kevin roen nye 2001 remix) – Winamp *** 367. atb vs. pqm – let u go vs. you are sleeping (kevin

Posted in Development, OO | 1 Comment »