
TDD - What a difference a week makes! So I'm finding out that CodeClan Instructors are pretty sneaky! You think you've got everything straight in your head then they throw in something else that you've not seen before! Today it was Testing. Lesson learnt, don't let on that you've finished the lab with 40 minutes still to go - you'll get a made up on the spot extension (thanks Hannah!) Yep, go and write some more methods and then write your own code to test them to make sure they work! Yep, no problem! The second last sentence that I wrote there actually brings me back to the title of this weeks blog. For my non coding friends TDD stands for Test Driven Development. What Hannah had actually asked us to do was write the test code first THEN write our methods. Why? Good question! And one that I was struggling to get my head round. Surely I should write my method first my brain was telling me - THEN check it works? NO!...