PluralSight’s On-Demand training library

The next phase of the project I’m on will likely move us from .NET Remoting to WCF services. I wanted to get a quick introduction to WCF beyond the basic user-group sessions I found online. I eventually noticed that that as a BizSpark start-up, I had a code for a free month of access to Pluralsight’s on-demand training library among my listed MSDN benefits.

I signed up and started on their very in-depth 15-hour course on the fundamentals of WCF. So far, these courses are fantastic and if the rest of their library is of the same caliber, this seems like a goldmine of useful information. In the first two hours alone, most of the questions I had on what we’d need to do to drop WCF in to replace .NET Remoting have been answered. The questions that have come up while watching (can I keep my existing domain objects?) or spots where I thought the code was sloppy (why is the channel being closed before the async call completes?) were addressed and were part of the curriculum.

The only downside is the cost is too high for me ($500/yr to stream the content, $1000/yr if you want to download). If you can get your company to spring for a subscription though, Pluralsight’s much cheaper (and much more valuable and less inconvenient, in my opinion) than a 5-day classroom training session.

SPSite.Exists leaks SPSites

The Sharepoint Object Model is a painful, leak-prone API to work with. Roger Lamb’s MSDN blog article is a great reference for deciding when you need to dispose of objects and when doing so will break things, but it’s necessity is pretty powerful evidence of how clunky disposal is implemented in this managed code API.

In dev testing, QA found an issue where SPWeb objects were being leaked left and right. It turned out some disposable objects (like SPLimitedWebPartManager) themselves contained disposable objects you had to account for (LimitedWPM’s Web).

Today, I ran into another case with a very minimal set of code I had changed. A quick look in Reflector revealed that as of SP2, even Microsoft can’t always remember when to dispose of objects. The static method SPSite.Exists instantiates a new SPSite object that needs to be disposed of. However, there is no disposal code in the method. There’s no way to work around this issue other than not calling SPSite.Exists. Luckily, no other code in the object model seems to call SPSite.Exists.

Don’t use generic domain names

Ever since I started on my newest client’s project over a year ago, I’ve had problems with their VPN. When connected, I could no longer authenticate to remote Sharepoint or SQL servers on my local network (rending my VMs useless), name resolution would be fine for awhile and then stop resolving (making it a race to sync up source code with their server before I could no longer see it), group policies failed to update… anything that could go wrong seemed to on a very regular basis.

When visiting the client’s site last year, I found that I could not log into my laptop with my domain’s credentials while plugged into their network. It became a game of turn off the wireless, log in to my laptop, turn wireless back on. We eventually figured out that my domain name (the nice and generic DEV/dev.local) was conflicting with their DEV domain. While plugged into their network, my laptop would suddenly send login requests to their DEV domain controllers. The same thing happened when connected through VPN, causing SQL and Sharepoint to believe a hijack attempt was underway.

Over a year later, I finally got around to renaming the domain to a less generic BLUEYDEV/blueydev.local and suddenly everything works. I can finally work connected to VPN and source control rather than trying to sync everything up as quick as possible when connecting.

The moral of the story: When setting up your domain, never give them generic names that others might use, like DEV or TEST. This is especially important for laptops that you may be connecting to customers’ networks.

Windows 7 Homegroup issue finding the homegroup

Windows 7 Homegroup does not play nice with bridged adapters. If you are bridging your wired NIC to a wireless NIC (in our case, for the Xbox to talk to our wireless network), you can start a Homegroup and others will be able to see it but they will encounter errors trying to join it. Likewise, if someone else has created the Homegroup, you will see it but not be able to join it from the bridged PC. Taking both adapters off of the bridge and then deleting the Network Bridge adapter resolved the issue for me.

That said, Homegroup is SIMPLE and it WORKS. If we want to watch a show on our office computers but the file is downstairs on the TV pc, we can just browse to the file in our Homegroup and watch it. The people who say it’s just as easy to set up SMB shares haven’t gone through the painful process of walking Mom & Pop through sharing each folder/setting permissions/creating user accounts/opening firewall ports.

Windows 7 and Win2k8 power management issues

More recent builds of Windows 7 have resolved the sleep issue on Lappy. We’ve also thrown 7 on the Media PC downstairs. The eye candy looks very crisp on a nice large TV. Bundled codecs meant we did not need to download K-Lite to watch any of our ripped AVI files. It also detected our wireless mouse’s media keys out-of-the-box and is able to wake up from sleep when when push one, something we were missing before. Media Center can FINALLY use the timeline to move to a specific spot in AVI files that don’t contain an index track. This always stopped us from using Media Center over Windows Explorer/WMP. The feature changes from Vista are small and subtle, but coupled with the performance enhancements, there’s enough to warrant an upgrade from Vista.

With Lappy and Media PC sleep issues resolved, I noticed my main Win2k8 development box was no longer sleeping, heating up the office considerably at night. It turns out installing the Hyper-V role disables power management completely, the two are absolutely incompatible. While trying to switch back over to Virtual PC, I found performance of be horrible. The install of Vista under VPC was stuck in the same spot for an hour and a half. Even with all of the Hyper-V services stopped, your parent partition is still virtualized under the hypervisor. After removing the Hyper-V role and rebooting, VPC flew. Win2k8 was sound asleep and the office nice and cool when I walked in this morning.

