Windows 7 Task Manager screenshot

Mon, April 27, 2009, 10:59 PM under Windows
Previously I linked to a screenshot of 96 virtual processors and now I have access to a machine that tops that!

Count them:

Nothing else to share here, just a geek showing off ;-)

Nice collection of .NET 4 links

Fri, April 24, 2009, 05:46 PM under dotNET
Just came across (and thought I'd share) these resources for .NET 4 and C# 4 features on Bogdan's blog post.

CLR 4 ThreadPool Enhancements

Thu, April 23, 2009, 05:22 PM under dotNET
Eric Eilebrecht (dev on CLR) is kicking off a blog post series on improvements to the CLR 4 ThreadPool. If you've used the .NET ThreadPool, you must read his first installment.

Best source code comments

Wed, April 22, 2009, 05:18 PM under Random
Literally laughed out loud when this was forwarded to me and they are way too funny not to share – from stackoverflow:
What is the best comment in source code you have ever encountered?

Measuring performance under Visual Studio

Mon, April 6, 2009, 07:58 PM under dotNET
When I created my Visual Studio C# demos for showing off Tasks versus Threads, I of course created the project in Release mode, but there were 2 additional things that I had to do.

One had little impact, but is important to remember: set the power plan on Windows to "High Performance". Otherwise CPU usage can be throttled by the OS, which is not what you want when you are demonstrating parallelism and 100% CPU usage ;-)

The other had a profound impact and had me puzzled for a bit: use Ctrl+F5 instead of F5. The difference in the time the threads scenario took was humongous. That is because the naïve threads demo creates around 1023 threads and it turns out creating threads under the debugger (F5 case, even in release mode) is measurably slower than not. I should have known that, but I didn't, so sharing it here in case you didn't either: when measuring perf, always use Ctrl+F5 in release mode.

For a lot more on the performance difference between running under the debugger and not, I recommend Joc's blog post: Why is my app so much slower under the debugger.

Internet Explorer 8 using Restart APIs to full potential

Thu, March 19, 2009, 11:49 AM under Windows
I have been playing with internal bits of Internet Explorer 8 for a while and it is pretty cool. Today the final version has shipped and you can download IE8 from the Microsoft site. To see the many cool enhancements I'd encourage you to watch the short videos (or at least just the Overview) on the dedicated IE8 videos page.

One of the things I like doing to new apps is crashing them. When a windows app crashes, I fully expect it to restart and restore the state it had before it died. I ranted in detail on that front in an older post of mine 2 years ago.

Internet Explorer 8 finally delivers on my request. This is what I see after I crash it and it restarts:

Love it!

Zoom Ctrl + mouse wheel

Sun, March 15, 2009, 07:21 PM under UserInterfaceDesign
Almost all modern UIs support zooming in and out; it is useful for focusing on a specific area (e.g. seeing the detail better) and for managing scale (e.g. seeing the big picture without scrolling).

It has become the standard to offer the zooming function via holding down the Ctrl key and scrolling the mouse wheel. Try it now in your internet browser (IE, firefox etc), in any office application (Word, Excel, PowerPoint) including reading or composing email in Outlook, in windows explorer to see more/less files, in Visual Studio 2010 editor and so on and so forth.

If you take one thing away from this blog post as an end user it is to try Ctrl + mouse wheel. As a developer, offer this feature for your users. I recommend a range of 10% to 2000%.

Beyond the standard keyboard shortcut though, there seems to be no standard for displaying a UI zoom control. Below are some screenshots of zoom controls to prove the point.

Word/Excel/PowerPoint, in the status bar:

IE7, in status bar:

FireFox, hidden in a submenu:

Outlook, hidden in a dialog off a ribbon button:

Windows Photo Gallery:

Class Designer, on a toolbar:


Our team wanted to add a zoom control for a new VS2010 debugger toolwindow. Even within Visual Studio there are various zoom controls. You can see one of them in the screenshots above from the Class Designer (introduced in VS2005). Here is another example introduced in VS2008 for the WPF designer (aka "Cider")

Rather than introduce yet another control that was convenient for us to implement, we decided to follow Cider's example (and also suggested to the UX team to standardize on this for Visual Studio). What I like about this control is that it is quick to use (less mouse travel to get to it than other approaches, and just click and drag instead of combobox clunkiness), I like the way it reports the zoom state at the top e.g. "70%", "x2" and, finally, I love the button at the bottom that toggles between the "fit to screen" and "100%" states. Those of you that used it will have also noticed the aesthetically pleasing fade in/out as you hover on/away from it :-)

Now, even with all these benefits there is a drawback which is acceptable in the WPF designer, but not so acceptable in a smaller surface area (like the typical debugger toolwindow): the control can overlay with the content of the window and, even in the faded out state, it can be annoying for some users. For that reason, we added a toolbar button that simply toggles the visibility of the zoom control. So now you can have your cake and eat it too.

It is amazing to me how smaller obvious features such as adding zoom support, take more time to think over than what one might expect… If you have used zooming in an application that you believe is better than what's described above, please share!

Perspective on Program Manager

Tue, March 10, 2009, 11:21 AM under Career
Apologies if you were expecting me to share my own insights (beyond what I already did last year).

Instead I encourage you to read Joel's take (slightly biased towards junior PMs, towards consumer product PM and towards the early stages of the project lifecycle).

Around 1500 geeks in Seattle for the MVP Summit 2009

Fri, February 27, 2009, 03:39 PM under Events
My last participation as an attendee was the MVP summit in 2005 and 4 years later I'll be participating again but this time from the other side (was planning to do it in 2007 but failed). There are many events to go to and I've narrowed it down to the following. If you read this blog and you are around, why not find me and buy me a beer? ;-)

Saturday ALT.NET Seattle 2009.

Sunday – WSCTC 4th floor (welcome, keynote, reception), and then
Sunday Jillian's for evening geek party.

Monday – Hanging out with Device MVPs: Lunch time + an evening reception, on Redmond campus.

Tuesday – presenting to C++ MVPs about parallel debugger, and then
Tuesday – presenting to Managed Languages MVPs about parallel debugger, and then
Tuesday – evening at the MVP Summit party.

Wednesday – probably at WSCTC (keynote, panel and general sessions + lunch).

Parallelism in Greek

Mon, February 23, 2009, 04:53 PM under Events | ParallelComputing
During my working_from_Greece stint over the Christmas and New Year's period, I squeezed in presenting at an event in Athens. Parts of the recorded presentation are now available on the Greek MSDN pages. Scroll down the page to choose between the 2 presentations


The 1st presentation was this one. The 2nd presentation was a (interactive) Greek version of the code-heavy Parallel Programming session.

Finally, for those of you physically living in Greece, there is a 2-page article/interview on parallel computing in February's PC Magazine.