Ozzy had nothing on Sarah Palin
Today’s stop on the crazy train - VP hopeful Sarah Palin gets a blessing protecting her from witchcraft:
Today’s stop on the crazy train - VP hopeful Sarah Palin gets a blessing protecting her from witchcraft:
You meowed quietly and stretched your legs when I picked you up from the ratty old basement chair, covered in fur and old bits of thrown up food. We looked around at the cracked yellow floor you’d walked across thousands of times and said goodbye to the swinging door I cut for you to make nighttime escapes. You said goodbye to the rows of fenced-in backyards that you’d indiscriminately considered your home for the past 8 years, your entire life, and went up the stairs, you cradled in my arms.
We stopped for a moment and went upstairs. Would you like to say goodbye to the lady, fast asleep, in whose restless lap you liked to try to find a comfy resting place? The dog made you too anxious to stay long and then headed back down to the entry way, stripped of its familiar golden trim. You eyed the box, your least favorite place to spend any time and I coaxed you inside, meowing with more apprehension.
“Do I have to?”
“Yes, little friend, I’m sorry but it has to be.”
“meow…”
You waited, unquietly, while I tethered the dog, whose excitement for any trip to anywhere would always be predictable and eventually I brought you with us out to the larger metal box where forces would jostle you around impolitely.
You reminded me of the first trip over five years ago when your breathing had grown strained and on our way to the doctor who would inspect your small, frail lungs and learn you suffered asthma, preparing you for a lifetime of forced puffs - one in the morning, one at night - to alleviate that struggle as we made our way north.
“meow”
“I know, I’ll miss it too.”
“meow”
“It won’t be long, I promise.”
I let you loose to explore the metal box for the rest of the trip. Your big friend lay quietly in the back as the streetlights streamed in, over, and past while you explored the front seat, armrest, and floor.
And eventually the box stopped - I opened the door, and you went out to explore your new home just past midnight.
“meow”
“I know - it’s not the same, but you’ll make friends. You always do.”
I’ve been keeping busy with a ton of busywork over the past couple weeks - in my spare time, I’ve been pwning Chronotron - you should, too.
Here’s some thinking out loud.
How do I construct a SQL aggregate function over time to measure wall clock hours? Say I work in corporate security and I have information about employees entering and leaving a building so I know how long Jim and Pam were in the building individually and I want to know how many minutes *anybody* was in the building? A security log might look like this:
| Person | Enter | Exit | aggregate minutes |
|---|---|---|---|
| Jim | 7:00AM | 11:30AM | 270 |
| Pam | 8:00AM | 9:00AM | 60 |
| Pam | 10:00AM | 11:45AM | 105 |
From such a log, I’ve got a total of 285 minutes when someone was in the building. In a standard language like C or perl this might not be too hard to solve by iterating over the records and a bit array for minutes of the day which could be set “on” when people are present, or by iterating through records (sort by start time and duration and compute overlaps and do some counting) but right now I’m not sure how to do it in SQL.
More thinking out loud to come as I make progress or get increasingly frustrated with this…
Update: I think I figured out the right way to approach this. As far as I know, no DB server implementation offers such a time aggregate facility so that’s probably not the right tool to throw at this job. This is data I have (and need this computation performed on) is in a database built on a Ruby on Rails web application and the simpler way to handle this will probably to recalculate that aggregate value as records are entered or modified from the web UI and then retrieve that value directly from the database rather than trying to compute it from the constituent records. Design-wise I’m not sure which approach I prefer. This is a pivot on DB data and feels best performed in some post-processing context (with the flexibility to pivot in different ways and see “minutes in the office [by day|by people in a department|by hour|etc]”) but I also know there is only one axis this will ever be pivoted on, so there’s a fine case for removing that business logic from the database. And since I don’t know how to do it in SQL, that’s the way I’ll probably go ![]()
…the browser wars. In Chrome, navigate to about:internets. Enjoy.
Update: according to Nick, this is way yesterday. Sorry. Also: doesn’t work in Vista.
How many kinds of crazy is this?
In an address last June, […Sarah Palin…] urged ministry students to pray for a plan to build a $30 billion natural gas pipeline in the state, calling it “God’s will.”
Yeah, Moses probably just forgot “Thou shalt build a $30 billion natural gas pipeline” when he was trying to keep all those other commandments in his head on the way down from Mount Sinai.