Week 8: TDD, RSpec, SQL

desktopscreenshotweek8

12/28     It’s been two months already and I’m still under Web Development 101? Sigh… Must inhale all the espresso beans!

Done with Chapter 10. Thanks TOP for telling me not to feel disheartened if Ruby still doesn’t click. Someone click it for me! At least it’s not as bad as it was when I first started. Went over ‘Points to Ponder’ to see if I retained anything. I did. Did one bonus assignment on project euler and started Testing 101.

Watched the video by Nell Sharmell. It was 30 minutes long and I think this should be added to the additional resources instead. I usually don’t like it when people say something is hard. It propagates the idea that it is hard. But difficulty is subjective and anything can be deemed “difficult” during the early stages of learning. She leaves a good message though. Anyway, here are some notes I took during the video, if anyone wants to skip the video.

New code must be tested. Bugs must be reproduced with a test.
Use test to learn about legacy code. The more you learn, the more you can change it for the better.
Testing last leaves hole in test coverage. Code could break after deploying even if it passed.
Write failing test, make test pass, then refactor. Also known as Red, Green, Refactor.
Every line of tested code is reliable code.
Test driven code is modular, loosely coupled, small methods.
Stub is a stand in for an object called by your code. Mocks are specialized stubs that knows exactly which of its methods should be called and what arguments. If expectations aren’t met, it will fail.
Test-driven development (TDD) is evolving.

12/29     Finished RSpec on Code School. It wasn’t that difficult and I was bummed that subsequent lessons were no longer free. Decided to skip the Ruby project because I wasn’t on my laptop at the time and went to Databases.

The first assignment on introduction to SQL was an easy read. But the video about relational database is not necessary, in my opinion. It introduced some terminology, but something about it made me say, “I wish I skipped this video”.

I then moved on to Khan Academy’s Intro to SQL. It’s my first time at Khan Academy and I found it very … cute. Is this site for children? Why are they giving me so many points when I just started? This is also the first time that it was a woman doing a voiceover. I have no problem with it and as a woman, it’s nice that there are more and more women involved in programming. But maybe this person is too quirky for me. Like they’re trying too hard to entertain me. I feel like Zooey Deschanel is teaching me and I don’t know how I feel about that.

Not sure if we’re only supposed to do SQL basics, but I decided to do the whole course anyway.

12/30     Did a few more lessons on SQL. Decided to start the test first Ruby project.

I put the learn_ruby directory well within my documents. I got the error “rake aborted”. There were no spaces in my current working directory, so I wasn’t sure why I got the error. I moved the folder in my home directory, anyway, and it worked.

Did the first exercise. Wow, I can’t believe I did this. Started the second exercise. Wow, how do I do this with barely any instructions?! I don’t think the Code School course was enough for me to do these exercise. I guess I’ll just Google everything again.

12/31     Best new years eve so far! I’ve never been so motivated to tackle programming. Even though I feel like everything’s going smoothly one day and then I’m clueless the next day (or the next minute).

 

1/1-3     Went over my notes to review Ruby and RSpec. I had written the formula down and the basic methods required. The trouble I was having was that I was concerned about printing/puts-ing specific strings. I wanted to puts “freezing temperature”, “convert”, etc. I wanted to make a class and add variables. I decided to rake it anyway and hallelujah, it passed. So I guess I was overthinking it. Or maybe my understanding of RSpec is weak. I may need to watch some more quick videos about it.

Finished database on Khan academy. My feelings about it remains the same. They hold my hand just like Codecademy, but everything is cute. And I get way too many points than I deserve. At least they don’t sing. Well Code School does that, but I’m surprisingly ok with that.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: