Phil Dreizen

return

It sure is quiet around here! I pledge to return to getting at least 1 thing posted here a week. And this post doesn't count -- it's just practice.

tags: kupad.net
qotd

"There are physicists," Lauger explained, "who claim to understand this the same way they understand what stones and cupboards are. What they understand, in fact, is only that a theory agrees with the experimental results, with measurements. Physics, my friend, is a narrow path drawn across a gulf that the human imagination cannot grasp. It is a set of answers to certain questions we put to the world, and the world supplies the answers on the condition that we will not then ask it other questions, questions shouted by common sense. And common sense? It is that which is understood by an intelligence using senses no different from those of a baboon. Such an intelligence wishes to know the world in terms that apply to its terrestrial, biological niche. But the world - outside that niche, that incubator of sapient apes - has properties that one cannot take in hand, see, sniff, gnaw, listen to, and in this way appropriate."

--Lauger, Fiasco by Stanislaw Lem

some very clever code to print an integer

While reading Microprocessors: A Programmers View, a very old book on different computer architectures, I came across this really clever bit of code for printing out an integer to ascii:

void itoa(unsigned int i){
    if(i >= 10) itoa(i/10);
    putchar('0' + i%10);
}

(I modified the name of the function, and the style of the parameters)

It's just a really nice example of recursion. (Of course, it appeared in an example about how SPARC's "register window" method of doing procedure calls would potentially perform poorly in code like this (this was in 1990)).

lotd - The National: Rains of Castamere

The National: Rains of Castamere

http://youtu.be/HilAVhm3BqI

This version played at the end of episode "Blackwater", but is fitting now, for the most recent episode of Game of Thrones, which has the same name as the song.

The Rains of Castamere (song)

kindness in NYC

I was on the subway yesterday. A woman and her daughter left a backpack at their seat as they were exiting the train, and a guy sitting across from them rushed to get the bag, ran to the doors, got the woman's attention and handed her the bag. But once she expressed gratitude for it, the guy simply gave her a curt head nod, and sat down and seemed to avoid making eye contact with her. She really wanted him to acknowledge that she was grateful for getting the bag back to her, and as the subway pulled away from the station, she waved at the guy, who responded with a weak lifting of his arm - vaguely acknowledging her while seeming to brush her off. He never smiled at her. He never said "no problem." Was he annoyed that he "had" to help her, and resented her for it? I don't know (but I don't think that's it either).

I see this kind of behavior in New York fairly often. It's an odd mix of rudeness and extreme helpfulness. I see gruff New Yorker's volunteering to give stranger's directions all the time. Sometimes, I'm that way myself. New Yorker's have a reputation for being rude, and perhaps that's accurate, but I don't think it should be confused for a lack of helpfulness or kindness.

But I am curious. Why the hell are people in New York like this?