From the Windows Event Log

02:47 pm
Generate Activation Context failed for c:\Temp\updater\tests\basic-success\bin\updater.exe. Reference error message: The operation completed successfully.

Error messages like this make me realize that the entire point of the Bill and Melinda Gates Foundation is to shave hours off Bill Gates’ allotted millennia of doing tech support in Hell, where the network is a mix of Windows ME, 2000, and Vista.

 LOATHE Their developers are smoking advanced experimental prototype monkey crack again.

Another reason I prefer not to work on Windows

03:44 pm

Microsoft have mostly coped with the difference between how they like \ for a path separator while the Unix world prefers / by making user-mode paths usually work with either kind of slash. (They still use backslashes in the kernel.) Since \ is also a popular quote character, it is very convenient to just use slash-paths whenever possible so there isn’t any hassle when going between different shells that might or might not decide to interpret \ has having special meaning. Normally, this just works. But then there are the times that it doesn’t:

C:\Temp\foo>c:/windows/system32/xcopy.exe /f /r /i /d /y * ..\bar\
Invalid number of parameters

C:\Temp\foo>c:\windows\system32\xcopy.exe /f /r /i /d /y * ..\bar\
C:\Temp\foo\blah -> C:\Temp\bar\blah
1 File(s) copied


The same problem will occur if it’s getting the path to c:\windows\system32 from the PATH environment variable, making it utterly unclear as to why the command is failing.

If I ever take a job at a Windows-only shop, I am going to insist on a serious salary bump for hazard pay.

 LOATHE Their developers are smoking advanced experimental prototype monkey crack again.

When you need incompetence, you can always count on Microsoft.

12:53 pm

A common practice in software engineering is to turn on all the warnings in your compiler, giving it a chance to warn you about unsafe practices, and then to turn on an option that turns warnings into errors so you can’t get code to compile while it is still triggering warnings. This helps avoid dodgy coding practices, though it occasionally necessitates an override when you know damn well what you’re doing and the compiler can’t figure it out. Of course, this requires that the underlying libraries on top of which you’re building your code don’t trigger warnings.

Releasing a compiler where even Hello, world! can’t pass that gauntlet? That takes talent.

 LOATHE Their developers are smoking advanced experimental prototype monkey crack again.

The light at the end of the tunnel is not the headlamp of an oncoming train...

03:30 pm
...but there’s a considerable upward slope between here and there.

We have a new engineer who’s taking over Windows driver development, but he only started on Monday, and he’s going to need a few months to get up to speed, just like I did when I started at Electric Cloud. (He has Linux driver experience, but not Windows file system driver experience; people with the latter are just too hard to find.) And meanwhile, I’ve got yet another extremely subtle NTFS behavior I need to emulate. I’ve been working on things outside the driver world for a while, and feeling pretty good... but it’s amazing how fast my energy goes away when I have to wrap my brain around all the interlocking constraints of a file system driver that has to pretend to look like another (undocumented) file system driver.

 REVILE They obviously can’t be bothered to write useful documentation.

Vacation!

01:55 pm
Tonight I’ll be starting a week’s vacation. Through Tuesday, I’ll be at Westercon 60 in San Mateo; I plan to be in town doing a lot of sleeping in and flaking out the rest of the time.

 IGNORE I can pretend it’s not there.

There is not enough single malt whisky in all the world

04:24 pm
The engineers who designed Windows file systems must have, at some point, discovered that their standard interface was too slow. Rather than coming up with ways to make it faster, they simply introduced a new, parallel one, called “fast I/O”, whose functionality is entirely redundant to the usual one. This is optional, but if you don’t implement it, some behaviors (like appending to a log file, one byte at a time) can become extremely inefficient. And naturally, none of their sample code shows how it’s supposed to work.

 LOATHE Their developers are smoking advanced experimental prototype monkey crack again.

03:52 pm
From the Microsoft Windows Device Driver Kit documentation:
The specific rules to follow here are unclear, but as with most things in NT, if you do it wrong the system will fall apart at some future time.
This is in a technical article written by the folks at Open Systems Resources, not the actual Microsoft writers... but it’s going out as official Microsoft material.

 REVILE They obviously can’t be bothered to write useful documentation.

Back to the bit mines

03:22 pm
Electric Cloud has an open-plan office, and my desk is right next to the CTO. He finds it amusing to hear me talk to headhunters when they call:

