Week 1 at MakerSquare

The first two weeks have gone by pretty quickly at MakerSquare. I’ve definitely been learning a lot and have constantly been challenged. To begin last week, we first reviewed some of the basics of Git, a version control system that allows us to keep track of and retrieve different iterations of our code. After that we got into data modeling in Ruby, specifically using arrays and hashes. We were also introduced to RSpec, a Ruby gem used for test driven development (TDD). A lot of emphasis was placed on how following the process for TDD is a very important concept and is an important discipline to learn for aspiring developers. Using RSpec, it quickly became clear how key TDD is. Without setting the expectations for what your code should do before writing it, you can run into many problems and the more code you write the more problems you’re likely to have. With TDD, you can take comfort in knowing that all the code you’ve written will work since you’re setting the expectations before writing the actual code. TDD also reinforces the Single Responsibility Principle. I was definitely guilty of often trying to create methods that attempted to do too much, but after testing my code constantly I’ve been writing simpler methods. To get familiarized with RSpec and TDD, we were first given a ruby file and and spec file with tests already written. Our job was to update the code to make all the tests pass. Not having to worry about how to write tests was helpful in gaining an understanding in what different tests were looking for. The next day, we worked on writing our own tests which helped us become more comfortable with the syntax needed for RSpec and how to write good tests. The first week also included our first lesson on algorithms and the big O. More important concepts were covered in that lesson, including the importance of being cognizant of the efficiency of our code and thinking about if our code can be refactored to use more efficient methods since time and space is not limitless. We ended the first week by beginning to work on a project called Puppy Breeder in which we were given a user story and asked to build out classes to fulfill the requirements. The Puppy Breeder project went on for more than a few days, which I’ll discuss in more detail in my Week 2 post!

Advertisements