My friend and coworker hosted a dinner at his house. I think it was partly a reunion, and partly a house warming party for this group of friends. I think it was a scheme for him to show his roommates how he was more popular than them.
I helped cook! We made chicken parmigiana which I’ve made once before with Tiff. My other duty was to open the jars of pasta sauce. Why do they make them so tight anyways? I think the last time I had to use a knife and pierce the top of the lid. I don’t know anything about biology but I’m sure there is some preservative-related reason that it has to be that tight. Or, it’s a scheme to get lonely housewives to meet their burly neighbors.
On my friend’s board was a sequence of numbers. When he’s bored, he likes to find random patterns in other patterns of numbers. He plays The Game a bit and so all this practice can’t hurt. (I hear when Donald Knuth isn’t working on TAOCP, he solves random combinatoric problems). Or, it’s a scheme confuse his roommates with his own mental musings.
The sequence on the whiteboard was the following:
1
1 1
2 1
1 1 1 2
3 1 1 2
2 1 1 2 1 3
3 1 2 2 1 3
2 1 2 2 2 3
1 1 4 2 1 3
3 1 1 2 1 3 1 4
4 1 1 2 2 3 1 4
3 1 2 2 1 3 2 4
2 1 3 2 2 3 1 4
I’ve seen the sequence before so I’d already known how it works. I think everyone else in the room did too, or they were able to piece it together from what people were saying. It’s not really a sequence because it actually terminates at 21322314. My other friend asked the natural question, what if you start with n instead of 1? He went on the prove it on the board. After dinner, we met the hosts’ roommates. Knowing that all the people over were CS majors, he immediately asked:
How many of you looked at that and thought, “I could program that!”
It’s kind of sad how quickly I jumped up to say “me!” Lately, I’ve been finding myself trying to hack together more things around me. Over the summer, I was wondering if I could find the my geographic music center. I took my last.fm logs and cross search wikipedia for band’s country of origin. It took way too much time and the answer wasn’t interesting because it depended so much on how I weighed the bands.
I think I’ve been worried that being in school will make me forget how to actually apply what I learn. Or even, while I’m in school, I’m worried about how quickly I forget things I learn. A part of me hopes that I can keep solving problems, easy or hard, that I want to solve. Or that if I write them in a new language, I can stay on the cutting edge of technology. Or, maybe it’s just scheme for me to post code on my blog.
function go(n) {
var s = '' + n;
var seen = {};
while (!seen[s]) {
console.log(s);
seen[s] = true;
var hist = [0, 0, 0, 0, 0, 0, 0, 0, 0];
for (var i = 0; i < s.length; i++) {
hist[s[i]]++;
}
s = '';
for (var i = 0; i <= 9; i++) {
if (hist[i]) {
s += hist[i] + '' + i;
}
}
}
}
For the record, the actual secret motivation behind hosting the reunion was to force myself to clean my room.