Back in 2010, Josh Smith proposed that design-time data could, and probably should, participate in the entire Service/Model-ViewModel-View pipeline.  That, at least, is how I read it.  The theory goes that the “entire system” does not need knowledge of “run-time” vs. “test-time” vs. “design-time”.  That may be true in the intermediate layers, but it strikes me as very wrong to involve Model-to-ViewModel processing when all you’re looking for is sample data for design-time. To me, a proper separation of concerns would say that if the designer (Blend or the Cider designer in Visual Studio) needs to invoke any application code in order to show the UI being designed, something is wrong.  What if the data access layer or Model-to-ViewModel code is being worked on by another developer?  What if there’s a bug?  Does that mean that the UI work should be completely blocked?  Clearly, that’s an ... [More]
I’ve used Subversion and TortoiseSVN for quite a while, and even have the free Standard Edition of VisualSVN Server set up on my Windows Home Server, but I wanted to see what Mercurial was like. Having tried TortoiseHg and thoroughly enjoyed using it, I decided to make the complete switch. There are several blogs that have covered some of the parts of setting up Mercurial and hgwebdir, notably by eWorld.UI by Matt Hawley, DJMatty and Vampire Basic. My impression, however, is that these were written by folks who assumed a fair amount of pre-existing knowledge about Python and/or had a different configuration in mind. I really have no Python experience, so it was a bit more of a struggle to get all the right pieces in place. Further, I particularly wanted to be able to use Windows Home Server to securely host my repositories for both home and remote use under an “hg” virtual directory. This particular configuration didn’t seem to be covered in any one definitive source. What follows is ... [More]
For general scripting/automating on Windows, I generally prefer PowerShell.  There are times, however, when “batch scripting” with CMD.EXE is needed.  If you’ve ever tried writing scripts of any complexity, you know that “batch scripts” can be a real pain to deal with.  In particular, expansion of variables happens by default when a command is read, which is not what many other scripting languages do.  Raymond Chen has a nice post describing this in further detail. For this reason, it can be useful to turn on delayed expansion if you’re doing anything even remotely interesting.  One of the unexpected downsides — or bugs, in fact — of delayed variable expansion is that the ‘!’ character seems to eaten… so if you have a command you’re calling that uses a ‘!’ in its syntax, you’re plain out of luck.  The good news is that you can use the delayed-expansion behavior to... [More]