Wednesday, February 23, 2005
Tuesday, February 22, 2005
I've tried to avoid Microsoft Windows for the last decade, but now I'm finally coming to terms with having to use it professionally. So, in order to make the best of it, I'm reading Windows XP Annoyances for Geeks, 2nd Edition on O'Reilly's Safari electronic book service. I'm just in the introductory material, and I've already found a nice tool, Creative Element Powertools. Check it out if you use Windows. Also, if you don't want to pay for or dig into the book, check out the annoyances website for lots of free tips.
Sunday, February 20, 2005
Saturday, February 19, 2005
Since I'm working on some Ruby software, I might want a place where I can host a Ruby web application. I've only found one so far, OCS Solutions. I still have several months on the contract with my current host, Lunarpages. I'm very happy with their service and price, but they don't support Ruby. Maybe that will change by the time I'm ready to deploy any Ruby web applications.
I watched a little bit of the first episode of the new Numbers TV show. In it, the mathematician demonstrated that when we think we are picking things at random, we still will use a discernable pattern. The Diceware Passphrase Home Page provides a system where dice are rolled to generate a random passphrase which should be much more secure than anything that we try to make up ourselves. This slashdot article talks about the need to use passphrases rather than passwords in order to have better security.
I'm working on a Ruby program where I have to convert from secular calendar dates to liturgical calendar dates. Central to this is calculating the date of Easter for a given year. I found the following helpful links:
- U.S. Naval Observatory
- Information on Ecclesiastical Calendar
- C Code for calculating Easter
- Algorithm for calculating Easter
SECONDS_IN_DAY = 60 * 60 * 24
goldenNumber = year % 19 + 1
solarCorrection = (year - 1600) / 100 - (year - 1600) / 400
lunarCorrection = (((year - 1400) / 100) * 8) / 25
paschalFullMoon = (3 - (11 * goldenNumber) + solarCorrection - lunarCorrection) % 30
--paschalFullMoon if (paschalFullMoon == 29) || (paschalFullMoon == 28 && goldenNumber > 11)
dominicalNumber = (year + (year / 4) - (year / 100) + (year / 400)) % 7
daysToSunday = (4 - paschalFullMoon - dominicalNumber) % 7 + 1
easterOffset = paschalFullMoon + daysToSunday
return Time.local(year, "mar", 21) + (easterOffset * SECONDS_IN_DAY)