Sunday, February 9, 2014

Week 1 Day 5: Fridays[0]

Major activities of the day: Fixing up HW and labs from yesterday, and lots of lecturing about enumerable classes (mostly Array and Hash) and the map/collect and select methods.  These were extremely useful in our labs, where we had to restructure hashes, extract data from complex multi-level hashes, and use hash data to modify Strings.  At this point, I think I'm addicted to map and select, and I've even figured out how the pretzel operator works:

an_array.map(&:to_s)

is the same as

an_array.map{ |element| element.to_s }

I'm also severely disappointed that the pretzel operator can't be used with parameters.  Oh, well.

There was also Feeling Friday, but I had to leave early, and hence missed it.  It's supposed to be lots of fun, though!

Skills developed: Iteration for enumerable classes

QOTD: "I hope that Ruby jumps out of my computer and punches me in the eye!" - Avi (before trying to pop elements off an array while mapping it)

No comments:

Post a Comment