Windows 7 Wake From Sleep issue and workaround

Playing with Windows 7 the last few weeks, I’ve found that my laptop refused to wake from sleep. The display alternated between not even powering back on and powering on but remaining black with a non-responsive mouse cursor. The only way to recover was to hard-power Lappy off and back on. This seems especially prevalent on Intel 945 chipset displays.

The only workaround I’ve found for now is to turn off sleeping completely and instead use hibernate. I’ve had no problems powering back on from hibernate so far, it only takes about 20 seconds to do with Windows 7 on my system, and doesn’t drain your battery like sleep does.

The updated Intel 945 driver released today through Windows Update did not fix Wake From Sleep yet. Hopefully it’s an issue that will be addressed before RTM.

Zoom lever on Microsoft Wireless Comfort Keyboard 4000 scrolls in Firefox

I got a new Microsoft Wireless Comfort Keyboard 4000 today and found that the little zoom lever to the left of the qwerty keys caused Firefox to scroll (and backwards, even). There are plenty of articles out there on switching the lever to scroll instead of zoom, but I just wanted to fix the Zoom lever so that it zooms in Firefox. To do so, open your commands.xml file (usually located in C:Program FilesMicrosoft IntelliType Pro) and search for “MozillaUIWindowClass”.

You should see two lines for for C319 and C320 immediately following the MozillaUIWindowClass line. Replace those two lines with:
<C319 Type=”5″ KeySeq=”ctrl add” />
<C320 Type=”5″ KeySeq=”ctrl subtract” />

The reference to “1.5” in the AppName property of can be safely ignore. I tested this fix with Firefox 3.0.4 and IntelliType Pro 6.2.

Restart your itype.exe process or just log out and back in/restart your PC. The Zoom lever should work in Firefox now.

Trying out ANTS Profiler 4

I got an email that ANTS Profile 4 was released, so I downloaded my upgrade and poked around with it this weekend. I haven’t given a good look at the new features list, but the performance improvements are very apparent when profiling. There is still some degradation of your app performance when profiling, but nothing at all like it used to be. I no longer feel like I’m suffering through horrible performance for the sake of finding my issue.

The other big-money change is nice calltree/methodgraph with the shiny “Call Graph” that brings you right to the line of code in the Line-Level Timings view. I love interactive + pretty! Native support to export to PDF and PNG too. This is either a new feature or something that’s just been made much more discoverable, because I would have killed to have this in 3.x when debugging memory issues.

It’s very much worth doling out dollars for.

Google Chrome

Like every other nerd out there, I tried out Google Chrome last night.

The first issue I got bludgeoned with is how many ads are on the internet. Not having Adblock Plus in Chrome (or some comparable ad blocking plug-in) means browsing the web SUCKS.

The second issue is how Chrome sucks at password management. It imported my saved password list from FF3 easily enough and I can see them in Chrome’s password list now, but it does not auto-populate most of the websites I visit (like blogger, for example), so I have to go lookup the username and password for each site each time I visit. Since I make up random passwords for every website and then promptly forget them after registering, this is an epic fail of Chrome for me.

Beyond that, performance was noticeably fast compared to FF3. Refreshing the pages side-by-side in both browsers, FF3 is still zippy but Chrome is definitely faster for the pages I visit at least. It seems pretty light on memory, but I never noticed any issues with FF3 in that department. The “new tab” page with thumbnails, recent bookmarks, etc. is nice.

I LOVE that Chrome actually listens to me when I choose “always open files of this type” after downloading something, where as Firefox just presents me with the “Opening file” dialog with the “Do this automatically” check box already checked for me, but will still not open it until I click “OK”.

Were it not for the punch-the-monkey banners and the password manager failures, I’d probably give Chrome a shot as my default browser for a few weeks.

Hyper-V and widescreen

The multimedia performance issues in my previous post about Hyper-V performance turned out to be a display driver issue. With my deal-breaking “must be able to watch Burn Notice” requirement now met, I poked around with Hyper-V some more last night. The Hyper-V Manager interface is rather sexy, absolutely a winner compared to VMware Server’s web-based atrocity and more than one snapshot is a bonus. However I still don’t see much benefit to using it over VMware Workstation for a development workstation, other than the fact that it’s free.

Both perform well, both have good snapshot tree management, both support VLANs (“Team networks” in VMware). Biggest frustration now with Hyper-V (other than not being able to connect to wireless NIC) is the lack of support for widescreen resolutions on the console sessions. With all the window decorations, taskbar, status bar, toolbar, etc. taking up so much space, not having widescreen means I’m stuck at 800×600 for all my Hyper-V VMs. 1024×768 if I don’t mind turning off the toolbar and hiding some of the statusbar behind the windows taskbar. VMware Workstation has very nice resizing functionality that allows you to just expand the window to whatever width you want and the desktop will resize to that resolution.

This may seem like a feature that’s only a bother for IT people trying to use Hyper-V as a workstation solution, but I imagine it has to be a bit of a pain in the ass for administrators running Hyper-V Manager from their workstation with widescreen monitors.