On Hypertext and Hypotext
intercoolerjs.org6 pointsby sampsonetics1 comments
void read_status_line(char *line) {
char c;
while (c != '\n') {
c = read_next_byte();
*(line++) = c;
}
}
Obviously this is wrong because it's checking c before reading it! But why the 10 modulo 256 condition? Of course, the ASCII code for newline is 10. Duh. So there must have been an earlier call stack where some other function had a local variable storing the length of the request, and this function's c variable landed smack-dab on the least-significant byte of that earlier value. Arrrrgh!
"There are solutions, says Cornell's Hedge. The trend toward open offices and hard office furniture makes noise distraction worse, so adding carpet, drapes and upholstery can help. He recommends, perhaps counterintuitively, getting rid of cubicle walls, which provide the illusion of sound privacy, but actually make people less aware of the noises they create."