Test Driven Development

Posted by chaimoosh on December 7, 2018

I had an interview today and it was a really interesting experience. For starters rather than starting by asking anything about me and my background we just jumped straight into coding. What the interviewer did was just pair program with me doing some test driven development about implementing a set in Java. The way test driven development works is that rather than coding something and then testing to see if it works you write tests for what you want your program to do and then code to solve the failing tests. The advantages of doing it this way is that you’re less likely to have bugs and you know going in what you need to do. It also allows you to identify problems faster because you know what part of your code is doing what and if you have a bug it’s easier to find.