(no subject)
Mar. 25th, 2003 12:44 amWell, I took some pictures of the cherry tree blooming out front, and had fun with Photoshop.
flowers crop median min crop
spray sky rot crop dodge sharpen
I really don't know what I'm going to do for a job. Trying to persuade people that they don't really need me to have five years of full-lifecycle industry experience doesn't seem to be working.
I spent my whole coding day tracking down a timing problem that turned out to stem from a boneheaded error in doing arithmetic. Here's a quiz for your job applicants: given two pairs of uint32 values, (start_hi, start_lo) and (stop_hi, stop_lo), compute the 64-bit difference (stop - start).
Possible answer #1: something like
diff_lo = stop_lo - start_lo; // wraparound still gives correct lo.
diff_hi = stop_hi - start_hi;
diff = (((uint64) diff_hi) << 32) | diff_lo;
Diagnosis: too dumb.
Possible answer #2: something like
diff_lo = stop_lo - start_lo; // wraparound still gives correct lo.
diff_hi = stop_hi - start_hi - !!(start_lo > stop_lo); // borrow?
diff = (((uint64) diff_hi) << 32) | diff_lo;
Diagnosis: too damn clever.
Possible answer #3: something like
start = (((uint64) start_hi) << 32) | start_lo;
stop = (((uint64) stop_hi) << 32) | stop_lo;
diff = stop - start;
Diagnosis: might be okay.
But we had very good sushi at Ototo. (For better or for worse, they were out of this intriguing-sounding green tea tiramisu.)
flowers crop median min crop
spray sky rot crop dodge sharpen
I really don't know what I'm going to do for a job. Trying to persuade people that they don't really need me to have five years of full-lifecycle industry experience doesn't seem to be working.
I spent my whole coding day tracking down a timing problem that turned out to stem from a boneheaded error in doing arithmetic. Here's a quiz for your job applicants: given two pairs of uint32 values, (start_hi, start_lo) and (stop_hi, stop_lo), compute the 64-bit difference (stop - start).
Possible answer #1: something like
diff_lo = stop_lo - start_lo; // wraparound still gives correct lo.
diff_hi = stop_hi - start_hi;
diff = (((uint64) diff_hi) << 32) | diff_lo;
Diagnosis: too dumb.
Possible answer #2: something like
diff_lo = stop_lo - start_lo; // wraparound still gives correct lo.
diff_hi = stop_hi - start_hi - !!(start_lo > stop_lo); // borrow?
diff = (((uint64) diff_hi) << 32) | diff_lo;
Diagnosis: too damn clever.
Possible answer #3: something like
start = (((uint64) start_hi) << 32) | start_lo;
stop = (((uint64) stop_hi) << 32) | stop_lo;
diff = stop - start;
Diagnosis: might be okay.
But we had very good sushi at Ototo. (For better or for worse, they were out of this intriguing-sounding green tea tiramisu.)
no subject
Date: 2003-03-25 06:06 am (UTC)no subject
Date: 2003-03-25 12:15 pm (UTC)