Test First Development and Making a Cake
secretGeek .:dot Nuts about dot Net:.
home .: about .: sign up .: sitemap .: secretGeek RSS

Test First Development and Making a Cake

One of the mixed curses of being obsessed with software is that you see reminders of it everywhere, even in things that predate the existence of software.

For example, Cake Making.

When you're making a cake, you need to add eggs to your cake mixture.

My wife told me that you don't break the eggs directly into the mixture. Instead, you break them into a separate bowl, and then add them to the mixture.

"Why not break them directly into the mixture?" I asked.

She picked up her cookbook and turned to Appendix A -- The SOLID Cooking Principles, by Robert C. Martin.

No she didn't.

She explained that if an egg is bad you don't want to ruin the entire bowl of cake mix. And it's easier to spot little bits of egg shell in a bowl of yolks than in a bowl of cake mix.

"Ah, the virtues of independent deployment," I said.

And she looked at me askance. (Askance is not the best way to be looked at, btw).

While we're discussing eggs, I have to repeat my favourite saw:

"You don't have to eat a whole egg to know it's bad."

 

(Side point: this topic fits with the stack overflow question "What real life bad habits has programming given you?" wherein you will find over 425 similar experiences. What a sad lot we is.)





'Matthew Martin' on Fri, 13 Mar 2009 10:27:48 GMT, sez:

The other reason is that if there is any baking soda, the longer you can defer mixing wet with dry the less baking soda bubbles will be lost to mixing. Baking soda almost implements the same interface as yeast, but the abstraction is leaky.



'Mike Woodhouse' on Fri, 13 Mar 2009 10:32:54 GMT, sez:

Well, I dunno about all that. I think the egg business is more about running the tests as part of the build, which means of course that the tests could have been written before or after.

I think the TDD aspect, if applicable, is more about developing the recipe, which should be analogous to the code.

Depends if you see code as design or code as build, I guess.

I should get out more.



'James' on Fri, 13 Mar 2009 13:31:20 GMT, sez:

You gotta cook by the book. http://www.youtube.com/watch?v=UfLAv3JHRwY&feature=related



'tarn' on Sat, 14 Mar 2009 00:07:08 GMT, sez:

I just throw the eggs straight in. My cakes never work but I can make a great spaghetti bolognese.



'Dominic Cronin' on Sat, 14 Mar 2009 18:34:55 GMT, sez:

This is waterfall cake baking. The tradition of testing the eggs for freshness comes from the days when the eggs in question would have first sat on the desk of the analyst for a few weeks, before being assigned to a developer.



'AtliB' on Sat, 14 Mar 2009 22:58:49 GMT, sez:

Not sure if Mike above is hinting at it... but you could start with putting the eggs in (when the bowl is empty). Then you don't need to make two bowls dirty AND you can verify the eggs.

That might go against Matthews comments (and bakers in general) regarding baking soda bubbles, but that wasn't a part of the initial constraints of your example.



'lb' on Sat, 14 Mar 2009 23:03:01 GMT, sez:

@Atli
Although the initial constraints didn't include any mention of these baking soda bubbles, i think that in an agile cake making world we need to be able to take on board these late breaking changes to the user story.

All this micro-optimization of the cake making process makes me feel queasy.

I need to go and have a lie down. And maybe a nice cupcake.



'Farmer Jeb' on Mon, 16 Mar 2009 00:58:10 GMT, sez:

To quote my 2 year old son on this topic:
"CAKE! CAKE! CAKE! CAKE! CAKE!"




name


website (optional)


enter the word:
 

comment (HTML not allowed)


All viewpoints welcome. But the right to delete any post for any reason is reserved. Don't make me do it. Comments may be republished, emailed to your loved ones or printed and used as toilet paper. Who reads this legal bit anyhow?

TimeSnapper is a life analysis system that stores and plays-back your computer use. It makes timesheet recording a breeze, helps you recover lost work and shows you how to sharpen your act.

TimeSnapper won last year's Developer Competition at Larkware.com, and is used by over 10,000 people.

Articles

What then, is b? What then, is b?
SQLike: A simple editor SQLike: A simple editor
Yet Another BizPlan Generator. Yet Another BizPlan Generator.
HOT GUIDS: A hot or not site for guids HOT GUIDS: A hot or not site for guids
How does life get better? One tiny hack at a time. How does life get better? One tiny hack at a time.
24 things to do, and 100 things *not* to do (yet) for building a MicroISV 24 things to do, and 100 things *not* to do (yet) for building a MicroISV
Venture capital won't kill Jeff Atwood, it will only make him Jeffer. Venture capital won't kill Jeff Atwood, it will only make him Jeffer.
A handy workflow image for newbie mercurial users A handy workflow image for newbie mercurial users
Fractal Feedback, a diversion into recreational programming Fractal Feedback, a diversion into recreational programming
Hump-Jumping: How the Education of Computer Science can be Saved, err, maybe. Hump-Jumping: How the Education of Computer Science can be Saved, err, maybe.
Suggested User Experience Improvements for DiffMerge Suggested User Experience Improvements for DiffMerge
SQL Style Extensions for C# SQL Style Extensions for C#
The Movie Hollywood (And My Wife) Doesn't Want You To See: Weekend at Jacko's The Movie Hollywood (And My Wife) Doesn't Want You To See: Weekend at Jacko's
Sysi: the ultimate administrators toolkit Sysi: the ultimate administrators toolkit

Archives .: secretGeek :: Complete Archives
TimeSnapper -- Automated Screenshot Journal TimeSnapper.com    
Version 3.3: true productivity boost

Next Action NextAction
Managing the top of your mind

World's Simplest Code Generator (html edition) World's Simplest Code Generator

25 steps for building a Micro-ISV 25 steps for building a Micro-ISV
3 minute guides -- babysteps in new technologies: powershell, JSON, watir, F# 3 Minute Guide Series
Universal Troubleshooting checklist Universal Troubleshooting Checklist
Top 10 SecretGeek articles Top 10 SecretGeek articles
ShinyPower (help with Powershell) ShinyPower
Now at CodePlex

Realtime CSS Editor, in a browser RealTime Online CSS Editor
Gradient Maker -- a tool for making background images that blend from one colour to another. Forget photoshop, this is the bomb. Gradient Maker


[powered by Google] 


How to be depressed How to be depressed
You are not inadequate.



Recommended Reading

The Best Software Writing I
The Business Of Software (Eric Sink)

Recommended blogs

Jeff Atwood
Joseph Cooney
Phil Haack
Scott Hanselman
Julia Lerman
Rhys Parry
Joel Pobar
OJ Reeves
Eric Sink

Aggregated Links

proggit
dzone
hacker news
dot net kicks

Human Link Machines

interesting finds
a continuous learner's weblog
arjan's world
weekly link post

LinkedIn profile
LogEnvy - event logs made sexy
ShuffleText - fuzzy search for .net
PC Smart Buys - Computer Hardware in Australia
 
home .: about .: sign up .: sitemap .: secretGeek RSS .: © Leon Bambrick 2006 .: privacy

home .: about .: sign up .: sitemap .: RSS .: © Leon Bambrick 2006 .: privacy