Study notes: Seven Languages in Seven Weeks

These are my annotations and exercises when reading the book Seven Languages in Seven Weeks by Bruce Tate.

Introduction

1.1 Method to the madness

For each programming language you're, answers for the following questions:

1.2 The languages

1.3 Buy this book

1.4 Don't buy this book

1.5 A Final Charge

2 Ruby

2.1 Quick History

2.2 Day 1: Finding a Nanny

Using Ruby with the Console

The Programming Model

Decisions

Duck typing

Day 1 Self-Study

puts 'hello world'
/Ruby/ =~ 'Hello, Ruby'
10.times {puts 'your name'}
(1..10).each {|x| puts "This is sentence number #{x}"}
irb filepath.rb
def main
  num = rand(1..10)
  loop do
    guess = gets.to_i
    case
    when guess > num
      puts "too high"
    when guess < num
      puts "too low"
    when guess == num
      puts "you got it ;)"
      break
    end
  end
end