Archives
Chapter 2. Test-Driven Development with Objects
Submitted by noreply@blogger.com (Steve Freeman) on Fri, 25/07/2008 - 12:50.We are now publishing chapters of our book, Growing Object-Oriented Software Guided by Tests in a separate section of the site. We will publish news about new content in the blog but will not include the entire contents of each chapter as blog posts.
We have updated Chapter 2, Test-Driven Development with Objects in response to feedback from blog comments and the discussion group and improved some of the diagrams. More comments are always welcome.
RubyCocoa (etc.) podcast
Submitted by Brian Marick on Fri, 25/07/2008 - 17:34.Python - Counting Items In A List
Submitted by noreply@blogger.com (Corey Goldberg) on Fri, 25/07/2008 - 18:40.Lets say you have a list like this:
foo = [1, 2, 1, 2, 1, 2, 1, 1]... and you want to count the items in the list, ending up with a dictionary full of items (dict keys) and counts (dict values), like this:
{1: 5, 2: 3}TotT: Testing Against Interfaces
Submitted by noreply@blogger.com (dastels) on Fri, 25/07/2008 - 19:06.Both your planetary death rays should interoperate with a variety of other bed-wettingly awesome technology, so it's natural that they export the same Java API:
public interface PlanetaryDeathRay {
public void aim(double xPosition, double yPosition);
public boolean fire(); /* call this if she says the rebel
base is on Dantooine */
}
public class BlueLaserPlanetaryDeathRay
implements PlanetaryDeathRay { /* implementation here */ }
public class GreenLaserPlanetaryDeathRay
implements PlanetaryDeathRay { /* implementation here */ }
