• The Old New Thing

    Sorry, no free ice cream in Tennessee; it's illegal

    • 6 Comments
    It seems that giving away ice cream has been illegal in Tennessee since 1957, when state legislators were trying to combat alleged unfair trade practices by the dairy industry.

    Upon its being alerted to the existence of this law, the state Senate and House unanimously passed a bill to repeal the law, sending it to the governor for signature.

    Aha, but it's not as simple as you think.

    The bill as written would have eliminated an entire section of state law covering unfair trade practices and frozen desserts.

    The bill was withdrawn after some lawmakers got calls from dairy company officials who feared the bill was too broad.

    It is unclear whether an amended bill will pass in time for Baskin-Robbins' free cone day, planned for April 28.

    (Links courtesy of Fark. It's not news. It's Fark.)

  • The Old New Thing

    Why can't I install Windows on my USB drive?

    • 35 Comments

    A collection of limitations (both hardware and software) currently prevent Windows from booting and running off a USB drive. Some of them are described in this whitepaper from WinHEC 2003. Another reason not mentioned in this paper is that during any hot-plug operation, the USB bus is completely reinitialized. Windows really doesn't like it when it loses access to its boot device. Imagine, you plug in a USB camera, the USB bus reinitializes, Windows loses access to the boot drive, and *oops* the kernel needs to page in some data and it can't.

    Rats.

    But who knows, someday maybe it will work.

  • The Old New Thing

    Astonishingly, rules apply to everyone.

    • 48 Comments

    Spain's Crown Prince and his fiancée are outraged that they had to go through airport security in Miami.

    "The prince and his bodyguard felt they should not be subjected to the screening, but if they do not have an escort from the State Department or the Secret Service, it is required," she added. "It is the law."

    Apparently, the Prince did not give the standard 72 hours' notice to obtain pre-clearance. (Hm, I wonder if I can get pre-clearance by submitting my itinerary 72 hours in advance.)

    What bugs me even more is that the officials in Miami are all apologetic!

    Miami-Dade County Mayor Alex Penelas sent the royal family a letter of apology on the same day, calling the situation "lamentable".

    Reminds me of an article in the New York Times Magazine a few years ago titled Life is a Contact Sport [fee required], describing a mandatory meeting for all NFL rookies to introduce them to the "real world". My favorite part was this:

    Kendrell Bell, a Pittsburgh Steelers linebacker, tells of his great awakening to the verities of income tax: "I got a million-dollar signing bonus. But then I got the check, and it was only $624,000. I thought, Oh, well, I'll get the other half later. Then I found out that's all there was. I thought, They can't do this to me. Then I got on the Internet and I found out they can."

    Shocking! Football players have to pay income tax! Where will the injustice end?

    Happy Tax Day (US).

  • The Old New Thing

    Not all short filenames contain a tilde

    • 50 Comments

    I'm sure everybody has seen the autogenerated short names for long file names. For the long name "Long name for file.txt", you might get "LONGNA~1.TXT" or possibly "LO18C9~1.TXT" if there are a lot of collisions.

    What you may not know is that sometimes there is no tilde at all!

    Each filesystem decides how it wants to implement short filenames. Windows 95 uses the "~n" method exclusively. Windows NT adds the hexadecimal hash overflow technique. But some filesystems (like Novell) just truncate the name. "Long name for file.txt" on a Novell server will come out to just "LONGNAME.TXT".

    So don't assume that all short names contain tildes. They don't. This means no cheating on skipping a call to GetLongFileName if you don't see any tildes, since your optimization is invalid on Novell networks.

  • The Old New Thing

    Playing on an entirely different level

    • 11 Comments

    Competitive Scrabble® is another game entirely. For example, here's a game from the 2001 World Championship. You can follow it move-by-move, or you can read the game commentary.

    The name "Stefan" you see in the commentary is Wall Street Journal reporter Stefan Fatsis, author of Word Freak: Heartbreak, Triumph, Genius and Obsession in the World of Competitive Scrabble Players, a book that is on my list of "books I really want to read".

  • The Old New Thing

    First thing we do is kill all the jerks

    • 38 Comments

    There a fascinating article in today's New York Times on a troop of baboons which went pacifist:

    ... researchers describe the drastic temperamental and tonal shift that occurred in a troop of 62 baboons when its most belligerent members vanished from the scene. The victims were all dominant adult males that had been strong and snarly enough to fight with a neighboring baboon troop over the spoils at a tourist lodge garbage dump, and were exposed there to meat tainted with bovine tuberculosis, which soon killed them. Left behind... were the 50 percent of males that had been too subordinate to try dump brawling, as well as all the females and their young. With that change in demographics came a cultural swing toward pacifism, a relaxing of the usually parlous baboon hierarchy, and a willingness to use affection and mutual grooming rather than threats, swipes and bites to foster a patriotic spirit.

    It has been twenty years since this cataclysmic event and the amicable atmosphere persists even though none of the original male survivors is still around.

    "We don't yet understand the mechanism of transmittal... but the jerky new guys are obviously learning, ‘We don't do things like that around here.’"

    Of course, baboons will be baboons.

    The new-fashioned Forest Troop is no United Nations, or even the average frat house. Its citizens remain highly aggressive and argumentative, and the males still obsess over hierarchy. "We're talking about baboons here," said Dr. Sapolsky.

    Sounds a lot like the real United Nations to me.

  • The Old New Thing

    Unicode collation is hard

    • 8 Comments

    The principle of "garbage in, garbage out" applies to Unicode collation. If you hand it a meaningless string and ask to compare it to another meaningless string, you get meaningless results.

    I am not a Unicode expert; I just play one on the web. A real Unicode expert is Michael Kaplan, whose explanation of how comparing invalid Unicode strings result in nonsensical results I strongly recommend to those who attempt to generate random test strings in Unicode.

  • The Old New Thing

    The random number seed can be the weakest link

    • 19 Comments

    Random number generation is hard. That's why you should leave it to the experts.

    But even if you choose a good random number generator, you still have to seed it properly. The best random number generator in the world isn't very useful if people can guess the seed. That's why seeding the random number generator with the current time is not very secure; it's not hard to guess the current time!

    So it's important to throw something unguessable into the seed. As the above paper notes, just the time and process id are not good enough.

    So what should you do? Don't ask me; I'm not a cryptography expert. Here are some suggestions from other people. Maybe some of them are good, maybe not.

  • The Old New Thing

    Extraterrestrial income

    • 2 Comments

    As I was reading one of the bajillion annual reports in my mailbox, I happened across a comment regarding extraterrestrial income.

    Space aliens have to pay income tax?

    Oh, no, it was just a misread for the controversial extraterritorial income exclusion.

  • The Old New Thing

    Comparing the Norwegian, Swedish, and Danish languages.

    • 14 Comments

    As I got onto the plane for my outbound flight, I grabbed a Norwegian newspaper, having mistaken it for a Swedish paper. Fortunately, the two languages are so similar I was able to fake my way through it without too much difficulty. (And it's definitely an odd sensation reading U.S. cartoons translated into Norwegian...)

    The on-board entertainment system offered diversions in many languages. So I watched "Loony Tunes" dubbed into German (confirming that I really need to practice my German more) and then listened to some children's stories in various language. Demonstrating my astonishingly poor listening comprehension, I couldn't figure out whether the first story was in Norwegian or Swedish. Eventually I convinced myself that it was Norwegian, which was confirmed when I later heard a story in Swedish.

    Danish, on the other hand, is pretty obviously Danish.

Page 399 of 431 (4,310 items) «397398399400401»