Pot to Kettle: "You’re Black"

I distinctly remember in the first round of antitrust suites against Microsoft there were complaints that the default Windows installation included a link to the MSN Internet Service Provider sign-up URL.  AOL was included in this debacle. Recently I had to install the Netscape browser to get to the bottom of a problem a client was having only when they used Netscape.  Going through the install process, I made sure only the browser was installed, ensuring there wasn't even a desktop for it.  Lo and behold, I now have a AOL sign-up icon on my desktop and my Start menu. … Continue reading Pot to Kettle: "You’re Black"

Schedule at Least a Three Hours When Installing Visual Studio 2005 Service Pack 1 Beta

Yesterday, I got Rob Caron's, the Visual C++ Team's, and various other emails about the just-released VS 2005 SP1 Beta. After getting my approval to download it, I did just that.  I then quickly proceeded to install it.  It took well over 10 minutes to inform me that I have Web Application Project add-in (WAP) installed and it must be uninstalled before proceeding.  10 mins?  I knew SP1 has Web Application Projects built-in, so I guess I understand.  But, 10 mins?  So, I pressed OK and waited a couple more minutes before the dialog went away.  I then went to uninstall … Continue reading Schedule at Least a Three Hours When Installing Visual Studio 2005 Service Pack 1 Beta

More Windows SDK Functions That Are Not Safe

Raymond Chen recently blogged that IsBadWritePtr, IsBadCodePtr, IsBadHugeReadPtr, IsBadHugeWritePtr, IsBadReadPtr, IsBadStringPtr, and IsBadWritePtr have side effects that basically render then useless. Unlike methods like TerminateThread–when used to terminate any thread other than itself–that was never safe, the IsBadXXXPtr functions seem to not have evolved with the rest of the system and have had no attempt to deprecate them.

Save CBitmap to File

It has always astounded me why the CBitmap class never implemented saving to a file.  Here's a nice and tidy way: #include <atlimage.h> #include <Gdiplusimaging.h>         //…         CBitmap bitmap;         bitmap.CreateBitmap(width, height, 1, 32, rgbData);         CImage image;         image.Attach(bitmap);         image.Save(_T("C:\\test.bmp"), Gdiplus::ImageFormatBMP);

The Difference Between Teams and Groups and the Difference Between Leaders and Dictators

Rob Caron recently referred to a very good article Team Doctors, Report to ER.  This article describes some basic problems I often see when I deal with software development groups and their management. The article alludes to teams being a group of people with complimentary skills that work together, make decisions, are given responsibilities, and are mutually accountable.  It also alludes to leaders as being a person who is a member of the team, delegates decisions to the most capable member of the team, ensures decisions are made, ensures problems don't pile up, keeps members focus on goals, and manages goals/priorities/processes. … Continue reading The Difference Between Teams and Groups and the Difference Between Leaders and Dictators

Changing TextBox Text as an Undo-able Action

The TextBox class supports undoing the last action–inherited from TextBoxBase.  Normally the user does this by pressing the undo key (Ctrl-Z if your keyboard doesn’t have a specific Undo key) or by selecting “Undo” from the context menu.  The last action can also be undone programmatically by calling TextBoxBase.Undo() (after calling CanUndo() to see if Undo() will work). Changing the text in a TextBox so that the change can be undone is not so obvious though.  Changing the Text property or the SelectedText property is not undo-able.  .NET 2.0 added TextBox.Paste(String) (not inherited from TextBoxBase, it’s inherent to TextBox) that … Continue reading Changing TextBox Text as an Undo-able Action

Protecting intellectual properties in .NET, Part 1.

One thing that bothers many people and organizations about .NET is the ease of which IL code can be re-hydrated into source code (C#/VB/etc.).  While this has always been a problem with binaries, IL code is a much smaller set of instructions compared to the instruction sets of today's processors and is designed around accommodating high-level-language usage patterns–making it easier to translate into high-level source code.  Native binaries could always be disassembled and the assembler code be reassembled into another, new, application.  But, it was assembler code, and optimized–nearly impossible to translate into a high-level-language, let alone similar to the original code .  … Continue reading Protecting intellectual properties in .NET, Part 1.