Showing results for September 2014 - Page 2 of 3 - The Old New Thing

Sep 17, 2014
0
0

Poor man's comments: Inserting text that has no effect into a configuration file

Raymond Chen
Raymond Chen

Consider a program which has a configuration file, but the configuration file format does not have provisions for comments. Maybe the program has a "list of authorized users", where each line takes the form or , where is a group or user. For example, suppose we have that goes like this: This is the sort of file that can really use comments b...

Other
Sep 16, 2014
0
0

Microspeak: spend

Raymond Chen
Raymond Chen

Remember, Microspeak is not merely for jargon exclusive to Microsoft, but it's jargon you need to know. We don't encounter the term spend much in the engineering side of the company, but it's in common use among those who regularly deal with money and budgets. We are in line with company standards with regard to spend for this type of event. Q4...

Non-Computer
Sep 15, 2014
0
0

Enumerating all the ways of making change

Raymond Chen
Raymond Chen

Today's Little Program enumerates all the ways of making change for a particular amount given a set of available denominations. The algorithm is straightforward. To make change for a specific amount from a set of available denominations, you can take one denomination and decide how many of those you want to use. Then use the remaining denominati...

Code
Sep 11, 2014
0
0

The history of Win32 critical sections so far

Raymond Chen
Raymond Chen

The structure has gone through a lot of changes since its introduction back oh so many decades ago. The amazing thing is that as long as you stick to the documented API, your code is completely unaffected. Initially, the critical section object had an owner field to keep track of which thread entered the critical section, if any. It also had a ...

History
Sep 8, 2014
0
0

The wisdom of seventh graders: The emergency survival kit

Raymond Chen
Raymond Chen

As a precursor to reading a story about survival, seventh grade students were asked to come up with a list of things they would want to have in their emergency survival kit. Students were specifically instructed to limit themselves to things that were readily available (so no Apache helicopters), and the complete kit had to be something you could ...

Non-ComputerThe wisdom of seventh graders
Sep 8, 2014
0
0

Piping to notepad

Raymond Chen
Raymond Chen

In honor of NotepadConf's new KickStarter video, today's Little Program takes its stdin and puts it in a Notepad window. The comments pretty much lay out the steps. The part that may not be obvious is the part that deals with UI Automation: We take the main Notepad window, then ask UI Automation to find Document element inside it. From that ...

Code