Andela Boot Camp XV Daily Journal — Day 3

Some other wonderful day like always, but more interesting this time. We started with warm up exercise and giving imaginary gift to one another with reasons and a response from the recipient. This helped to remap the mind to the fact that there is a need to express appreciation.

After the workout, we head straight to discussing food for thought “How to make sure our code works”. Impressively, everyone had something to say, unlike yesterday (day 2) when so many discussions was off stage. Great contributions from different digging.

Below are a few points I was able to grind out:

  1. Setup the development/testing environment
  • Install the right interpreter or compiler
  • Make sure your computer system meets the specification
  • Install all required libraries and dependencies
  • Choose the right editor that supports the programming language for your coding

2. Performs Unit Testing of all your code.

  • Clearly define test case and test scope
  • Keep test simple and independent
  • When a test fails, clearly define why in the log
  • Get testers to test your code to check if you are missing cases
  • Think about both normal cases for your code and edge cases
  • Put your code to do desired work and see if it works
  • Automatic builds using CI tools like Jenkins so that every time you push code, all test cases are run and you get a report on any issue.
     See more about Jenkins https://wiki.jenkins-ci.org/display/JENKINS/Meet+Jenkins
  • Test the efficiency and effectiveness of your program

3. Code well and follows good guidelines

  • Correct indentation of code
  • use names that match what the function/class does
  • break it down into small-enough classes and functions

4. Document a lot — you learn more about your code while documenting it than while writing it.

5. Use code auditing tools like code sniffer to ensure that coding norms are perfect.
 Code sniffer simply detect and fix violations of a defined set of coding

6. Code reviews

  • Use git pull requests for peer code reviews.

7. Separation of concern

As well, software development processes were outlined and discussed such as Test-driven development (TDD), extreme programming (XP), and Agile software development. I would not go into detail of these processes as it is not the scope of this position. We also discussed types of code testing such as unit testing, integration testing and function or acceptance testing.

Midday as usual, it is time to begin coding and stop talking. Ruby Koans was brought to the front desk. The Koans walk you along the path to enlightenment in order to learn Ruby (http://www.rubykoans.com). While making corrections to the test cases, my Ruby knowledge expands like an elastic band that holds no limit.

After a few exercises on Ruby Koans, Andelab was introduced.

Andelab is an online platform used internally to prove and improve programming skills of Andela Fellows. Each programming challenge has test cases that your code or implementation must pass successfully before you can submit for critique. Knowing what Andelab is, we were given two programming challenges to solve.

1. Fizz Buzz
 Create a method to return Fizz, Buzz, FizzBuzz, or the argument it receives, all depending on the argument of the function, and whether it is divisible by 3, 5 or both 3 and 5, respectively.
 Check out my implementation https://github.com/mightys/bootcampXV/blob/master/src/fizz_buzz.rb

2. Max and Min number
 You need to get the min and max number in a list. Your answer should be returned in an array containing the min and max number, respectively, as follows [min, max] In cases where the min and max numbers are equal, return an array with just the number, as the first index [number] 
 Check out my implementation
 https://github.com/mightys/bootcampXV/blob/master/src/min_max_loop.rb

That was it for the day, no food for thought. Like always, I need day 4 to come like right now.

You might want to have some coffee while we wait for day 4.