Posts by this author

Jan 9, 2008
Post comments count0
Post likes count0

The impact of hardworking employees on their less diligent colleagues

Slate investigates the question "Do hardworking employees make their slacker colleagues more productive?" Tim Harford cites the study Peers at Work by Alexandre Mas and Enrico Moretti which used a grocery store check-out line as its laboratory, and the results are illuminating. (It may be hard to find, but the key paragraph is in the middle of p...

Non-Computer
Jan 9, 2008
Post comments count0
Post likes count0

Jag är inte heller en Microsoft-talesman på svenska

The Swedes haven't quite figured out that my blog entries do not constitute the official position of Microsoft Corporation. I like how they don't even mention my name anywhere. They just say "Microsoft doesn't this" and "Microsoft doesn't that". If you go back to the article they used as a source, you'll see that I provided a variety of reasons f...

Other
Jan 8, 2008
Post comments count0
Post likes count0

Generating initials from a name is trickier than you think

Even though I'm signed in, the page claims that anonymous comments are not allowed, so I'm reduced to posting my comment here and generating a trackback. Some time ago, Robert McLaws wrote a function that generates initials from a name. Let's set aside completely the issue of non-U.S. names; the function doesn't even handle U.S. names correctly. ...

Code
Jan 8, 2008
Post comments count0
Post likes count0

Taxes: Files larger than 4GB

Nowadays, a hard drive less than 20 gigabytes is laughably small, but it used to be that the capacity of a hard drive was measured in megabytes, not gigabytes. Today, video files and databases can run to multiple gigabytes in size, and your programs need be prepared for them. This means that you need to use 64-bit file offsets such as those used b...

Code
Jan 7, 2008
Post comments count0
Post likes count0

Bait and switch literally applied to fish

The Saint Petersburg Times purchased fish from several local restaurants and found that nearly half of the time, the fish they got wasn't what they ordered. A state DNA lab came to the same conclusion.

Non-Computer
Jan 7, 2008
Post comments count0
Post likes count0

Clean-up functions can't fail because, well, how do you clean up from a failed clean-up?

Commenter Matt asks how you're supposed to handle failures in functions like or . Obviously, you can't. If a clean-up function fails, there's not much you can do because, well, how do you clean up from a failed clean-up? These clean-up functions fall into the category of "Must not fail for reasons beyond the program's control." If a program trie...

Code
Jan 4, 2008
Post comments count0
Post likes count0

What does it mean when a display change is temporary?

When you call the function, you can pass the flag to indicate that the change is temporary. But if you don't also save the changes in the registry, how can they be permanent? What does temporary mean? A temporary display change is one that your program has entered because it has gone into a fullscreen mode, a change which it will undo when it re...

Code
Jan 3, 2008
Post comments count0
Post likes count0

In steady state, only geeks install Windows, but the hard part is getting to that steady state

Commenter BryanK notes that only already-technical people (re)install Windows; commenter Stu estimates the percentage at 99%. That may be true in the steady state, but the hard part is getting to that steady state. When a new version of Windows is released, the steady state is disrupted. At that point, most people installing Windows aren't techn...

Other
Jan 2, 2008
Post comments count0
Post likes count0

A new DUI record set in the state of Washington

In case you missed it, a former Seattle police detective was arrested in early 2007 for driving with a state record high blood-alcohol level of 0.47 percent. (The legal limit is 0.08 percent, most people black out at 0.35 percent, and 0.40 percent is lethal for 50% of adults.) She was subsequently arrested and held on $250,000 bail (story contai...

Non-Computer
Jan 2, 2008
Post comments count0
Post likes count0

You know the answer: Window destruction

The following request for assistance came in from a customer, and given what you know about window destruction, you should eventually be able to figure it out yourself once all the pieces are in place, though it takes some time for all the clues to be revealed. We are hitting this exception in our program. This is urgent; please give it priorit...

Code