Day 4 was introduction to Class and Module, where Object-Oriented Programming kicked in. Along with functions, hash, and arrays, I was able to build a simple story-like program to perform tasks. Throughout the day it was exercises for scenarios where I had to create a class, drop a new object in there, the object has either hash or arrays, and another object is associated with that hash. It was a lot to take in. Even though I had a pretty good understanding to ruby bits, I was still struggling to piece the whole set of problem together. That was exactly why I enrolled WDI - to train my logical thinking. What I did eventually was writing down the story flow and tackling one after another, it was really helpful as I cruised through the problem.

One big note to myself was how to remove an object in a hash, the method being

hash.delete(:key)

instead of using

[:key]

, it was because using key will signal ruby that delete was the hash when it wasn’t.

Another note was when printing out data was needed, using a hash is preferable to using an array.

This journey was definitely not just about coding, it was also about helping other students who struggled. As a student who had self-taught for a few months, I’ve been truly satisfied helping out others who have only been coding for 4 days. As my instructor said, teaching is a way of learning too!