Tuesday, October 24, 2006

To code, or not to code ...

I've been trying to finish up a number of programming books that I've started reading. One of which is "Extreme Programming Adventures in C#" by Ron Jeffries. It's a different kind of programming book. It's essentially a journal of Ron's experience learning the C# programming language while applying Extreme Programming principles. He discusses the assumptions he's making, you see the first (sometimes ugly) attempts he makes writing code. What's good about it, is that he goes back and fixes the code that's bad, so you see the code evolve instead of just seeing the final product.

At the end of one of the chapters, he discusses a philosophy of XP which basically says, "don't put any code in until it's needed". I keep reminding myself because I tend to want to program the world into an app instead of moving in small pieces. Ron says it best:
I know we always like to say it'll be easier to do it now than it will be to do later. Not likely: I plan to be smarter later than I am now, I plan to have the same tests, and I plan to have an actual need that will direct what I do, not my current fantasy about what's needed.

I think I'll print that out and paste it on my monitor. Things definitely go more smoothly if you just keep it simple and bite off little pieces at a time. Now, to be more religious about it in practice.

1 comment:

Robert said...

At the same time, though, shouldn't you try as much as possible to future-proof your code? God forbid you should have to change an interface or something. I'm dumb about these things, though.

What I find humorous about XP is that IIRC the guys who originally developed it used it first on a project that they failed to deliver. Not exactly the "The Mythical Man-Month" of our generation.