Archives
-
Statically-typed reflection with LINQ
-
Mocks: by-the-book vs practical
Lately, there's been some formalization of the definitions of mocks, stubs, fakes and dummies, which Fowler popularized through his site with his article Mocks aren't Stubs by introducing the concepts from Gerard Meszaros' xUnit patterns book. I haven't read the book, but the definitions are sensible.
-
NavigationWindow, WinFormsHost and TextBoxes: backspace bug
-
What's wrong with the Record/Reply/Verify model for mocking frameworks
Most mocking frameworks, and especially the two most popular ones, Rhino Mocks and TypeMock, use a record/reply/verify model where the developer invokes members on the mock during the record phase, does a replay to prepare the mock for those expectations, and finally do a verify before the test ends.
-
State Testing vs Interaction Testing
Highly recommended reading: Fowler's article Mocks aren't Stubs. It's a very clear characterization of the types of so-called Test Doubles (mocks, fakes, stubs, etc.) you can use to aid your unit testing needs, but also of the kinds of TDD you can do: classic (or state) TDD and mockist (or interaction) TDD.
-
Mocks, Stubs and Fakes: it's a continuum
Highly recommended reading: Fowler's article Mocks aren't Stubs.
-
Linq to Mock: MoQ is born
-
High-performing virtual machines with Diskeeper
One of the first things (if not THE first thing) I install on virtual machines (as well as the host) is Diskeeper. It really makes a noticeable difference on the performance of the VM, especially when compared to other VMs you use for quite some time without defrag'ing. VMs stress the hard drive a lot, so keeping it in good shape is a must for well performing VMs.
-
Fastest way to get a new GUID from within Visual Studio
-
Forget about writing Atom or RSS XML handling code ever again
A *very* welcome addition to .NET 3.5, which just went RTM for MSDN subscribers and trial for the rest before general availability early next year: System.ServiceModel.Syndication.
-
How to parse specific date-time formats using DateTime.ParseExact
-
Blogger: how to provide label/tag feeds
By default, blogger will only render links to the pages where you can read all entries with given labels:
-
Windows Live Writer RTM: a missed opportunity on extensibility
The Window Live suite final version was finally released. I've been following quite closely its evolution since Beta2, and have done a quite complicated (although not from the point of view of the end user) plugin which goes quite deep into WLW libraries (deeper than I dare to confess, if you know what I mean ;)).
-
Microsoft is now officially open source friendly
I'm surely a bit late, but I just learned that the OSI has approved the Microsoft Public License (Ms-PL) and the Microsoft Reciprocal License (Ms-RL). Both are now listed in the OSI licenses page.
-
How to compile and run ALL WPF samples in the Windows SDK with a single command
Just issue the following PowerShell one-liner, and you'll compile and run each sample in the SDK (enter all in one line; broken here for readability):
-
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered error with Vista 64bit
If you're getting this error while trying to connect to Access 2007 or Excel 2007 via the Office 12 OleDB provider, you must first make sure you have the Office 2007 data providers installed.
-
Properly detecting application installation on launch conditions
If you need to detect whether a given application is installed (i.e. you're writing a plugin, or depend on an existing framework/toolkit to be installed), you have a couple options:
-
Getting Windows Live installed on Vista x64
-
Firefox is still king: creating fully customized GMail and Google skins with plain CSS
Just get the Stylish add-on browse the huge library of community contributed styles to a myriad of sites. My customized Gmail hosted now looks much better (especially on my new small 12.1'' laptop :))
-
Interplanetary web of trust is close
I heard these guys have great plans on how to secure the universe...
-
Cool article if you are learning VS SDK
Pablo wrote a very cool article on the CoDe magazine which should be very useful to most people developing VS packages. With extensive screenshots and wizards, it should make your VS extensibility life MUCH easier.
-
How to get a System.Type from an EnvDTE.CodeTypeRef or EnvDTE.CodeClass
I have already hinted at this in a previous post, but this time it's a bit different. Sometimes it's useful to switch to a full System.Type when you're doing code-generation or general CodeModel navigation within VS in an addin or VSSDK package.
-
Hard drive capable of hosting Windows Home Server was not found while installing on VMWare
VMWare suggests by default that you create SCSI hard drives when you create a new VM based on the Win2003 profile.
-
Automatic generation of data-binding interfaces for data context objects
From the new Clarius Labs release:
-
Evolving community guidelines on XAML and WPF
I just found the following excelent guidelines (especially the ones on resources organization) at Paul Stovell's blog.
-
Automatic input validation in WPF with data binding and Enterprise Library Validation Application Block
-
Serious flaw in WPF validation infrastructure for ValidationRule and Binding
Adam Nathan's excelent book on WPF states:
-
Why we need an EntLib Standalone Validation Application Block
In my previous post about XAML and its future as a domain model/DSL serialization format, I've argued that System.Configuration as well as Enterprise Library Configuration (part of the core of EntLib) will soon become irrelevant.
-
Why XAML makes System.Configuration and Enterprise Library Configuration obsolete
It may seem unrelated, but if you haven't read Fowler's article on DSLs (from Google cache if it's down like now), please do so now. It will help you understand why XAML goes far beyond WPF and presentation.
-
How to use Airport Express as a range extender for Linksys WRT54G
I know I'm years behind this, but just solved some range problems I had at home by using my existing Airport Express as a range extender in addition to a remote speaker, as explained in an article about Linksys WRT54G, Airport Express, and WDS.
-
Forget about extending WPF data-binding support
Databinding in WPF is implemented in the Binding class, which in principle looks like just a MarkupExtension. A MarkupExtension is a core piece of XAML markup "magic". It's rather simple, though:
-
Why the iPhone is not ready for prime time
My "baseline" phone is my Nokia N95, so my quality and functionality bar is high. I'll go straight to the point here:
-
How to develop WPF applications in VS2005 and VS2008 simultaneously
In order to develop WPF apps in VS2005, you must install the corresponding CTP tools for it. These will basically bring in some new project templates, project types, MSBuild taks and designers. The designers are quite slow, and don't always work as expected. Being a CTP, and with VS2008 ("Orcas") already in the beta phase, I don't expect these to be updated anymore. Wouldn't it be great if you had a choice to use VS2008 or VS2005 with the same project files?
-
UNLOCKED iPhone is HERE
Finally, it's free and for everyone: http://iphone.unlock.no/
-
Where are all the power outlets in airports???
I can't believe that we still have to "fish" for the few power outlets on airports, and frequently end up sitting on the floor, on a remote corner, below a phone booth, or next to a trash can.
-
How to cross post entries across blogs from Windows Live Writer
I think I'm not the first guy to end up in this situation: I created a lot of content (and loyal readers) on some blog hosting site (in my case http://weblogs.asp.net) and now I want to move on, maybe with a self-hosted solution, maybe with Blogger and its custom domain support, whatever.
-
How to get a gazillion XAML clipart for free
You surely know XAML subsumes pretty much all of SVG, right?
-
PowerShell with TFS: how to perform batch-updates to WorkItems
-
How to use C# typeof in Powershell
Have you ever missed C#'s "typeof" while working with PowerShell?
-
How to override system default styles in WPF
You should typically use system defined styles for your controls, such as:
-
Running cleanup powershell command from MSBuild for Team Build Continuous Integration
Team Build is great, with its tight integration into the WorkItem tracking feature of TFS. It can be setup pretty easily to do continuous integration and I use a modified version of the Team Build RSS Feed generator so that I get a nice (authenticated) feed with entries like:
-
Reading XML document fragments in .NET
A document fragment is an XML file that doesn't have a root element:
-
Setting HTTP headers in .NET: This header must be modified using the appropriate property
If you're trying to set HTTP headers such as If-Modified-Since (to do conditional GET based on the previous request Last-Modified response header, which you should strive to do as much as possible), you may come across this error message.
-
I couldn't care less about documentation
I've been subconsciously hunt by this statement I made during the last MVP Summit among a bunch of very smart people, specially because I'm pretty sure I was misinterpreted as I didn't have a chance to explain my assertion.
-
QNames in attribute values considered useful
Quite some time ago (around XML raise as a universal data format), the W3C seemed to be in doubt of the value of QNames (prefix + local name) in attribute values.
-
Connect to VPN on Vista: "This connection requires an active Internet connection"
Pretty much every day, I get the following stupid dialog from Vista when I'm trying to connect to a VPN:
-
How to talk to your baby before she can talk
About half a year ago, Scott Hanselman got me into baby signing. He was so enthusiastic about it that he succeeded in infusing the same excitement in me. I have a 15 months-old daughter Aylen (and a 3 year-old one too, Agustina), which was about 11 months back then. Make sure you read his initial post on baby signing...
-
Open source implementation of Simple Sharing Extensions (SSE) is available now!
SSE is an XML micro-format and corresponding sync algorithm that can be embedded in RSS or Atom feeds to allow for two-way synchronization among peers. More important: the algorithm allows for mesh-style synchronization between nodes, with no concept of a "master" copy. This can be game-changing for data-exchange and app-level data interop. But only the future will tell....
-
Fighting diabetes is a worthwhile goal, and you can help
I've learned more about diabetes and the current status of technological and medical advances on the area thanks to Scott Hanselman. People I know who's not as geeky as you and me (i.e. they don't read blogs ;)) have also benefited from this.
-
Dependency Injection and Object Composition put to practice
Note: this entry has moved.
-
Extending VS just got a TON easier
Note: this entry has moved.
-
Should we publicly debunk misbehaving companies?
Note: this entry has moved.
-
Beware of Hotel Kappa in Mestre/Venice - Tener cuidado con el Hotel Kappa en Mestre/Venecia
If you happen to go on vacations to Venice, you probably know that it's generally a good idea to stay in a hotel in Mestre, which is cheaper and is about 10' from there.
-
Download Orcas March 2007 CTP
A new Orcas CTP is out, but if you don't want to push all those "Download" buttons, here are the direct urls:
-
Team Foundation Power Toys, Vista compatible!
Note: this entry has moved.
-
Linq to XSD: strong-typed XML data models!
I'm very pleased to see the direction the XML team took with the new Linq to XSD preview. Basically, it's xsd.exe, but generating classes on top of Linq to XML (or XLinq, XElement and friends). This is pretty cool, because it gives you all the power and productivity of a strong-typed object model, while still allowing for the freedom of manipulating the underlying untyped XML.
-
ARCast.net - Mobile Client Adaptive UI
Note: this entry has moved.
-
I'M IT!
My turn to jump on this blog-game via EdJez, Scott Hanselman and Pablo Galiano :)
-
Building Software Factories Today
Software factories is an elusive concept nowadays. In this article, I will try to help you understand which technologies can be used today to build production-quality factories and the reasons for the perceived inconsistency in the tools and the vision on Microsoft's part.