Best ways to populate dynamic array of numbers in ruby

Array of years using range((yr=Date.current.year)-9..yr).to_a#=> [2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010]Array of years using lambda Array.new(10){|i| Date.current.year-i}#=> [2010, 2009, 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001]Array of monthsDate::MONTHNAMES.compact#=> ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]Array of abbreviated monthsDate::MONTHNAMES.compact.collect{|m| m[0..2]}#=> ["Jan", "Feb", "Mar", "Apr", "May", "Jun", … Continue reading Best ways to populate dynamic array of numbers in ruby

Lone Star Ruby Conference 2010

DejaVu! You usually say that when you attend the same conference twice 😉 - At Lone Star, its always an new experience. Last year I was an attendee, this year I presented a talk and I thoroughly enjoyed myself. There were an awesome selection of talks and more importantly, the sequence of talks was thought … Continue reading Lone Star Ruby Conference 2010