Showing tag results for Other

Mar 8, 2005
Post comments count0
Post likes count1

Keep your eye on the code page

Raymond Chen

Remember that there are typically two 8-bit code pages active, the so-called "ANSI" code page and the so-called "OEM" code page. GUI programs usually use the ANSI code page for 8-bit files (though utf-8 is becoming more popular lately), whereas console programs usually use the OEM code page. This means, for example, when you open an 8-bit text fil...

Other
Feb 11, 2005
Post comments count0
Post likes count1

Windowless controls are not magic

Raymond Chen

It seems that when people notice that the Internet Explorer rendering engine doesn't use HWNDs for screen elements, they think that Internet Explorer is somehow "cheating" and doing something "undocumented" and has an "unfair advantage". Nevermind that windowless controls have been around since 1996. They aren't magic. Mind you, they're a lot of ...

Other
Jan 26, 2005
Post comments count0
Post likes count0

The strangest way of rounding down to the nearest quarter

Raymond Chen

In a previous life, I wrote database software. A customer complained that one of their reports was taking an unacceptably long amount of time to generate, and I was asked to take a look at it even though it wasn't my account. The report was a vacation-days report, listing the number of vacation days taken and available for each employee. Vacati...

Other
Jan 24, 2005
Post comments count0
Post likes count0

Bringing cryptic command lines to Windows

Raymond Chen

The CMD.EXE batch language can be awfully cryptic, but for those who miss the richness of command lines like or bursts of line noise masquerading as a pipeline of "find", "sed", and "awk" processes, Microsoft Windows Services for Unix is available for free download.

Other
Jan 20, 2005
Post comments count0
Post likes count1

Hyperlinking to Hutchison Whampoa Limited forbidden

Raymond Chen

Maybe they don't want people to find them. The copyright notice for the web site of Hutchison Whampoa Limited states, Copyright Hutchison Whampoa Limited. 2003. All rights reserved. No person, whether an individual or a body corporate, shall create or establish a hyperlink to the HWL Corporate Website by hypertext reference or imaging without ...

Other
Jan 14, 2005
Post comments count0
Post likes count1

Cleaner, more elegant, and harder to recognize

Raymond Chen

It appears that some people interpreted the title of one of my rants from many months ago, "Cleaner, more elegant, and wrong", to be a reference to exceptions in general. (See bibliography reference [35]; observe that the citer even changed the title of my article for me!) The title of the article was a reference to a specific code snippet tha...

Other
Jan 6, 2005
Post comments count0
Post likes count0

A rant against flow control macros

Raymond Chen

I try not to rant, but it happens sometimes. This time, I'm ranting on purpose: to complain about macro-izing flow control. No two people use the same macros, and when you see code that uses them you have to go dig through header files to figure out what they do. This is particularly gruesome when you're trying to debug a problem with some cod...

Other
Dec 28, 2004
Post comments count0
Post likes count0

Computing the size of a directory is more than just adding file sizes

Raymond Chen

One might think that computing the size of a directory would be a simple matter of adding up the sizes of all the files in it. Oh if it were only that simple. There are many things that make computing the size of a directory difficult, some of which even throw into doubt the even existence of the concept "size of a directory". Reparse point...

Other
Dec 27, 2004
Post comments count0
Post likes count1

You can create an infinitely recursive directory tree

Raymond Chen

It is possible to create an infinitely recursive directory tree. This throws many recursive directory-traversal functions into disarray. Here's how you do it. (Note: Requires NTFS.) Create a directory in the root of your C: drive, call it C:\C, for lack of a more creative name. Right-click My Computer and select Manage. click on the Disk Manage...

Other
Dec 21, 2004
Post comments count0
Post likes count0

Sometimes people don’t like it when you enforce a standard

Raymond Chen

Your average computer user wouldn't recognize a standards document if they were hit in the face with it. I'm reminded of a beta bug report back in 1996 regarding how Outlook Express (then called "Microsoft Internet Mail and News") handled percent signs in email addresses (I think). The way Outlook Express did it was standards-conformant, and I s...

Other