Posts
808
Comments
668
Trackbacks
1
Monday, August 30, 2010
cqrs for dummies – an interlude – Greg Young’s sample app

Greg has posted that he has created a sample app for CQRS, which you can find here.

It is indeed called “SimplestPossibleThing” and it’s pretty accurate, but it is good code to review.  I especially like “InfrastructureCrap.DontBotherReadingItsNotImportant.cs", I mean, come on, what else would you look at first.

Seriously though, it’s important to see a simple implementation of all of the main components.  Check it out.

posted @ Tuesday, August 31, 2010 1:33 PM | Feedback (0)
I Like Windows Home Server

I took my computer into the place I bought it, so that I could get them to figure out why it won’t turn on.  I’m hoping it’s just the power supply that’s crapped out.  Turns out there’s a six day waiting list till they even get to it, but out of stubborn principle, I’ll wait.

<rant>there are just certain things I don’t want to do anymore, damn it.  I used to be a line cook (though a friend of mine is/was a chef, I never got that bug, which is probably a good thing, because being in the food industry, for most people, for the most part, largely sucks.  I have nothing but respect for the people who get up and work in front of 500 degree ovens on the line, often at two places, so 8-16 hours a day sometimes, day in and day out, week in and week out, in many cases immigrants making a better life for their kids.  They are fantastic people.  I just don’t want to do that sort of thing anymore), and amongst the many tedious jobs was peeling and deveining shrimp.  Brings down food cost to have manual labor do it.  But I’m an adult now and if it costs me an extra buck or two to buy it already stripped, I’m doing it damn it.  Same thing with computers.  I’ve opened waaaaayyyy too many computer cases in my time, and unless it is something like adding a video card, I don’t want to.  So if I have to a stupid $70 diagnostic fee and wait six days because I don’t want to replace a power supply, I know it is a waste of time and money, but damn it, I don’t care.  But I digress.</rant>

The likelihood that I will actually wait for six days without just buying a new computer and copying over any data not backed up is pretty close to nil (I’m guessing in about 4 hours I’ll surrender), so one of the things I’ve been doing is checking to see what exactly gets backed up automagically every night.

As it turns out, apparently just about everything.  It’s sweet.  I’m not sure how they do it either.  I keep Outlook open all the time, and normally that locks the .pst files.  Nope, backed up.  SQL Server data and log files?  They’re in the backup. 

Of course, I won’t know for sure what’s up till I attempt a restore, so I’m copying over my entire ‘My Documents’ folder to another machine to see if the mail files load, but it looks like, short of hibernation files and the like, it copies the entire damn hard drive.  Sweet.

Now, to try to resist dropping a grand on a new rig……..

posted @ Tuesday, August 31, 2010 1:11 PM | Feedback (0)
An effective test strategy

Jimmy Bogard has a good post up on LosTechies about the different types of tests you might run on a code base.

As he points out, categorizing different types of tests can be annoying, but he separates them into full-system, subcutaneous, and unit tests.

I’m long on record bitching about unit tests.  Unless you are building a framework, where you don’t know up-front how your framework might be used (users are fun that way), TDD is terrible.  Some form of ‘godawful syntax’ BDD type spec stuff is much better, since you know what the inputs will be from the end users (as fun as they are) and so that is all you really need to test, and it drives what your tests will look like (as opposed to the random “let’s create 8 vars and see what happens” method of testing TDD encourages.

I’m interested in his distinction between full-system and subcutaneous testing.  When building apps (like the web apps I’m typically working on), I prefer the full-system tests.  Those are what your users are actually doing and you can actually work with them if a spec fails.  When dealing with batch files, I also prefer full-system tests (there’s almost nothing more useless than a TDD-style test of a batch file process).  At the same time, I have also used (what I didn’t know what to call) subcutaneous tests, where you are, more or less, testing your system end-to-end but without UI interaction.  To use a simple example, if you are testing tax rate calculations, it’s often really important to know that the ‘behind the scenes’ processing is giving you the right tax information for a given order, and there’s no need to drive this from a UI.

In any event, I think it’s a good read.  Check it out.

posted @ Monday, August 30, 2010 8:35 PM | Feedback (0)
Reminder: Check your backup strategy

Backups are great, but only as great as the last time they were tested.

I run multiple machines on my home network, but one is always designated as the main one, and sure enough, it bit the bullet Sunday night.  I think it is only the power supply.  At least I hope so, because if it is the motherboard, pain is in my future (well, more pain than getting the power supply changed, something I used to be able to do in my sleep but which I now pass off to the store I bought it from because I am old and slow and stupid).

Because I use Windows Home Server, most everything is backed up automatically each night.  At least I think it is, that is one of the things I’m verifying now.  The code that I am working on is distributed on multiple machines (albeit manually most of the time) so I’m confident of that part.

Especially if you aren’t running a multiple machine home network, are you confident your important data is being backed up?

posted @ Monday, August 30, 2010 8:19 PM | Feedback (0)