Week 2 Day 3 – Poker
Yesterday was allllll about RSpec and TDD. For those that don’t know, RSpec is a tool used to test Ruby code. Test-Driven Development is a programming process where you’d write tests for what you expect a program to do, and write the actual program that does it. Apparently TDD is great for documentation, collaboration and writing robust code, which is a pretty cool concept.
We started off implementing TDD and using RSpec by writing tests for a couple different toy problems, and by toy problems, I just mean problems that are more like puzzles or challenges like the ones you find on code wars. After that we dove right into building a poker game. It was definitely a challenge to stick to TDD at this point because we didn’t have a great idea of how to start the game, what sorts of methods we’d expect each class to have, etc. So what ended up happening was that we’d write the code for the method and classes, and testing them after. Once we realized we were doing this, we’d try to revert back to TDD, but since we’d hit a point where we didn’t know how to write a method, or what it should output, it was very difficult to anticipate what sort of tests we should write. I really think a large overview, and written out or diagramed design of the poker game would be really beneficial.
Last night’s homework and videos/readings were about Big-O notation, and so will today’s projects. I’m excited to learn more about it since it seems to be such a buzz word with algorithms and within job interviews. But before that even happens, there’s a practice assessment today for assessment 2.
My roommates and I have this theory that they’re giving out practice assessments on the Thursday preceding the actual assessment on Monday to not only give you time to prepare, which is nice of them, but it’s also a psychological tactic. I was thinking that they give out a much harder practice assessment designed to not necessarily make you fail, but to make you struggle so that you’d study your ass off over the weekend. The Monday assessment would follow and it’d be a slightly easier or more manageable assessment. That’s my theory anyways.
I think it’s a great tactic, because I know that if I were to easily pass the practice assessment, I’d be less inclined to study as hard over the weekend, and I’d be less prepared come real assessment time.
Anyways, going to go get ready to take that practice assessment so I’ll update all of you tomorrow! Hope everyone has a great one!