Friday, March 21, 2008

The First Rule of Programming : It's Always Your Fault -- A Corollary

Jeff Atwood, on the CodingHorror blog, recently posted about taking ownership of your code by way of always assuming a problem is your fault:

No matter what the problem is with your software-- maybe it's not even your code in the first place-- always assume the problem is in your code and act accordingly. If you're going to subject the world to your software, take full responsibility for its failures. Even if, technically speaking, you don't have to.

I'll add just one more bit of advice:

Assume that it's the last thing you changed that caused the problem.

(Source control systems make it relatively easy to find the breaking change by allowing you to progressively fetch earlier versions of the source code.  I usually employ a binary search technique that lets me close in on the breaking change pretty quickly.)

Friday, February 22, 2008

MIDL error: 'annotation'

Recently, after upgrading Visual Studio 2005 Professional to Visual Studio 2005 Team Suite (1) I received these errors when building:

unknwn.idl(108) : error MIDL2025 : syntax error : expecting ] or , near "annotation"
unknwn.idl(108) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation

This post has some advice that I suppose would have worked.  However, I found that opening the SDK command prompt and running 'vcintegrate' worked just as well.

Follow these steps:

  1. Start->All Programs->Windows SDK->CMD Shell
  2. cd setup
  3. vcintegrate -i

-----------------------------------------

(1) I just installed the latter over the former.  Perhaps I should have uninstalled Visual  Studio 2005 Professional first.

Thursday, February 21, 2008

Programming Language Cheat Sheets

Here's a really useful thing -- a list of cheat sheets for various programming languages like C++, C#, Ruby, etc. I only which there was a cheat sheet for F#.

Thursday, January 17, 2008

"The Invention of Hugo Cabret" Wins 2008 Caldecott Award

I just saw this:

hugocabretsmallCaldecott_Honor_Seal 

This is an excellent book and certainly deserves this award.

.NET Framework Library Source Code Available

This, of course is all over the Microsoft blogs. One tidbit that's buried in Shawne's post that you should pay attention to and was a "gotcha" for me:

I also use Microsoft Symbol Server to download symbols. What's the difference? Can these two programs co-exist?

Microsoft Symbol Server provides symbols without any source information in them. That information has been removed (sometimes referred to as "stripped") before publishing. The symbols provided on the Reference Source Server are full symbols with debugging information.

The key to using both is to have your Reference Source path above the Symbol Server Path so that those symbols are searched/found first. As described in the ADVANCED USERS section above, you'll likely want to launch your debugger once with this configuration to get all the symbols downloaded, then uncheck both of these paths to avoid debugging launch slowdowns in the future. Also note that this may conflict in the future as more DLLs are added to the Reference Source Project. Meaning, if you've already downloaded the Symbol Server symbol, you'll need to delete that or change your cache path to get the Reference Source one (Visual Studio has no way of knowing which is which).

See the remaining FAQ/TROUBLESHOOTING section for more useful tidbits.

Friday, December 21, 2007

Installing Vista Language Packs Take a Long Time

I've been doing some locale testing on Vista and needed to install a language or two. Rather than just install the languages I needed for the test, I decided to choose all the language packes available from Windows Update. Big mistake as it turns out. Unfortunately, I didn't run across this until I'd let the system run overnight (and still not finish).

From now on, I'll take the advice -- install one language at a time.

Thursday, December 6, 2007

Deleting VMWare workstation snapshot faster

VWMare workstation is a product I use everyday in my development activities. I use it to create isolated debugging and testing environments. I tend take many snapshots so that I can easily rollback any changes I've made to the environment. As a result I often end up with a snapshot manager that often looks something like this:


I find that when deleting a snapshot and it's children VMWare often spends a great deal of time "cleaning up deleted files". Recently, however, I noticed that if I "Go to" a snapshot that isn't included in the set of snapshots that I want to delete things go much faster.
So in the example above, if I wanted to delete "snap 3" and its children (that is, "snap 4" and "snap 6", it will be faster to first go to "Snap 1", "Snap 2" or "Snap 5" before the delete.