• The Old New Thing

    Some holiday fun: Puzzle #3

    • 3 Comments

    (Note: Read the puzzles in order from 1 to 6 for them to make sense.)

    This was by far the hardest puzzle to make. It's also going to be the hardest to solve because a lot of the clues were originally inside jokes, and rewriting them for a general audience makes the answers much less obvious.

    Hint: Quotation is by Nancy Pearl.

    1H
    2S
    3B
    4P
    5I
    6F
    7K
    8V
    9A
    10I
    11V
    12O
    13J
    14E
    15K
    16C
    17I
    18A
    19R
    20T
    21W
    22F
    23C
    24V
    25L
    26I
    27Q
    28K
    29G
    30X
    31A
    32C
    33F
    34Q
    35Y
    36T
    37M
    38K
    39M
    40E
    41P
    42D
    43K
    44V
    45H
    46Q
    47C
    48G
    49R
    50V
    51B
    52E
    .
    53F
    54M
    55G
    56B
    57V
    58C
    59T
    60V
    61O
    62W
    63X
    64D
    65C
    66V
    67X
    68H
    ,
    69E
    70O
    71R
    72V
    73C
    74X
    75V
    76I
    77L
    78U
    79A
    80I
    81C
    82E
    83O
    84V
    85L
    86C
    87Y
    88S
    89K
    90U
    91C
    92Y
    93W
    94I
    95E
    96T
    97T
    98E
    99V
    100I
    101Q
    102F
    103N
    104J
    105V
    106B
    .
    107N
    108P
    109S
    110G
    111B
    112H
    113N
    114O
    115V
    116F
    117C
    118T
    119D
    120U
    121C
    122K
    123V
    124L
    125F
    126D
    127D
    128W
    129Y
    130X
    131U
    132I
    133F
    134W
    135V
    136Y
    137S
    138N
    139K
    140D
    141C
    142G
    143S
    144B
    145U
    146A
    147Q
    148D
    149M
    150C
    151B
    152V
    153S
    154C
    155O
    156W
    157Q
    158F
    159V
    160P
    .
    161P
    162C
    163I
    164O
    165C
    166K
    167A
    168C
    169Q
    170V
    171P
    172H
    173T
    174J
    175V
    176S
    177V
    178Y
    179Q
    180U
    181J
    182T
    183K
    184G
    185S
    186I
    187C
    188R
    189D
    190L
    191A
    192E
    193F
    194J
    195X
    196Y
    197C
    198A
    199Q
    200E
    .

    A.To lose weight, gain weight, lose weight, gain weight, etc.
      -       
    18191 931 14619879167
    B.If you don’t return your book to the library on time, it is...
           
    56314415110651111
    C.Where you’re headed in August (with "The")
              
    3212116547154581171628673
               
    16816 91141197187811506523
    D.Battled again.
            
    1261486412714018911942
    E.It may be filled with melted cheese or melted chocolate. But not both at the same time.
              
    14959882192200 524069
    F.Unable to choose between two options.
              
    5310219322331161331586125
    G.It leaves Seattle at midnight and lands in Chicago at 6am.
       -   
    110184142 295548
    H.Like corn flakes left in milk too long.
         
    11217214568
    I.Restaurant in Woodinville that requires a contract if you have nine people.
            
    171005 1861329410
        
    268076163
    J.Bird that will visit Britney in a few months.
         
    18117419410413
    K.A guided tour down the Amazon, or a whale-watching trip, for example.
       -       
    789139 38431222815166183
    L.A community of monks or nuns, or the church they belong to.
         
    771248525190
    M.A petty quarrel.
        
    393754149
    N.Dull impact sound.
        
    107138113103
    O.Oversized living for your living room, available at Redmond Town Center.
           
    11412611648370155
    P.The last grade before high school.
          
    441160171161108
    Q.You can borrow it from the library and are encouraged to use it in the car while driving.
         -    
    1791011574627 14734169199
    R.Color traditionally associated with girls.
        
    194918871
    S.Restaurant in Wallingford with a spacey name (with "The").
            
    881371851091431762153
    T.You don't usually get to choose your first college one.
            
    1739718236962011859
    U.The runner was ______ out between second and third.
          
    9014513178120180
    V.It starts at the corner of Bellevue and Bellevue and goes downtown every half hour.
             
    1231521154460 2484170
         
    8117517572
            
    66135571775099105159
    W.A representation of a person, usually hanged or burned to demonstrate hatred.
          
    629312815621134
    X.Joe Beda suggested I should become one.
          
    19574671306330
    Y.Gerard Schwartz’s instrument.
           
    196871363512917892

    Answers to all puzzles will be posted tomorrow. Please do not post spoilers.

    Onward to Puzzle #4.

  • The Old New Thing

    Some holiday fun: Puzzle #2

    • 1 Comments

    (Note: Read the puzzles in order from 1 to 6 for them to make sense.)

    Upon arrival at the first puzzle location, she was handed the second puzzle:

    "Opghg'i xk ialp opfxw zi
    z ioaufy jagiofkx."
    Wk ok opg fxqkhvzofkx ygib
    fx Lgxogh Pkaig zxy zib fq
    opge pzmg zxe oflbgoi
    zmzfnzdng qkh opg Vzhfxghi
    wzvg.
    

    The following clues are not necessary for solving the puzzle, but are provided in case you get stuck.

    _ _ _ _ _ What Gérard Depardieu might bid
    _ _ _ _ _ It babbles
    _ _ _ _ _ Hip hop artist LL (2 words)
    _ _ _ _ _ Nerd
    _ _ _ _ _ College application requirement
    _ _ _ _ _ Mushrooms, for example
    _ _ _ _ _ Mystery, for example
    _ _ _ _ _ Yellow bile is one
    _ _ _ _ _ One of the bones of the inner ear
    _ _ _ _ _ Denzel Washington movie 2002 (2 words)
    _ _ _ _ _ Humming instrument
    _ _ _ _ _ Expressing deep emotion
    _ _ _ _ _ "I want __ ___." (2 words)
    _ _ _ _ _ A Russian one will be long
    _ _ _ _ _ Hardly concealed
    _ _ _ _ _ To cook in near-boiling water
    _ _ _ _ _ To drink heartily
    _ _ _ _ _ Famous Swiss watchmaker
    _ _ _ _ _ It met Apollo in the 1970's
    _ _ _ _ _ Author of "One L"
    _ _ _ _ _ To seize control by force
    _ _ _ _ _ It's poisonous
    _ _ _ _ _ It's not right
    _ _ _ _ _ Atomic number 54
    _ _ _ _ _ You do it at a triangle
    _ _ _ _ _ Striped animal

    Answers to all puzzles will be posted tomorrow. Please do not post spoilers.

    Onward to Puzzle #3.

  • The Old New Thing

    Some holiday fun: Puzzle #1

    • 1 Comments

    Today is a holiday in the United States, so I thought I'd go entirely non-technical. But that doesn't mean you get to rest your brain.

    One of my friends was accepted to the Graduate School of Library and Information Science at the University of Illinois at Urbana-Champaign. We are of course very happy for her, but also sad that she will be leaving us. As part of her going-away festivities, we sent her on a one-team Puzzle Hunt because she's a puzzle fan and regretted missing out on the most recent Hunt. Our puzzles took her to various landmarks in the Seattle area, culminating at the location of the big party. At each landmark, a different group of her friends was be there to greet her, socialize, and give her the next puzzle.

    There were six puzzles in all. I have made some adjustments to the puzzles to remove the "inside jokes"; otherwise you wouldn't stand a chance! Knowledge of Seattle is still important, though.

    No reference materials allowed. All you have is a pencil and your brain.

    The first puzzle is a simple grid of letters.

    ISPRINGSSU
    JEFFERSONA
    QMARIONIUA
    AAAHYEVMAI
    CJRSSEUAPB
    EPLYREHDAM
    NIRSCNOINU
    EKIPOINSDL
    STITIPOONO
    YRREHCENRC

    Answers to all puzzles will be posted tomorrow. Please do not post spoilers.

    Onward to Puzzle #2.

  • The Old New Thing

    I hope you weren't using those undocumented critical section fields

    • 25 Comments

    I hope you weren't using those undocumented critical section fields, because in Windows Server 2003 Service Pack 1, they've changed.

    Mike Dodd tells an interesting story of a vendor who used reserved fields and then complained when the system started using them!

  • The Old New Thing

    What's the difference between My Documents and Application Data?

    • 21 Comments

    The most important difference between My Documents and Application Data is that My Documents is where users store their files, whereas Application Data is where programs store their files.

    In other words, if you put something in CSIDL_MYDOCUMENTS (My Documents), you should expect the user to be renaming it, moving it, deleting it, emailing it to their friends, all the sorts of things users do with their files. Therefore, files that go there should be things that users will recognize as "their stuff". Documents they've created, music they've downloaded, that sort of thing.

    On the other hand, if you put something in CSIDL_APPDATA, (Application Data), the user is less likely to be messing with it. This is where you put your program's supporting data that isn't really something you want the user messing with, but which should still be associated with the user. High score tables, program settings, customizations, spell check exceptions...

    There is another directory called CSIDL_LOCAL_APPDATA (Local Settings\Application Data) which acts like CSIDL_APPDATA, except that it does not get copied if the user profile roams. (The "Local Settings" branch is not copied as part of the roaming user profile.) Think of it as a per-user-per-machine storage location. Caches and similar non-essential data should be kept here, especially if they are large. Other examples of non-roaming per-user data are your %TEMP% and Temporary Internet Files directories.

  • The Old New Thing

    Beware of roaming user profiles

    • 38 Comments

    One of the less-known features of Windows is the roaming user profile. I know that this is not well-known because I often see suggestions that fail to take the roaming user profile scenario into account. Indeed, if your program behaves badly enough, you can cause data loss. (More on this later.)

    What is a roaming user profile?

    Well, your user profile is the collection of things that reside under your %USERPROFILE% directory. (This is not quite true, but it's a good enough approximation for the purpose of this discussion. An important exception will be noted next time.) Your per-user registry is kept in %USERPROFILE%\ntuser.dat, so your per-user registry is part of your user profile.

    In highly managed environments (corporations), system administrators can set up user profiles on a centralized server, so that users log onto any machine and have available their files and settings. This is accomplished by copying the user profile from the server when the user logs on and copying it back to the server when the user logs off. (Of course, there is also caching involved to save time if the user logs back onto the same machine.)

    What does this mean for you, the programmer?

    For one thing, it means that the path to the user's profile can change from one logon session to the next. If the user runs your program from Computer A, their user profile directory might be C:\Documents and Settings\Fred, but when they log off from Computer A and log on to Computer B, the directory to their user profile might change to C:\WINNT\Profiles\Fred. In particular, that file that used to be at C:\Documents and Settings\Fred\My Documents\Proposal.txt has moved to C:\WINNT\Profiles\Fred\My Documents\Proposal.txt. If your program has a feature where it offers a list of recently-used files (or auto-opens the most recently used file), you may find that the file no longer exists at its old location. The solution is to use profile-relative paths, or even better, shell virtual folder-relative paths (e.g., recording the path relative to CSIDL_MYDOCUMENTS), so that when the profile roams to a machine with a different user profile path, your program can still find its files.

    For another thing, you cannot just cruise through the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList registry key expecting to find all the user profiles and possibly even modify them, because the copy of the user profile on the local computer might not be the authoritative one. If the profile is a cached roaming profile, then any changes you make will either (1) be lost when the user roams back to the computer after using another computer, or (2) cause the local profile to be considered newer than the master copy on the server, causing the changes the user made to the copy on the server to be lost! (Which of the two bad scenarios you find yourself in depends on the time you change the cached profile and the time the target user logs off that other computer.)

    Another consequence of roaming user profiles is that your program can effectively see itself changing versions constantly. If Computer A has version 1.0 of your program and Computer B has version 2.0, then as the profile roams between the two computers, both versions 1.0 and 2.0 will be operating on the user profile in turn. If versions 1.0 and 2.0 use the same registry keys to record their settings, then your registry formats had better be both upward- and downward-compatible. This is a particularly painful requirement for operating system components, which consequently need to maintain bidirectional registry format compatibility with systems as old as Windows NT 4. (Windows NT 3.51 had a different model for roaming user profiles.)

    Yet another consequence of roaming user profiles applies to services. Prior to Windows XP, if a service holds a registry key open after the user logged off, then the registry hive cannot be unloaded and consequently (1) consumes memory for that profile even though the user is no longer logged on, and (2) prevents the user's local registry changes from being copied back to the server. This "hive leakage" problem was so rampant that in Windows XP, the profile unload code takes a more aggressive stance against services that hold keys open too long. You can read more about the changes to registry hive roaming in the Resource Kit article linked at the top of this entry.

  • The Old New Thing

    A simple story in pictures

    • 6 Comments

    Professionals at work is the title of this series of unattributed pictures. (Via memepool Nov 26, 2004.) I think they speak for themselves.

    (I apologize in advance for the lowbrow advertisements on the page.)

  • The Old New Thing

    Why isn't Windows Setup just a disk reimage plus a registry dump?

    • 21 Comments

    Why can't all the registry key needed by Windows Setup be precomputed and splorted at one go? One reason is that Windows Setup can be customized via a so-called "unattend file", which means that a lot of the work cannot be precalculated. Some settings also have cascade effects on other settings.

    Also, the model for component registration is to make each component responsible for its own registration, which can in turn be context-sensitive: "If the system has configuration x, then do y else z". Internet Explorer's component registration for example contains many conditional sections based on the installation configuration specified in the unattend file and the even fancier Winbom.ini file used by Sysprep-based deployment (which is used by computer manufacturers and large corporations).

    Making each component responsible for its own registration reduces entanglements between components but also means that "global optimizations" such as precalculating the registry cannot be done. Engineering is about tradeoffs and this is one of them: Maintainability vs. speed.

    (Of course, there are sections of the registry that are not context-sensitive, and those to some degree have already been gathered together for block copying onto the machine during Windows Setup. Look at the HIVExxx.INF files on your Windows XP CD.)

    That said, it appears that Longhorn setup is moving towards the "disk image" model. I wish them luck.

  • The Old New Thing

    Drink at work: The blog of a cartoonist

    • 10 Comments

    Francesco ("Ces") Marciuliano is the author of the comic strip Sally Forth. In his blog, Drink at Work he expounds on whatever tickles his fancy. (Warning: Includes strong language, adult situations, and political views.) Sure, the stories on writing a cartoon are fun, especially when he responds to feedback from readers, and he also has a long series of articles titled Comic Strip Writing 101 (example: Comic Strip Writing 101: It's Not All Pabst and Vicodin), but that's not the best part. No, the best part is the conversations with his father. Here's an except from Conversation number two:

    Dad: Marciulianos live much longer than average folks! Look at your Grandpa! He would still be alive today if he hadn't died in that hospital.

    Ces: What?

    Dad: Y'know, from that spill he took...when he had to go to the hospital. I bet if he didn't fall he would still be around today.

    Ces: At age 102?

    Dad: See? That's what I'm talking about. Marciulianos live a long time.

  • The Old New Thing

    Why do Microsoft code samples tend to use ZeroMemory instead of { 0 }?

    • 24 Comments

    If you go browsing around MSDN, you'll find that code samples tend to call ZeroMemory explicitly rather than using "= { 0 }" notation. Why is that?

    To make it clearer for people who are used to other programming languages.

    Like it or not, a significant percentage of people who write programs for Windows do it in languages other than C and C++. Although those developers may have a basic understanding of C and C++, they don't have all the language subtleties memorized.

    Compare the situation of speaking in English to a group of people where not everyone speaks the language fluently. If you're considerate of your audience, you're going to avoid the more esoteric grammatical constructions, the rare words, and the obscure idioms. Instead of saying, "Were it to rain, we will see that umbrellas be available," you would use the simpler "If it rains, then we will make sure that umbrellas are available," thereby avoiding the grammatical complexity of the implied conditional by inversion ("if"), the subjunctive of condition ("were"), the implied conclusion ("then"), and the subjunction of intention ("be").

    Heck, even people who claim to know C and C++ don't have all the language subtleties memorized. Some of them have false impressions of what " = { 0 }" does. And who among us really has C/C++'s bizarre operator precedence rules committed to memory?

    Consequently, MSDN samples tend to use ZeroMemory to make it blindingly obvious what is being set to zero. One of the things we've learned over the years is that many people just copy/paste sample code without understanding it. If there are little things like ZeroMemory that can be done to make the intent of sample code clearer and reduce translation errors, then that's a good thing.

    If you prefer " = { 0 }", then go ahead and use it, secure in the knowledge that thousands of programmers aren't going to read your code and try to translate it into Visual Basic because that's the only language they know. But MSDN doesn't have that luxury.

Page 355 of 434 (4,335 items) «353354355356357»