w2d3
What we did:
Test Driven Development. Ruby and rails uses a specific library, or framework called rspec which helps you test out new features as you go along on your project.Ā
Imagine youāre hemming a jacket piece by piece. Each piece of the jacket needs to fit exactly to the person youāre hemming it for, therefore you need to have them to fit it each time you make a change or hem an additional sleeve. Itād be tedious to call the person each time to come over for a fitting each time right? TDD is like creating the jacket and the mannequin at the same time. The mannequin makes sure the the jacket fits, and the jacket is able to adjust to the mannequin if there are any additional pieces added.Ā
After lecture was our project for the day, which is poker. While Iām not a poker player, Iāve recently become intrigued by the numbers, strategy of poker, I even watched several hours of videos on Youtube to see what the pros do! While setting up a game of poker with several players has gotten somewhat easier, the main meat of the project was figuring out the poker logic of which 5 card hand beats which 5 card hand.Ā
Iāve ordered the algorithm by the best hands in terms of Royal flush, straight flush, four of a kind, etc... and assigned a numerical value for each type of hand, now itās time to figure out how to get those tiebreakers.
Topics where I struggled:
algorithms. Seems like everyone else can whip up an ai quickly out of the air, while I need to picture all the pieces of it on pen and paper.Ā
Felt a lot more improved:
Practice assessment taking. Maybe itās because of all the hours spent working on classes and instance variables but Iām starting to understand how classes and methods access each other in Ruby.Ā
Code that == Mind Blown!
instance_variable_set(arg) - Allows you to access private methods from a class even though theyāre specifically set in private! Although not typically recommended,Ā
How Iām feeling:
Maybe itās because the midweek but I feel like Iām still able to code or practice for another 3 hours tonight. Will certainly crash this weekend.
6/10 motivation
Code Music
https://www.mixcloud.com/Mike_AD/late-night-alumni-the-122-130bpm-selection/
Sidenote:
I feel like Iāve been ignoring other aspects of my life as I basically devote a majority of my time to a/A. For example, I havenāt clipped my nails this week, or even had time to check the blogs I usually go to! Please read and update me:
www.millionmilesecrets.com
www.thepointsguy.com
Checkout my projects!
https://github.com/theRealYoshi
Iām taking suggestions!
https://yoshihiroluk.typeform.com/to/ilJBBy