Recruiter: “I understand you have a background in Windows API work.”
Me: “I also have a background in wanting to messily slaughter the entire Windows kernel team for creating really bad APIs.”

I find that most headhunters tend to just ignore the outrageous statements rather than attempting to parse them for content. Last week I got a recruiting attempt to work at Microsoft, and sent my usual explanation of why their management practices create an environment in which I wouldn’t wish to work, and the response was a complete non sequitur: that they were working from an out-of-date résumé.

 DISDAIN Windows-related tasks are under control.

On vacation this week

05:59 pm
I’ll be back in the office on Monday the 11th.

 IGNORE I can pretend it’s not there.

Today’s learning experience

03:19 pm
 REVILE They obviously can’t be bothered to write useful documentation.

Today’s technical learning experience: the SuspendThread() call in Windows can return before the thread involved is actually suspended. On a fast multiprocessor machine, the “suspended” thread can actually crank out a few hundred instructions before it grinds to a halt. MSDN doesn’t tell you anything about this one way or the other.

Fortunately, I am going on vacation, and will not need to return to work until January 3, so as soon as I walk out of here tonight:

 IGNORE I can pretend it’s not there.

For the hacker's dictionary

05:41 pm
cargo cult coding, n. The act of writing code to resemble provided samples when there is no information that allows actual problem solving; a last resort when documentation is hopelessly inadequate and source code to the underlying operating system is unavailable.
Documentation on Windows drivers is so bad that I had to get out the fastfat sources and do cargo cult coding until the blue screen bug went away.

— Max Kaehn, 2005

 REVILE They obviously can’t be bothered to write useful documentation.

A new way of mapping the country

11:33 am

The CommonCensus Map Project is drawing a map of the continental US based on where people feel an affinity, rather than formal designations. As they accumulate data, this could become an interesting contrast to our gerrymandered political districts.

 DISDAIN Windows-related tasks are under control.

(no subject)

05:12 pm
What’s even worse than doing driver development under Windows? Dealing with problems caused by sharing a machine with Symantec’s badly written drivers.

 LOATHE Their developers are smoking advanced experimental prototype monkey crack again.

Guns, Germs, and Steel comes to video

08:41 am
Jared Diamond’s excellent work Guns, Germs, and Steel has been converted into a three-part miniseries on PBS. (Found out about this from Wired.)

 REVILE They obviously can’t be bothered to write useful documentation.

Grrr...

06:26 pm
Windows supports a file system concept called “extended attributes”. The basic idea is quite reasonable: any application can attach data to a file without modifying the file itself (as long as it has permission to meddle with extended attributes). Each application can add its own special data without interfering with other applications. Not all file systems support this: NTFS does, FAT32 doesn’t.

At the driver level, you receive perfectly reasonable-looking requests with codes like IRP_MJ_QUERY_EA and IRP_MJ_SET_EA to manipulate them, or get them passed in at file creation time. Update: The kernel does have NtQueryEaFile() and NtSetEaFile() as undocumented APIs.

At the user level, if you want to write a reliable, runs-everywhere application, you get at them through the backup API. If you’re on a sufficiently advanced version of Windows and you know that the file system implements EAs as “streams” (a special feature of NTFS), you can use the new stream control API to manipulate EAs. But nowhere is there a straightforward way to manipulate these things the way they’re designed to be used. It’s like a filing cabinet where you have to remove the entire drawer in order to use it, even though you know perfectly well you should be able to grab the individual folders.

 LOATHE Their developers are smoking advanced experimental prototype monkey crack again.

Mmmm... Laphroaig...

04:51 pm
Looks like single malt whiskies have even more antioxidants than red wine. It’s so nice to have an up side to one’s decadent habits.

 REVILE They obviously can’t be bothered to write useful documentation.

Springtime in Arkham

01:29 pm
Black Phoenix Alchemy Lab have released their Springtime in Arkham perfumes, including such scents as Miskatonic University and Al Azif. You can order the entire collection (save for the limited edition Mi-Go Brain Canister) as the Gibbering Madness Pack.

 DISDAIN Windows-related tasks are under control.

Max Kaehn

S M T W T F S
123456
7 8910111213
14151617181920
212223242526 27
28293031

Style Credit

• Style: Green Machine for Lefty by

Expand Cut Tags

No cut tags
Page generated Apr. 23rd, 2019 04:16 pm