Tech Blog
Visual Studio Theme - 4/11/2008
I frequently get e-mails from people that have been at my talks about the theme I use in Visual Studio. Instead of continuing to reply individually, I've decided to point them to this blog post from now on. As a long-time Delphi user I've been used to the dark background (Twilight is it's name in Delphi) and find it much easier on the eyes. In Visual Studio I'm using a variation of Rob Conery's theme which in itself is a variation of Jon Lam's theme.

My font is "BitStream Vera Sans Mono" size 11. You can download the theme from here
Unit Testing: It's not only about regression testing - 4/8/2008
A lot of times when you're introduced to Unit Testing, you're sold on the fact that it's the best way to have regression testing in place. That's 100% accurate. Whether you practice Test Driven Development or take a test-after (test-last, POUT, whatever you want to call it....) approach, creating unit tests allows you to test changes in your code and make sure that bug fix, change or new feature hasn't broken any functionality. However, one of the great added values to Unit Testing that often doesn't get as much attention as it should, although always present, is documentation.
How many times have you come across some piece of code that you needed to change and was wondering why you did something the way you did? Talk to your colleagues, look for documentation, look for comments, only to find nobody recalls anything and not one word jotted down anywhere about it. This is where a good suite of unit tests come in handy. If you have tests that verify behavior of your code, and also make sure that your code coverage is quite high (over 80%), you have a good chance to find out why something is coded in a particular way. Even if you don't name your tests with a "specification orientated" convention, it is still very valuable to know that when you make that change, your tests still run. And the higher the code coverage, the less chances are that something will fail on deployment.
So whether or not you or your colleagues recall why you did something in a particular way, you might not need to if you document your code with tests.
Finalbuilder just went continuous and so will Intraweb - 4/7/2008
Many know I've been a Finalbuilder fan from day one. Recently they came out with a server version of their product which allowed you to run builds unattended on some machine (different from automated builds based on Windows Scheduler). However, it still lacked some of the main features demanded by a proper Continuous Integration tool.
Well they've just released FB 6 along with the server version and I'm really impressed. Just look at the feature set here. I'm really desperate to try it out and the first thing I'm going to do is create continuous builds for Intraweb. I've been spending the past week cleaning up our build process and this will be the perfect opportunity to test out FB6. Great timing.
Interview - 3/7/2008
Now I'm not one to brag so I don't like these types of "self-promoting" blog posts, but what the hell....Here's an interview that Microsoft did of me recently. Warning: It's in Spanish.
Big nose? Who you calling Big nose?
ASP.NET MVC CTP 2 - 3/6/2008
CTP 2 of ASP.NET 3.5 MVC was released recently. It has quite a few breaking changes, including three fundamental ones: routing (even the default defined in CTP 1 breaks) and the dissapearance of OnPreAction / OnPostAction. These haven't actually gone but have been renamed to OnActionExecuting and OnActionExecuted and now take only one paramter which is of type FilterContext. Before the methods would return a bool indicating whether to continue with the action or not. Now you have to set the Cancel property of the parameter. Not too keen on the name change to be honest.
One other obvious and important change is that you no longer have to decorate your action methods with ControllerAction. By default, all public methods are now actions. Going down the convention over configuration path again. You can find more information about the changes here. Make sure you read it thoroughly. There are some very "insightful" entries, like the following:
Issue
Targeting the .NET Framework version 2.0 or version 3.0 is
not supported.
Workaround
None.
I guess the 3.5 appended version number in the product name isn't clear enough. Doh!
Visual Studio Gallery - 2/28/2008
Microsoft's published a new site named Visual Studio Gallery that enables third-parties (and MS itself) to publish extensions for Visual Studio. Coming from Delphi, the 3rd party community has always been a strong one and has been the basis for many innovations and technologies. Anything that embraces external companies can only be a good thing for community, and for Microsoft. I think this move and support for external testing frameworks in the upcoming ASP.NET MVC CTP shows that MS is moving in the right direction.
Adding a Security Profile box to Windows Logon - 2/14/2008
Jeff Atwood posted an entry a couple of days ago about adding a checkbox to the Windows dialog boxes to display your password while typing, as opposed to just asterisks. I don't particularly agree with the idea of displaying passwords since I don't think it's that useful. Think about it. If the purpose is to display the characters you're typing so as to know if you're making a mistake, why not just reveal it all the time? Why would it make sense to reveal only if there's nobody looking over your shoulder? You'll probably be more nervous and make mistakes when someone is watching you.
But the whole idea got me thinking about how many times we have to enter passwords and in general validate our identity to different systems. I log on to my machine in the morning and type in the password. I start up Outlook and enter my password (or hit the Remember Password box the first time). I log on to GMail and enter my password. I start my VCS and enter the username and password. Why couldn't I just enter my username and password once and have it work for all my application? Applying this idea to the web, Microsoft tried to implement something similar using Microsoft Passport. The reason it didn't take off is obvious: you wouldn't want to your entire life in the hands of one entity. Also, having all the different web sites use the same set of credentials is as a good an idea as using the same password for everything. The next step was/is Federated Security and Windows CardSpace, where either yourself or independent authorities validate your credentials to third-parties, however that's another topic in itself.
However, what if we were to apply the same concept to our machine? My main machine is a laptop and I travel quite a bit. As such, I'm quite paranoid about privacy. I have everything encrypted and in case one day my laptop gets stolen, they can't really do much with the information (unless they snatch it out of my hands while I'm working, but that's another problem). I also have everything protected by credentials (TrueCrypt, KeePass, etc.). But when I'm at home, why should have to keep typing in my credentials for each application I want to access? Why can't I just indicate to Windows that I'm at home and don't bother asking my about my information (i.e. when Jeff Atwood talks about having a checkbox on the password entries, make this configurable based on location when you login to Windows).
Let's take it one step further: why restrict this to location? Why not take it to the next phase and create security profiles for the same user? Based on a security profile I select, I could have my different applications ask me for credentials or not. There are many ways we could implement this. Browser and other applications could use a common API to retrieve such information about Windows. There wouldn't even be a need to store credentials. It's pretty much the same idea as using Windows authentication with your applications, combined with different profiles for different users but under the same username, i.e. take make use of the various technologies and techniques we currently have.

I can't find an immediate downside to this but as with everything, it might have it's flaws. Has this already been thought of or does it exist? If it has, it's definitely not mainstream.
My Toolbox 2008 - 2/9/2008
During my talks, people normally ask me about specific tools they see on my system. About a year ago I posted about a bunch of things I use. It's time I update it to the year 2008. Some have dropped off the list. There are also a few I realized I had left out that I've been using for years (some I left for an alternative solution and came back to later). So anyway here's the list:
1. Launchy. It's Vista's Start menu search done right. It's amazing. Must-have. And if you can, make a donation to the guy developing it.
2. Google Desktop. Still there. Still finding my stuff.
3. Beyond Compare. Nothing "compares" to it. Ok, bad joke, amazing tool.
4. TextPad. Was using it before. Switched to Notepad2, then to ConText, now back to TextPad. The Find in Files feature it has cannot be beaten.
5.SnagIt. Still there. One complaint. It's become a little feature-bloated.
6. Finalbuilder. Since the first beta!
7. TinyClip. Eat your own dog food I say.
8. Console. Throw cmd out the window.
9. TrueCrypt. If you own a laptop and travel or have a desktop and carry it around, or for that matter, even if you don't, you have to keep your info safe. Been using it for years, no problem.
10. KeePass. In combination with TrueCrypt, try getting to know my passwords! I don't even know half of them myself. Keepass types them in for me
11. Acronis TrueImage. Only way to make decent backups and not worry about open files. And it works. I've restored many times from it.
12. Resharper. Cannot work with Visual Studio without it. It's just so unproductive to do so.
13. TortoiseSVN. I hated explorer-based VCS's initially but now I love the fact of not having to start an app to checkin/out a file.
14. FoxIT reader. Dumped Adobe a long time ago for this lightweight alternative. Only issue, it doesn't register the correct MIME type with browsers (or maybe it's something else, haven't investigated that much) and some stupid web sites, for example www.iberia.com try to be smart and won't issue your boarding card if they think you don't have a PDF reader installed (maybe it's just Iberia looking for Adobe specifically?)
15. TaskSwitchXP. You don't need Aero with this.
Give it a sensible name! - 2/7/2008
Here's a tough question. Suppose you buy a printer (let's call it the HPC4380 All-in-one), and let's assume you install it and it works. You reboot your machine after a couple of days, try and print something and find the printer has vanished. Since it's a WiFi device, you can't really check any cables and Windows in all it's mighty power doesn't seem to know (or want to) find network printers that aren't connected to a machine, you're not left with many options, other than re-installing the vendor's software.
As you're about to do so, you suddenly see an icon that has been installed for you on the desktop. It's called the "HP Solution Center".
What would you expect it to do?
Personally, I'd expect to see some application that might help diagnose problems with my printer. How naive was I? Instead I got a splash screen come and go so fast I didn't even see a logo and then I got this nice dialog box displayed.

Now I don't normally care much for software that ships with printers. I just pretty much install the drivers (I'll figure out myself when the ink is low, thank you!), but seeing that this printer vanishes every time it feels like it, and takes my scanner away too, I would have thought at least I could get a little bit of help from one of the these apps, seeing they only take up 250 MB of my drive.
Siliverlight challenge - 1/13/2008
The 1st European Silverlight Challenge is under way. There is over 150.000 Euros in prizes, including a trip to MIX 2008. The guys of INETA Europe have worked really hard to get this under way. So if you're up for a challenge and want to get some fabulous prizes, don't hesitate...participate (I didn't plan on that to rime)


Click
here for RSS feed