mercoledì 17 agosto 2011

My personal imaginary interview with The Clean Coder book :-P

Me : I must know my code works but how can I know my code works? 


Uncle Bob's book : That's easy. Test it. Test it again. Test it up. Test it down. Test it seven ways to Sunday!... and don't forget to automate your test.

Me: But isn't code hard to test, my code really is?

Uncle Bob's book: yes but only because that code has been designed to be hard to test.

Me: how can my code be designed to be easy to test? 


Uncle Bob's book: the best way is to write your tests first, before you write the code that passes them (TDD). 

Nessun commento:

Posta un commento