Montag, 4. Oktober 2010

what would I have done without a book? Let's praise Mr. Gutenberg...

Yeah, I got my book. And learning this way is muuuuch more efficient compared to googling and reading the spec :) For now the most relevant and new aspects for me were
[Thomas, p15]
ruby is "genuine" object-oriented language. For instance
num = -1234          // Java code
abs = Math.abs(num)  // abs is 1234

num = -1234          # ruby code
abs = num.abs        # abs is 1234
                     # abs() is called on num! Not on Math

[Thomas, p16]
puts say_goodnight("John-Boy")
puts(say_goodnight("John-Boy"))
--> both lines are equivalent
--> precedence rules can make it difficult to know which argument goes with wich method invocation
--> so we recommend using parantheses in all but the simplest cases

But I also spent some time browsing the www. Focus this time: BDD. Have a look here: http://blog.dannorth.net/introducing-bdd/
and here: http://blog.davidchelimsky.net/2007/05/14/an-introduction-to-rspec-part-i/

Keine Kommentare:

Kommentar veröffentlichen