You never know what will become an API.
Archive for January, 2006
Online Sports Journalism Audition
I'll admit, I personally prefer complete sentences, paragraphs, and attempted grammar. But, I thought I would try to write a "column" that is nothing but a long, bulleted list since this approach seems to be working for the so-untalented-he's-talented Bill Simmons.
Television that ruins an entire day if watched for even one second:
- Dr. Phil - Relentless shouting. Truisms presented as revelations. "You need to get ahold of your life."
- Mad TV - Bizzare, almost sinister, terrible acting. Not funny.
- Anything about Nostradamus on the History Channel - John Hogue, in being what I will call a metafraud, has achieved something very impressive. He has somehow created a career for himself by sort-of-looking-like another fraud who has been dead for five hundred years.
- Anything about the Civil War on the History Channel - Sorry for the lack of variety here, but I just have to mention the guy with the Elmer Fudd accent that is on all of these documentaries. Apparently I am the only person in the world that is bothered by this.
- The Q-Ray Commercial - If you think you should feel sorry for the people making testimonials, you are wrong. This is a rare intersection of people who deserve to have their money stolen and advertisers who do not deserve to receive money.
- The 700 Club - Excessive squinting. Miraculously, doesn't seem to be on DirectTV in New York City.
- Mind of Mencia - The person who greenlighted this trainwreck should receive the death penalty.
- The Inaudible Fossilized Nun - I have no idea what the real name of this show is, but everyone knows who I'm talking about.
- Pirate Radio TV - This is a cable access television show in Ithaca, New York. Typical rants include, "why did they move the CVS out to Route 13? Fuck!" and "Cornell students should count in antlerless deer season." It is sometimes entertaining to call in to the live broadcast and argue with the host–he flusters easily.
- Fox NFL Pregame - Despite my soft spot for Terry Bradshaw, this has devolved into a retard tickle fight.
Debugger Feature Request
Mike Stall has had a recent string of posts about debugger features, which got me thinking about what I waste time doing in debuggers these days.
Omniscient debuggers would be great, but what I would really like is a memory window that I can annotate. I don't care if this makes it into Visual Studio or WinDbg, but it would save me time that I currently waste scribbling on notepads.
I should be able to stick some comments in the memory window, and they should stay at that address for the extent of the debugger run. This is what I mean:

In this case, since my memory window is @ESP, I should be able to see my annotations being pushed down on the stack as I step.
I realize maybe one percent of developers could use this, but dammit, we're the coolest one percent.
Psychic Debugging: Random Crashes
Raymond Chen has had an entry or two about "Psychic Debugging." This skill is a lot like everyday psychic abilities by virtue of being really just intuition and guesswork, but dissimilar in that it produces results that benefit society.
Today one of the developers was working on a weird problem he found in his development environment. He could test his functionality once (it's an ASPX page), but the second time he tried to use it there was usually a "random" exception on the page that didn't make any sense. Sometimes, instead of an exception, his worker process just crashed. He also told me that he was trying to use a new API that I knew mapped to a third-party COM object.
This is where the mystical powers came in handy. I tried running his page once, then running a different page–same weird exceptions and crashes. It was here that I started to suspect that the heap was being corrupted by the COM library.
(Let me quickly explain what heap corruption is: suppose I have two objects, X and Y, next to one another in memory. Now suppose I make a mistake writing my program and accidently write beyond the end of object X. I've now screwed up object Y, but we might not know about it until we try to use object Y. We might not try to use object Y for quite a while, so this makes the real cause of the bug awfully difficult to find. To make matters worse, the next time we run the program our bug writing to object X might scribble all over a completely different object that will crash the program somewhere else.)
On a hunch I attached a debugger after the first load of the page. When the exception occurred, I ran the !verifyheap command in the SOS extension. This reported that there was a corrupt object on the heap. I ran the same test a few times to confirm the theory.
If you're lucky, you might see a debug break like this in one of the Windows Debuggers as soon as the heap corruption occurs:
HEAP[heapcorrupt.exe]: Heap block at 001AD700 modified at 001AD780 past requested size of 78 ... ntdll!DbgBreakPoint:
This is just a debug break, so it won't tear down the process immediately. Depending on the application you're working on the real problems could start much later, long after the offending code has finished executing.
All I can say is that it's a goddamned miracle that the developer was doing a good job testing his functionality and noticed this. The mayhem that would have ensued if this made it to QA would have made it far more difficult to track down the source of the problem. The happy ending here is that the vendor has a fully-managed version of their component that we can switch to–hopefully that will be more difficult for them to screw up.
The Curse of Siragusa
Tony Siragusa is the nuclear option in Fox Sports' ongoing war against dramatic pause.

Every Sunday he roves the sidelines ensuring that even the slightest moment of dead air is filled with sense-dulling stupidity. "I love coming to Cleveland because they've got the best nacho cheese in the league here. Ok, back to you guys." Last week, he told viewers that Redskins quarterback Mark Brunell had been practicing all week with wet balls to prepare for the depressing perpetual downpour in Seattle. Not content to leave it at that, he then demonstrated the act of submerging a football in a bucket of water.
If Scooter the Talking Baseball wasn't evidence enough, it should now be obvious that Fox's interest is machiavellian masochism rather than the enjoyment of genuine fans. They know that you will watch, and they want to make it hurt as much as possible. It is therefore left to us to take action, get involved, and improve the quality of our football experience. Here are some thoughts I had, which I urge you to try the next time Siragusa visits your NFL city. Bear in mind that these may require felonious access to the playing surface.
- "Steal his nose," refuse to give it back. Let Siragusa chase you for three hours.
- With several accomplices, distract Siragusa with a system of flashing mirrors. (Unlikely to work in winter.)
- Stage a sham rib cookoff near the stadium prior to kickoff; lace Tony's racks with Lunesta.
Ok, back to you guys.
Cry me a River, Stupid Ohio
For a decade and a half, I was aware of exactly two Bengals fans.
- ESPN personality and all-around good guy Dan Patrick.
- A very irate patron of St. Mark's Ale House in New York City. This guy had positioned himself in a wooden chair in the center of a crowded bar, so that he could see the Arizona, Cincinatti, and Detroit games simultaneously. Anytime anyone attempted to change the station on any of the three televisions, he threw a holy fit. He was wearing an Ickey Woods jersey, and eventually wound up getting in a fistfight before being carried out. (Clearly out of his mind. Screw you buddy, if you happen to get here by Googling "batshit insane Bengals fan.")
Over the last few months, thousands have come out of the woodwork. The fact that your team is a disgrace is no reason to hide. I have known many Lions, Bears, and Browns fans through their respective lean years. In an odd way, I am able to respect the pluck of Browns fans. They may not have many things going for them–brains, literacy, or motor skills, to name a few–but they come out and cheer for their stupid team. This was not so for Bengals fans.
You deserve every embarrasing moment of what happened to you, so shut up.