.Net Gotchas by Venkat Subramaniam

Let’s start by saying that I loved this book. While in a speakers lounge once I picked
it up from the sky-high give-away pile, started reading, got engrossed and well…
it ended up travelling the 500 miles back home with me!

This is a book that would have been very useful when starting my .Net career. It is
‘simply’ a collection of nasty traps that .Net can lead you into. The book contains
75 separate gotchas organized into related sections.

Some gotchas are just that, but others explain tricky areas such as COM interop. Of
particular interest to me was garbage collection and the Dispose()/ Finalize() coverage.
I already knew everything that was written in these chapters but the concise manner
in which they were written helped me collect my disjointed knowledge together. After
reading chapter 5 I can confidently say that I understand garbage collection basics
and the relative merits of dispose and finalize. The COM interop was of particular
interest too. I had done this on a previous project, but was simply copying example
code from newsgroups. This book gave a better idea of what happens with memory beyond
us calling into the .Net RCW.

It is difficult for me to say how much of the book is out of date because of .Net
2.0 because I only have three months 2.0 experience. From what I have seen so far
in 2.0 it looks like most of the gotchas are still valid. A gotcha does not mean that
it was a flaw with the .Net design, just that somethings are tricky/ unexpected such
as exceptions thrown from thread pools are lost. As you can guess I recommend people
at least borrow this book. When (if?) a v2.0 of .Net Gotchas hits the shelves
I recommend checking it out. The only bad thing I will say is that if you are experienced
with .Net do not expect much of this material to be brand new, you will have heard
of most issues before but probably not seen them documented quite so well.

Visual C# 2005 by Jesse Liberty

This book is aimed at developers already experienced with .Net 1.0 and 1.1. It aims to offer a quick introduction to what is new in .Net 2.0 and VS 2005.

The first chapter in the book covers C# 2.0 and the book is very much worth buying for this chapter alone. Features covered by the chapter are as you would expect: Generics, partial types etc. We have been hearing and reading about them in the MSDN magazine for over a year. Still, it was very useful spending a couple of hours reading this chapter and nailing down each topic. It was also great to see the new covariance support for delegates covered, which I imagine is included to keep us hardcore happy.

It was a shame to spot a simple technical error: the book states that static classes cannot have a constructor. How this was not picked up proof-readers I have no idea. Just in case the CLR team has started taking mind altering drugs while designing 2.0,
I knocked up a quick sample with a static class + static constructor and it worked fine.

So on to the rest of the book. Well there are lots and lots of page filling screenshots covering the new Visual Studio, WinForms, WebApps and Data Binding etc. These may be of use to less experienced developers, but I would have preferred simple short
sections covering new features. Walking an experienced developer through how to setup a masked text box (>4 pages!) was not useful to me.

Summary: If you are just about to embark on your first .Net 2.0 project I recommend buying this book first chapter alone. It won’t take long to read, and then you can pass it to another team member. I do expect this to be a book you will use for reference.

How to uninstall IE7 Beta 2

IE7 looks cool, but I do not recommend using it on your main machine. Since Firefox does not work well on some sites I use all the time, IE 7 had to go. It is not obvious how to remove it, but is documented in Microsoft’s IE 7 Beta 2 FAQ:

How do I uninstall the preview?

To uninstall Internet Explorer 7 Beta 2 Preview and return to Internet Explorer 6
on Windows XP

  1. Click “Start,” and then click “Control Panel.”
  2. Click “Add or Remove Programs.”
  3. Check “Show Updates” at the top of the dialog box.
  4. Scroll down the list to “Windows XP – Software Updates,” select “Internet Explorer
    7 Beta 2Preview,” and then click “Change/Remove.”

If “Internet Explorer 7 Beta 2 Preview” does not exist, run %windir%\$NtUninstallie7bet2p$\spuninst\spuninst.exe.
You need to have “view hidden folders” enabled. %windir% is your Windows installation
directory, which is normally ‘C:\Windows’ on most systems.