Blog: October 2014

Most of these posts were originally posted somewhere else and link to the originals. While this blog is not set up for comments, the original locations generally are, and I welcome comments there. Sorry for the inconvenience.

Making things easy = making things hard

The first time I traveled for work with my employer I saw that I could register frequent-flyer account numbers with them and they would do the right thing there. I didn't yet have a frequent-flyer account on the carrier we usually use, but I figured I could come back and add that later.

I downloaded the airline's app, used the confirmation number for the flight as an entry point, and created an account with them. The app did all the right things for that trip.

I recently booked another trip and noticed that I hadn't yet entered the frequent-flyer account number in my travel profile (and so the app couldn't find it for me). Ok, I figured -- I'll just ask the app for my account number so I can add it to the profile. (Meanwhile, I had to use an actual phone to talk to an actual human being to connect this flight to my account.)

Nope, no way to get the account number in the app -- I'm signed in, but I apparently don't need to know the account number so they're not going to trouble me with a line in "settings" or some such.

I searched my email and found the "welcome to (us)" notice, but it didn't contain the account number either.

So I went to the web site, at which point I had to log in. After failing with my standard password algorithm I went down the "forgot password" path, which is when I discovered that my algorithm wouldn't work with them (see rant below), hence the failed login. So I reset my password with their insecure rules, logged in on the web site, and therein found my account number, which I then added to my corporate travel profile. I suspect I'll need this password at most one more time (if the app challenges me for it because it changed, which it hasn't yet).

All of this could have been averted if either the app or the welcome email had a way to find the account number. Sheesh.

In theory, now, everything should be wired up: next time I need to book corporate travel on this airline the flights will automatically show up in the app and I'll never need to directly interact with the airline. That wiring makes things easy, but it was way harder than it should have been to get the information in order to effect that wiring.

Rant: In these modern times, why in the world does anybody have password rules that do not permit any low-order ASCII character? No punctuation except periods and underscores? What is this nonsense?

Database design question

Dear Brain Trust,

I'm too new to this to know if this is a "DB 101" question or more interesting, but Googling isn't getting me anywhere and I'm not getting a clear understanding from casual interrogation of coworkers, so I'm trying y'all.

Let's say I have a dataset that has half a dozen(ish) types of data -- posts, and users, and comments, and a few others. Logically, each of these types is a table, and I can join as necessary across them (to, say, find all posts by a given user). That's fine.

Now suppose I have, oh, 250 such datasets (same schemas, different data), and I'm going to load them all into a single database because I want to be able to do queries across datasets. There are two ways I might approach this:

  1. Make 250 sets of tables. Each table is named for its dataset (e.g. Set1.Posts, Set1.Users, ... Set250.Posts, Set250.Users). If I want to do a query across all the users, everywhere, I, um... can I do the moral equivalent of "JOIN *.Posts"? How would that work?

  2. Make big tables. I have one Posts table, and one Users table, and so on; at data load I cons up values for a new "dataset" column to say where each row came from. If I only want to look at one site I use a WHERE on that column to restrict the SELECT; if I want everything, it's all there for the taking.

Let me dispense with one possible concern: these datasets are updated from time to time, so at times I'll want to refresh the data from a dataset because an update came out. (An update is a new, complete copy, not a delta.) My database supports data partitioning, so deleting just the rows from that dataset before loading in a fresh copy is not a problem. (In option 1, you just drop the table.)

It seems to me that there is everything to gain and (probably?) nothing to lose by doing #2, if my database can handle that many rows. Because my database is in the "big-data analytics" space, I believe it can handle that. I mean, this database can operate on petabytes of data; my li'l pile of datasets will be well under a terabyte. (In fact, #1 didn't even occur to me, until I mentioned this project in passing and somebody suggested it.)

Is that reasonable, or am I missing something big and obvious? What factors should I be considering that I haven't mentioned? And if I'm wrong and I should be doing #1, how do I write a JOIN that crosses all the datasets?

(All the Stack Exchange data, in case you're wondering.)

Lots of interesting discussion in the comments. And the consensus was that my instinct for #2 was correct.

I'd like to see the police report on that one...

Friday night around 10 I was sitting in my living room reading when I felt a vibration, heard a loud "thump", and saw the lights go out very briefly. (I do not know in which order these things occurred.) Flashing red lights appeared pretty soon (but no sirens), and I got up to take a look out the window.

There is a large stretch of lawn between our house and the next building over (which is a small apartment building). Our house fronts onto one street and backs onto another, with maybe 100 feet between the two. There is a small hill up from the street to the houses on our side. Another street comes to a T intersection on our street, in front of our house. I see a lot of minor accidents there, as people coming down that street (down a hill) encounter people on my street who didn't heed the "opposing traffic does not stop" sign. (Traffic coming from that other street does have a stop sign, though; one of the two directions on my street does not.) The posted speed limit is 25MPH, so most traffic isn't going much over 30.

    X       X   


In the bad ASCII art, the X on the left is our house, the X on the right is the apartment building, and the * is where I saw a car, facing north. Surprisingly, the visible parts of the car seemed reasonably intact.

Saturday afternoon I saw somebody taking photos and learned the rest of the story. (There'd been police and firemen all over the yard the previous night, but I couldn't see much and you stay out of the way of emergency responders at work. Also, that yard belongs to the neighbors, not me.) Apparently the car came down to the T at a high rate of speed, drove right up over that hill onto the lawn (barely missing a pole and a tree, though the pole has electrical lines so maybe he grazed that and flicked our lights?), got airborne somewhere in there, left tire tracks and abrasions on the side of the brick building about five feet up, fell down on a row of air-conditioning units, bounced, continued forward, and drove over the other row of AC units, scattering their parts all over the lawn. The driver, who was not drunk, walked away.


I see drivers speed down that street sometimes, and one of them smashed a car parked in front of our house once and pushed it onto our lawn, but I'd previously thought that our house, back from the street and up 11 steps, was safe from that. Now I wonder.

Text and subtext

Message from landlord: "In accordance with city ordinance blah blah, we will be conducting a mandatory evacuation drill on $date at 10AM."

Implied message from landlord: "Unless you particularly want to walk down 43 flights of stairs, that might be a good day to make other plans."

Unknown: whether the latter was intended -- fewer people in the building means fewer people who can mess up a compliance-check, after all. Though this would have been more plausible if they'd called it for 8AM rather than 10.

On a tangent, I wonder how people with mobility impairments get out of office buildings during alarms. There's no job-related reason I couldn't have a coworker in a wheelchair, after all, so somebody must have thought this through. (Please let somebody have thought that through...) Do they keep an elevator in service in that case (even though elevators are normally disabled during fire alarms), or is the floor warden responsible for rounding up people to carry the person downstairs, or what?

Ruach service

My congregation has double services for Rosh Hashana and Yom Kippur -- have to; we can't all fit in the space at once any more. It was decided early on that the early service would be less formal (still formal, but...) and the later one the more-traditional (at the time) Reform shindig with a hired professional choir doing grandiose performative music. To me that just sucks all the kavanah out of it -- they're performing, not leading prayers, and it shows. Also, they are not necessarily Jewish, so are not halachically qualified to lead prayers. Not my cup of tea. So fine, those of us who want a more spiritually engaging and authentic service can go to the early one, right?

Problem: on Yom Kippur we have stuff scheduled all day, so once you get there you don't need to leave until the end, which is great for letting us focus. But if you go to the early service you're left with a long stretch of time during which there's nothing to do (except go to the late service). The people who want to stay all day are, overwhelmingly, the people who Do Not Want the late service's style, but the Powers That Be refused to swap the services on Yom Kippur. They refused to even take turns, alternating year to year. I was on the verge of invoking reciprocity and finding some other synagogue to go to on Yom Kippur morning. It was bad.

So, three years ago when this came to a head, we created the "ruach" service, a minyan-style service concurrent with the late service, up in the chapel, with the kavanah that this small-but-dedicated group wants. My rabbi led this up until the torah service, at which point everybody goes to the sanctuary to be together for torah, the sermon, and what follows. It's a good solution.

Last year we added this for Rosh Hashana too. During that service, the timing got a bit off so my rabbi had to leave, and I concluded that part of the service on the fly, out of an unfamiliar prayerbook. But hey, I did it! For Yom Kippur he was able to stay for the whole thing, so that didn't repeat.

So that brings us to this year. Apparently my rabbi got a fair bit of flack for not being in the sanctuary for the entire service (we have another rabbi, and a cantorial soloist, by the way), so he said he would not be able to lead the "ruach" services and asked me to do it. (Frankly, I believe I'm the only layperson in the congregation with all of the skills needed to do so.) I consider this a great honor, and my rabbi prominently honored me on Rosh Hashana during the torah service, so that's nice. (Funny story there, actually -- below the line.)

We are using the draft of the new machzor (about which I wrote previously). Rosh Hashana went pretty well aside from timing; my timing was spot-on for the target they had given me, but the folks in the sanctuary were moving more quickly so we had to hurry at the end. It appears that we will also be short on time for Yom Kippur, so I've done my best to make it fit and trim optional parts. I've practiced all the unfamiliar parts for Yom Kippur, as I did for Rosh Hashana last week, and I think I'm ready.

And for next year, I'm going to ask for an earlier start. This service starts at the same time as the sanctuary service because that was the earliest the rabbi could participate (rightly needing a break after the first service), but if we can't have the rabbi anyway, why not start half an hour earlier?

(In case you're wondering how two services can start at the same time and yet the other gets ahead of ours -- it's because the sanctuary service, using Gates of Repentance, skips all sorts of stuff that ought to be in there, while this service (and the minyan out of which it grew) strives for something more authentic.)

Here's the funny story: in recognition of my work with that service, my rabbi invited me to dress the torah (g'lilah) after it was read. There is another honor at that point, hgabahah, lifting the torah and turning around so everybody can see the text. This requires some coordination as you're holding the scroll overhead, from the bottom. The scroll we were using is also on the heavy side. But hey, I'm g'lilah; if the other person can handle that, the weight needn't concern me, right? The person who does the lifting then holds the scroll until it's time to return it to the ark.

So the other person was our associate rabbi. And he was helping to lead the part of the service right after this, so he couldn't hold it. So that meant me. That's still ok; just sitting there holding a heavy scroll isn't hard. Managing the prayerbook one-handed was a bit challenging, but I had that under control.

So, on Rosh Hashana we do the shofar service during the torah service (after the haftarah, for those who are curious). The shofar service is broken into three sections: a set of prayers and readings, then you stand for the shofar blasts, and then you sing s short song that's at a completely different place in this particular prayerbook. Then you sit down and iterate.

So as it turned out, I wasn't just holding the scroll in my lap. I got a bit of a workout! :-)

Also, did not prostrate during the Great Aleinu that fell during this time...