This comes up so often (guilty of it meself) that I have to write about it.
Programmers often come up with a scheme of logic in how they are going to implement their particular business scenario. Sometimes it is elegant, sometimes it's complicated. But more often than not, it isn't always completely "thought through".
Two Irishmen are fishing on a lake. One pulls in a bottle, and as he unhooks it from the line, a genie pops out and offers him one wish.
"Turn the lake into beer", the fisherman says.
Genie waves his hand and -- "Poof" -- the whole lake turns into sparkling Harps!
Fisherman turns to his buddy and says, "Well, what do you think?"
His buddy says, "You jerk! Now we'll have to pee in the boat!"
Do you find yourself often having boxed yourself in, without a clear path to the Mens (or Ladies) room, and no key? And you have to "Pee in the Boat", e.g. you have to work around all the code you have already written, just to get something done that you perhaps didn't think about in advance.
I don't believe in anything that sounds like "Extreme Programming" or says you are supposed to "Smell the Code"-- for this very reason. I'd rather have everybody get together, map everything out, discuss all the logic beforehand (especially you want to do this when there is more than one programmer involved, because you can end up "Peeing in the Boat" just by yourself!). Now! --Once there's a plan, a contract, a schema, and some logic, the likelihood of getting your collective self "boxed in" and having to "Pee in the Boat" goes way down!
Nothing like a Harps after a heavy programming session -- along with a comfy place to pee! After all, we wouldn't want to spoil the lake, now, would we?