On TDD

So, turns out TDD does not actually stand for “Three Dozen Donuts.” Darn. It actually stands for Test-Driven Development. And it feels entirely foreign to me.

With TDD, there are very clear steps to writing code. First, I am supposed to write a failing test. *Gulp* Purposely failing? That makes me incredibly nervous. But then I get to write code to make the test pass, and everything is wonderful. Then I go back and refactor – that’s coding speak for editing – and make it nice and pretty. Phew. Then you start the process all over again: Red, Green, Refactor. Repeat as necessary.

Until we started TDD, I usually approached writing code in the same way I approached writing papers: all at once. Put all of my thoughts (aka “brain vomit”) onto the page, and then go back to figure out the structure. And then rewrite the whole thing.

However, when we TDD, I am forced to take things one step at a time. Which, it turns out, is incredibly helpful. One of the most frustrating things for me as a newbie programmer is that my code often doesn’t work. Error messages galore. The beauty of TDD is that when something is broken, I know exactly where it’s broken – even if I don’t yet know how to fix it. The struggle of course, is that it requires patience. Lots of patience.

So I’m learning to patient, one test at a time. Now, I really need to find a donut… I’ve been hungry since I started this post. Cheers!

And it begins…

Tomorrow is my first full day of class at the Iron Yard. Today we installed lots of things on our computers, not all of which I am entirely sure I understand. However, there’s still time for that! I’ve begun a Trello board with key things we learn in class, as well as questions that pop up. I hope to soon figure out how to integrate said board into this blog, but for now I’ll just include a link to the Trello Board. 

I’ve never blogged before, but I am hoping to use this blog to accomplish a few goals. First of all, I would like to have a record of the things I learn along the journey, and share the resources I have found. Second, I know that I read quite a few blogs on my search to learn how to code and choose a coding school, and I am grateful to the many students who shared their experiences.

And last, but certainly not least, I hope to process what I learn and deepen my understanding by trying to express what I have been studying. There is a saying I heard, which Google tells me is most likely a Hindu Proverb; “If you want to learn something, read about it. If you want to understand something, write about it. If you want to master something, teach it.” While I won’t exactly be teaching with this blog, I do hope that by writing about what I am learning, I will continue better understand it.

If you have any comments, questions, resources to share, or suggestions, please let me know! And thanks for reading.