Every morning, before leaving for work, I skim through discussions on yahoogroups. Today morning, this posting from Kent Beck on the ExtremeProgramming group gave me a sweet jolt:
I recently coded without a test. I tried for several hours to get a test written and couldn’t. I still wanted to make progress on the feature. I [...]
Tags:
ArrayList is one of the most preffered collection types used by the programmers. Whenever, in need of a collection, the first thing a programmer tries to use is an ArrayList.
Consider the following code snippet; first the unit-test:
FruitBasket fruitBasket = new FruitBasket();
fruitBasket.add(FruitType.Oranges);
fruitBasket.add(FruitType.Oranges);
assertEquals(”Should have only one set of oranges”, 1, fruitBasket.countOf (FruitType.Oranges));
Now the implementation :
public void add(FruitType [...]
Tags:
For the members of a XP team, pair-programming serves as a key source of continuous growth. Everyday, there is something new to learn from your partner. For example:
Rather than using Eclipse or Visual Studio.Net for previewing single files, I used Textpad ocassionaly. Overall, I was happy with Textpad, except for its weird key bindings like:
F5 [...]
Tags:
An agile team will setup, just the minimal infrastructure, required by the stories in the current iteration. For e.g. unless, there is a story that requires persistence, there will be no database setup; an IOC framework will not be put in place, because, it is the latest cool thing and everyone is talking about it. [...]
Tags:
Last week, I visited a software development team at a major financial firm. They get audited frequently and have to adhere to strict SEC regulations. They have to keep track of every defect that gets generated, the impact of the defect and all its history.
This is how they fix defect:
1. The QA team has [...]
Tags:
In the first edition of Extreme Programming explained, Kent Beck had included the practice of Metaphor. It was supposed to help teams evolve a common architecture vision & vocabulary. I tried hard to apply it, but never got it right. I then came across the practice of Ubiquotous language from Domain Driven Design book by [...]
Tags:
I have published a J2MEUnit setup guide. It will serve as a step-by-step guide on how to setup J2MEUnit, an automatic unit testing framework for J2ME. You can download it from here.
Tags:
I was recently asked, “When is it ok to add code comments?â. We then talked about explanation vs. justification.
Code should be self-explaining. What the code does, should be obvious by reading the code. If you have to add comments to the code, to explain what it does, then it is a code smell.
On the contrary, [...]
Tags:
Strict adherence to the TDD Mantra of Red-Green-Refactor generates a rhythm that makes programming fun and helps the design grow organically. This pictorial guide is a one-page cheat-sheet to keep reminding you of Test-driven rhythm. The guide also suggests the approximate time that should be spent on each phase of Test-driven rhythm.
You can download it [...]
Tags:
Being test-driven requires lot of discipline. There are several questions that get asked frequently: “What is a unit test? What is not a unit test? What does being test-driven mean? Should I test private methods?”. This one-page guide attempts to provide a quick reference to several of these common questions. It also includes quick references [...]
Tags: