Dev Bootcamp Week 7

I can't believe how quickly Phase 3 came. It feels like just yesterday Phase 0 was starting and our cohort was getting our first challenges to start at home. Flash forward 5 months and here we are about to tackle rails and dive deep into test driven development.

Over the last weekend (while I was writing my previous blog post) we were given a list of resources to go through to get us accustomed to Rails before we began the week.

The Wikipedia page describes Rails (Ruby on Rails) as: “…an open source web application framework which runs via the Ruby programming language. It is a full-stackframework: it allows creating pages and applications that gather information from the web server, talk to or query the database, and render templates out of the box. As a result, Rails features a routing system that is independent of the web server.”

Having worked with Sinatra for the past few weeks I didn't find the transition to Rails as difficult as I initially found Sinatra. While differences exist between these two frameworks, I found the differences in Rails to be beneficial to the user, and made life a whole lot easier. The idea of splitting out the controllers from the views to specific folders and having a config/routes file made the flow of the program (at least for me) much easier to grasp. In addition, rather than specifying each and every route, having the config/routes file store.

The real challenge this week came in the form of trying to learn Rails and test driven development (TDD) simultaneously. Tackling one or the other on its own is challenging enough, however both at the same time made the week that much more stressful.

Our tests were primarily conducted in ‘Rspec’ and ‘Capybara’. We had been introduced to these tools back in Week 3, and had challenges where we needed to make certain tests pass, however to begin writing tests on our own was a a new concept. After struggling through the beginning of the week understanding how these tests should be written, I began to get a better understanding the more practice we got (makes sense). I can imagine that when a developer becomes fluent in writing tests, the power it has and time it saves down the road.

Because we were all new to writing tests, the process of designing applications while adhering to the TDD process stretched the typical time it would take to development a simple application to be much longer, and at times made the process more frustrating. However this can be equated back to the fact that we were all new to these concepts, and once the tests were written it was refreshing to see them continually pass as we built onto each area. And should they fail, the errors are written in plain English right there on the command line to make it easy to go back and correct, rather than manually tear your application apart.

Not having to manually test each area of an application as it became more and more complex is an extremely powerful tool in ensuring the code being written contains no bugs, and is not breaking anything previously written. Of course the tests have to be written correctly too!

With the final 2 weeks approaching I'm extremely excited to begin working on our final projects. With the vast amount of tools we have been learning over the last few weeks it will be great to concentrate all of our time and energy to one specific project.