| Elizabeth Keogh ( @ 2007-11-16 14:18:00 |
| Entry tags: | bdd, outside-in |
BDD: Bug Driven Development
Today, Negin and I paired on a brand new piece of work.
"We'll need to create this domain object," she said, "and a database table."
"I don't want to do that," I said. "I'd rather fix the stuff that's broken."
She looked puzzled. "What do you mean? We haven't written any code yet."
"Well, we know that if you go to the URL, you should see the form. But when I go there I get a 404 error."
"Well, yes. We haven't written any code yet."
"So, it's broken. It doesn't work yet. We should fix that."
So we wired up the container and knocked out a controller. We restarted the server and refreshed the URL. Spring told us we had left out a couple of things. We fixed those.
Negin tapped something into the template and refreshed the URL again. "We have a page. It says HELLOOOOO! across the top. Now what?"
"Well, we got rid of the 404 error. But the page doesn't look right."
"Of course not. We haven't written the form yet."
"We should fix that."
We wrote the form. It didn't look right, so we added the styling. Our business analyst peered over our shoulders at what we were doing. "Looks like you're doing well. Why doesn't the drop-down have my data in?"
Negin said, "You're right. We should fix that. This is fun!"
"It is," I said. "Don't you just love that we get paid for this?"