Saturday, February 20, 2010

Oh, Hell yes!

First off, today is my 8th wedding anniversary to my wife Robin, a very beautiful woman who understands me enough to not only tolerate my interest in history, but encourage it. Such women can be incredibly rare and I am luckier than I deserve.

When I first created R@L, one of the features I wanted was a "Today in history" blurb that would automatically update. I had seen something similar on the Navy Historical Center's site, but the code was kind of ugly; it basically loaded the entire year into the main page, bloating the size up quite a bit. Since I wanted the option of perhaps having multiple entries for a day, it was not a viable way of working this out.

I took a few stabs at it, spent some time drawing out the logic, but never managed to make something that could work. I hadn't messed around with it for about a year or so, but last night I decided that I was going to see what I could do in the couple of hours I had this morning before Robin woke up. The results were a surprise; I got it working with few problems and it's far simpler than I had ever managed to conceptualize before. It's only nine lines of code in the main page....

...and 366 separate documents for each day of the year.

Sooo... yeah, I have MORE work cut out for me now.

I basically blended code I found from three pages; this one to write out the script I heavily modified from this one.

2 comments:

龍腾longteng said...
This comment has been removed by a blog administrator.
willson said...
This comment has been removed by a blog administrator.