day 138 — code 365

Thu 28 Apr 2016

WDI Week 10 (Day 54)

What we did today:

  1. Warmup — Crypto square (ruby)
  2. RSpec
  3. Interview Questions
  4. Yearbook

ruby

Any method calls inside initialize will be called when an object is instantiated from a Class.

.ceil will round a floating point number to the nearest whole number

We can appropriate methods, inside a Class, to behave like a variable — storing a value. For example:

class Calculator
def store
5 + 6
end

def something_else
store + 4
end
end
my_instance = Calculator.new
my_instance.something_else # 15

Test Driven Development

We did a code-along in Rails, writing a test suite using RSpec — writing failing tests, then writing the code to make them passing tests. We’d done a bit of this before, but it was really good to develop a simple CRUD app from scratch using TDD.


Interview Questions

We spent some time collaborating with each other, working through about 20 programming interview questions, in groups of 3, and then discussing them with the rest of the class.

This was very useful — it reminded me that there is a big difference between knowing the concept of something inside of my mind — and actually being able to verbalise it succinctly and clearly — and in an interview situation.


Thanks for stopping by!