Brandon Does a Coding Bootcamp at Tech Elevator - Columbus, OH

Day 15 Test Driven Development

Today in class we talked all about test driven development (TDD). Then, we completed a simple test driven development exercises with a simple class and one method which determined a type of triangle based on the lengths of three sides.

One of my classmates asked a poignant question, how do we write test before we even know what our methods are? I think this question encapsulates a lot about test driven development, but also development in general. Brian’s answer was that by the time a developer starts actually writing code, they know all of the classes they will create and all of the public methods inside those classes. The design of the thing does not happen in a text editor while an individual developer works through a problem.

If we know what our public methods are going to be and the public methods our coworkers are going to write, then anyone on the team can write the tests. The core of TDD is to design tests based on this plan then:

  1. write enough tests to get started
  2. fail them
  3. write code to pass them
  4. commit changes
  5. repeat until all tests are implemented

This process is tedious, but it’s easy to see how useful it is not only in writing code that meets business requirements clearly, but also in thinking about code in modular chunks.

Lunch-time Panel:

We had panel of senior developers answer questions and talk about their experiences in the software industry. This was also the first time that students had to spout their elevator pitches (a short 30 second personal narrative) in front of everyone. I was chosen to be a part of the first group. It was nerve wracking to temporarily be the focus of 60 or so people, but it went OK and everyone was supportive. Growth!

The panel was a diverse group of developers, none of which had a CS degree. It was cool to hear about the different paths to success in the industry. My biggest takeaway was that I want to be in the consultancy or startup space so I can try on many different technologies and roles as possible in a short amount of time.