| «« Masters Part 2 | Gimme a Break »» |
|
About
I'm Ryan Lowe, a Software Engineering graduate living in Ottawa, Canada. I like agile software development and Ruby on Rails.
I write this blog in Canadian English and don't use a spell checker. Typos happen.
Projects
» Full-time Ruby on Rails freelancer
» Full-time with Rails since May 2005 » Former committer for RadRails (now Aptana) » I also have a few Rails side-projects in development: 1. wheretogoinTO.com Toronto nightlife 2. Hey Heads Up! TODO list and sharing 3. Layered Genealogy family history research 4. foos for foosball scoring 5. fanconcert for music fans (on hold) Hiring Rails developers? I can telecommute by the hour from Ottawa, Canada »» Email: rails AT ryanlowe DOT ca
BulletBlog
Now hosted on Hey! Heads Up -- check it out!
Syndication
Pings
Recent
Derek Lowe's (Ryan's older brother) words at Ryan's funeral
blog@ryanlowe.ca no more Forging Email Headers: Good, Bad or Ugly? Sarcastic Dictionary (Part 1 of Many) Tags Hierarchies Twisting Rails is Risky Business Risky Business? My Take on Early Alphas Whoa, it's August 2007 Closing Comments A Postscript to "Growth at the grassroots" »» All Blog Posts
Linkage
del.icio.us/ryanlowe
technorati/ryanlowe.ca/blog Aurora Roy Jim Andrew Trasker Travis Kibbee Karen Dr. Unk Ayana Van Bloggers Joel Spolsky Robert Scoble Tim Bray Dave Winer Raymond Chen James Robertson Ruby/Rails Bloggers rubyonrails.org weblog David Heinemeier Hansson Dave Thomas James Duncan Davidson Mike Clark Jamis Buck Signal vs. Noise Tobias Luetke Amy Hoy: (24)slash7 Jeremy Voorhis Eclipse Bloggers Planet Eclipse EclipseZone Luis de la Rosa Eclipse Foundation Kim Horne Billy Biggs Ian Skerrett Mike Milinkovich Bjorn Freeman-Benson Denis Roy
Archives
|
Software Testing and Creativity
Some developers think that if they are forced to test their software seriously THEMSELVES (ie. not with a separate testing group), it may stifle their creativity in some way. Developers can get into a "hacking zone" and just produce produce produce. How do you know what you produce isn't a load of bung? With tests. With test-driven development, you can "define" your system requirements in terms of tests. Then use your creativity to make these tests pass, refactoring your solution as you progress. Since you are confident that what you have is always correct after you refactor because of the tests, it allows you to take larger refactoring risks than normally possible. You have less to keep track of in your head - "will feature X still work if I do refactor Y?" - and you have more brain horsepower for writing a creative solution to the problem ... ... which is making all of the tests pass. :) So writing your own tests actually allows you to be *more* creative because you have the safety net and less to worry about. Unless you don't care about the quality of the code you produce - in which case you are on your own. Posted at April 06, 2003 at 07:08 PM ESTLast updated April 06, 2003 at 07:08 PM EST Comments
It's like writing an essay. The first try is raw and pure. The second pass is being realistic. The third pass is getting rid of the crap and cleaning it up. The forth is polishing. There's always stages in producting *anything* Nobody can make flawless things on their first try. Iteration and examination (testing) is always necessary. » Posted by: roy at April 7, 2003 12:48 AMThat's not really a great analogy for test-driven design but good for "iterative development". Each iteration has a solid set of defined requirements that you can test against, you may refactor the code that passes these tests but the requirements/tests never change in an iteration (ideally). When the next iteration comes around, user feedback will steer you in another direction. This means new tests and/or changing the old tests to fit the new iteration's requirements. I hope that helps to differentiate the two. » Posted by: ryan at April 7, 2003 12:55 AMthat is so cool, and i am really excited that you seem to be grasping this TDD sheeat full force - way to go » Posted by: andrew at April 7, 2003 03:48 PMroy, i'd like to build on your analogy... indeed I agree that your comparison is like an iterative approach to software... now consider this... pretend that you are writing an essay to prove a point (any point) - and that you have predefined points you wish to make (aka the tests) - you map out your expectations (again referring to the tests) and then start writing to fulfil your tests (aka the iterative approach)... now lets say you want to add to your essay ... again with more tests and more writing... with an automated test suite style thingy you can easily check to make sure that you haven't contradicted yourself with the new work based on older expectations (aka making sure the new sheeat doesn't break the old).. so having a clearly defined objective with your writing before actually writing is more closely related to test-driven design - and of course with such objectives in place you can somewhat safetly edit (aka refactor) your work knowing that the overall message is preserved » Posted by: andrew at April 7, 2003 03:53 PMyeah...agreed on both points...my point was not complete and thorough enough. Very basic analogy indeed. I understand what you mean...you guys seem to really love this...all more making me want to learn CPPUnit :-) » Posted by: roy at April 7, 2003 04:54 PM |