I was looking over some code today and saw a method for calculating a
persons astrological sign that seemed to read pretty nice, but looked
like it probably had bad performance characteristics. I thought I'd
ask for some more eyes.
http://pastie.caboo.se/private/qz8f8lrniakk9aqws8
My first thought was to skip all that Date range business and just
enumerate out each day of the year and what sign that was. But that's
not going to work right for leap years. Looking at the code I don't
like how it creates a whole slew of Date objects for every call to it.
And it puts them into a nice hash, but it's not able to just index
into the hash to get the right answer.
Thanks for any advice.
Josh
PS: Anyone else going to do the Rails Rumble this year?
--
Joshua E. Warchol
jwar...@gmail.com