Wrote an iCalendar downloader

Tonight I wrote my first app with the Calendar API. Basically I used the calendar.c demo code as a reference, and pulled out the pieces I needed to do a quick iCalendar download app. It worked without a hitch. With just a little more tweaking, I’ll have a command-line app I can use to fetch arbitrary date ranges in iCalendar format.

The caveat: It’s very slow with date ranges of more than just a few days. I guess that’s to be expected, given the performance I’ve seen with iCalendar downloads from the GUI client. It does eventually come back, though. A one-month range took a few minutes to complete; I hate to think how long three years would take!

Of course, I plan to run this unattended from cron, so in theory I don’t care how long it takes, even if it’s a couple hours. The question is, if I try to suck down a three-year range in one big chunk, will it fubar the calendar server? Obviously that would not be good. The other option would be to pick a manageable chunk, say a few months, and only download that much at a time. I could just run it in a loop until I get the full 3 years. Will have to play with this.

The other puzzler here is, the Oracle Calendar GUI calendar lets me download in either of 2 formats: iCalendar or something it calls “vCalendar”. I’m not sure of the exact difference, but vCalendar is a lot faster to download. What’s the difference between the two, and is there a way of doing the vCalendar download from the API? I wonder if there are certain iCalendar fields that take significantly longer to process. If the vCalendar download omits those, that could speed things up significantly.

I suppose the thing to do is generate both iCalendar and vCalendar dumps for a specific date range, and compare the differences between the two. That may shed some light on things.

Drilled my holes

I got kinda lazy yesterday, and didn’t get too much done on the bedroom fan wiring project. But, I did get one step closer to running a new wire from the basement to the attic. I got holes drilled in the top and bottom plates, and verified that both holes hit the same stud cavity. Fishing the wire should be pretty easy at this point.

Rules of thumb for anyone who wants to attempt this…

  1. Ensure that you own a ranch house. 🙂
  2. Tools of the trade: tape measure, stud finder, drill, 1/8″ x 12″ feeler bit, 5/8″ spade bit, flashlight.
  3. Find reference points in the basement and attic so that you can (somewhat accurately) pinpoint where to drill. Examples are: pipe penetrations, wire penetrations, ducts, etc.
  4. Locate the wall studs, and pick your drilling spots so that you don’t hit the top (or bottom) of a vertical wall stud.
  5. Measure, measure, measure! Can’t stress this enough.
  6. Drill a pilot hole first to make sure you hit an open stud cavity. I use a 1/8″ x 12″ bit for this. After drilling, leave the bit in the hole. Then go upstairs/downstairs and make sure the bit is not sticking through the ceiling/floor!
  7. Assuming everything looks good, use a 5/8″ spade bit to enlarge the hole. When drilling downwards from the attic, make sure the bit is TIGHT in the chuck.
  8. Once you have drilled both holes, put a flashlight over the hole in the attic. Adjust the light for a focused (not diffuse) beam. Go down to the basement. Turn the lights off, look up into the hole, and make sure you can see the beam.

Next: Let’s fish some wire..