I love it when a test fails. It means the test has caught a bug that I hadn't spotted, before I accidentally released it. It means the test is doing its job. #testdrivendevelopment
J'ai commencé "The Ray Tracer Challenge", c'est un livre expliquant pas à pas comment écrire un moteur de #raytracing.
Le livre permet d'implémenter le programme dans le langage que l'on veut, c'est du #testdrivendevelopment avec les tests permettant de valider les différentes fonctions , ainsi que quelques algorithmes en pseudo-code.
A la fin de chaque chapitre il y a un petit programme supplémentaire à écrire mettant en application ce que l'on vient de coder.
One of the advantages of #TestDrivenDevelopment is that it encourages you to not implement "cruft."
What do I mean by that?
There are often multiple ways to implement an algorithm and it is always very tempting to do things "because they make sense." Perhaps they even do make sense in the abstract, or because they fit some set of future goals for your project, or whatever.
So your methods accumulate conditionals, everything gets a config, etc.
Test Driven Development sometimes is a huge disappointment to me:
I was writing the test first, and then got really surprised that the new method can’t be called because it’s kinda not implemented. How can that be?! 😠
The feeling when you bang your head against the wall for 3 hours and then just try something, but don't really believe in it and suddenly all your unit tests pass! 🎉 :awesome:
This is the beauty of #TestDrivenDevelopment - you can just try and guess until it works.😄 It's such a funny experience!
Traducendo "Guile Hacker Handbook" ho scoperto l'esistenza di questo libro.
È appunto un manuale sul linguaggio Go basato sul Test Driven Development (TDD).
Non ho ancora avuto modo di iniziarlo ma, come confermato anche dall'autore, è adatto anche a principianti con conoscenze di base (variabili, cicli, funzioni ecc.)