October 2007 Entries

Windows Workflow Interview Questions

A few people have asked me what "hard core" WF questions to ask a job candidate. For advanced topics, I like open-ended questions. Not all these questions have a right or wrong answer- but they should give you an idea of the candidates WF experience, and how they'd design and implement software with WF. Are there advantages to building workflows using only XAML? Are there disadvantages? What are the pros and cons of using an ExternalDataExchange service versus going directly to the WorkflowQueuingService? When are attached dependency properties useful in WF programming? What behavior does the default scheduling service provide? How can my...

My RDP Problem Appears to be the Windows Vista Firewall

My desktop computer continued to deteriorate this weekend. Not only could I not maintain an RDP connection into the desktop, I also started having problems synching my phone, copying files across the network, and general performance problems. On a hunch, I disabled Windows Firewall and all these problems disappeared. Since I am behind a hardware firewall, I'm not concerned about the security implications. Not sure why this happened – but the firewall rules on this machine numbered over 400 in the private profile (Start -> Search for firewall advanced). Other machines I've checked have ~200 rules. Perhaps the software firewall was...

The New ASP.NET Framework

The New ASP.NET Framework ScottGu gave a demo of the new MVC framework for ASP.NET at the ALT.NET Conference. Here are some notes and thoughts I had after watching ScottHanselman's recording. The framework should go live in the spring of 2008. The framework is not a replacement for ASP.NET WebForms, but provides an alternative paradigm for building web applications. The new framework still works inside of the ASP.NET runtime - meaning all of the wonderful infrastructure pieces like the configuration system, provider model, SQL cache invalidation, health monitoring, and master pages continue to exist. Like the ASP.NET AJAX extensions – it sounds...

Strange Remote Desktop Problems

Before I start my tale of woe, I just want to point out that I've tried disabling the autotuning feature on Vista machines, but this doesn't fix the problem. I have a relatively clean desktop machine. The desktop is a host for several virtual PCs, and runs Vista. Remote desktop connections to the virtual PCs hosted on this desktop are solid, and the connections never drop. The virtual PCs run XP and 2003 Server. But ... remote desktop connections to the desktop itself stall every 5 minutes. Sometimes the RDP connection drops entirely - other times it's just a matter of...

Overflow Exceptions

WWWTC #18 highlights the fact that integer overflow detection is ON by default for Visual Basic projects. To change the behavior, you need to go to into the project properties -> Compile -> Advanced Compile Options and click the "Remove Integer Overflow Checks". In C# projects, overflow detection is OFF by default. To change the behavior, you need to go into the project properties -> Build -> Advanced and select the "Check for arithmetic overflow/underflow" check box. Changing the C# project settings is one solution to making the unit test in WWWTC #18 pass. There is another option, too. Use the...

October Is Scary Schema Month

Ayende kicked the month off with "Schema to wince by…", then "CRM Horror". Great timing, Ayende! With Halloween right around the corner, let's make October scary schema month! Here is one that recently made my hair stand on end: ALTER TABLE [dbo].[EmergencyPatientAssesments]     ...

What's Wrong With This Code (#18)

Here is another golden oldie: Numeric overflows are a type of software bug that occur when a calculation produces a result that doesn't fit in the intended storage location. One of the most famous cases of an overflow bug is the overflow bug that destroyed an Ariane 5 rocket in 1996*. Fortunately, .NET has a dedicated exception to highlight overflow problems. Just run the following VB code and watch the OverflowException appear. Dim i As Integer i += Integer.MaxValue i += Integer.MaxValue So, given this class: public class LineItem {     private int _quantity;     public int Quantity     {         get { return _quantity; }     }     public int AddQuantity(int additionalQuantity)     {         // some logic ...         return _quantity += additionalQuantity;     }     //...

A 30-Second Introduction to IPv6

IPv4 is hanging around for the near future, but I took a few minutes to find out what all the IPv6 hexadecimal gobbledygook is about when I type ipconfig in Vista. Tunnel adapter Local Area Connection* 16:Connection-specific DNS Suffix . :IPv6 Address. . . . . . . . . . . : 2001:0:4136:e390:3094:8f8:e755:e2dLink-local IPv6 Address . . . . . : fe80::3094:8f8:e755:e2d%33Default Gateway . . . . . . . . . : :: There are a few limitations in IPv4, the most notable being a 32-bit address space. The free pool of IPv4 addresses is nearly empty. IPv6 addresses...

Joe Albahari's LINQPad and LINQPad Challenge

JoeA's LINQPad is an indispensible tool for LINQ development. Write a query expression and view the results, the generated SQL, and the extension method / lambda equivalent. Works for both C# and VB! Joe also dares developers to take the LINQPAd challenge: Locate the shortcut for SQL Management Studio on your Start Menu and move it some place else. In its place, insert a shortcut to LINQPad. For the next week, perform all your ad-hoc SQL queries using only LINQPad. Teachers say language immersion is highly effective when learning a new language. I'm sure the LINQPad challenge is a worthwhile endeavor to learn...

Killing Software Projects with Modal Verbs

Modal verbs are the words that express a degree of certainty, like: may, can, will, shall, must. You see them in RFCs all the time: 1. MUST This word, or the terms "REQUIRED" or "SHALL", mean that the definition is an absolute requirement of the specification. In the old days, software analysts would descend from mountain peaks with reams and reams of software requirements arranged in three-ringed binders. These requirements also came with words like "must" and "may". After a couple months, developers would repurpose the binders as doorstops and monitor risers.  The days of thick binders are over, thank...