Tuesday, October 04, 2016

CODE CLAN WEEK 2 - AND WE ARE PUTTING THE BAND BACK TOGETHER

 

So week 2 starts with a scrum and then a review of the previous week's homework.  I was lucky to have 3 hours of quiet time on the train back to Aberdeen on Friday where I managed to get the bulk of the homework done. It did make me laugh that Jamie my son (age 8) and I were both finishing our homework in the kitchen on Saturday evening. Jamie had grammar and reading and I was making a fantasy model pet shop using Test Driven Development (TDD).

 

Monday saw us learning about cats, wizards, and wands to model classes and multiple classes... No, wait, that's the other way round. The homework was to continue with classes and model a speedy car (with turbo) and a slow car (nonturbo, Normally Aspirated). The type of engine would affect the car's performance and fuel economy which would be passed into the car object.

 

Tuesday was a brilliant day of coding along with an instructor to form a "simple" snakes and ladders game.  21 cohorts clattering away at the keyboard churning out ruby code. The game of snakes and ladders turns out to be quite complicated if you break it down into a program.  Thankfully Object-Oriented Programming (OOP) simplified it into objects, board, players, dice, etc.

 

Wednesday, following the scrum, was a whole day exercise where we were split into pairs and tasked with making our own objects and having them interact with each other.  The world was our oyster, so as a team we decided to put the band back together and form band-related objects including, songs, venues, and gigs.  It can get very complicated very quickly but we met the brief of having objects interact with each other. 

 

Thursday introduced us to the 3 pillars of Object-Oriented Programming (OOP) -> Inheritance. Abstraction and Encapsulation.  This covered a superclass bird object and its sparrow, duck, robin, and penguin sub-class objects.  All had methods quack, chirp, and fly. (except penguin who couldn't fly).  Blocks were the final lesson for the day with a small lab.  Thankfully this was Thursday's "social" evening so no homework and a chance to go for a beer with the rest of my cohorts.  Blocks were hard, so much chat in the pub was discussing coding


beer_array = beer.select{ |beer| beer.type}.count

 

Friday is revision and a chance to go over anything we need a refresher on from the week. Oh, and we get issued the weekend homework challenge.

 

So week 2 in review.  Another big thumbs up to Code Clan, my instructors, and my cohorts.  I can't believe how much I have learned in the two weeks.  I feel part of something special and really BIG...