Crane-Kick

This is a story of a crane (the endangered kind that live in marshes) named Masha. Masha liked programming, and figured she could make a living slinging code from the marsh. She worked at a couple of gigs and picked up C#, and was going to make it big by creating the next MyBeakSpace (or something like it ‘but better’.) Masha had a friend – a duck that went by the name of Dan. They met while working on some projects together at Noisy Reeds Software, where Dan was a project manager. Dan the Duck used to program, but was drawn more to the idea and business side of software development – so lately he’s been freelancing and looking to strike it big with one of his endeavors.

Masha remembered chatting with Dan about a web site proposal he had during happy hour one time, and seemed to recollect that it was actually pretty decent – worth trying out as trial project. So Masha met Dan, they agreed to some terms, started a small LLC, and figured they could have an Alpha version of their web client deployed in about a week.

Dan saw that the marsh residents needed a system where users can post questions and be notified when someone answers them. Then they can mark one answer as the answer, while other users vote answers up/down.

While listening to Dan and nursing a pint, Masha was thinking how this already entailed some things. The easy thing for them to do would be to create a drag and dropped UI with a designer and just add all the code to the ‘code behind’. Dan was launching into registration (“all the standard features: login, forgotten password, email verification”,) while Masha considered the alternative to the “disposable prototype” architecture, she preferred – a little framework that she cobbled together out of approaches and practices she read in books and pieced together from blogs.
Masha was sure that any useful application grew in functionality over time and figured that meant constant change in requirements. Masha believed that if the design couldn’t be re-factored safely to accommodate the new features, she’d be forced to ‘hack’ – write code without consideration for future needs, write code without good tests. Remembered having to do this, Masha quickly pulsed (and having to work with the product later!) with a ice cold hatred (she was a White crane.)
While Dan was winding down his quacking about how it’d be nice to ‘edit’ questions that you posted, Masha started framing his vision in terms of requirements -
“So Dan – I can register and start posting questions, then I can edit them and people can answer them. Everyone (registered, right?) can vote, but I can also ‘mark as answer’. That sound good for the first iteration?”
Dan quacked agreement and waddled off after another pitcher, Masha cracked open her laptop and started adding a Visual Studio solution. Visual Studio was her dev environment of choice, and she used TFS for the application life-cycle, source control and issue tracking. It was expensive, but usually worked as advertised.

Masha had built up a library of code she liked to bring from project to project, but this probably wouldn’t require much in the way of that, at least not initially. First she had to write some tests – they made her feel confident she was building the right thing, and the effort would pay off later in numerous ways.


Job Scheduler

Turns out that we implemented a general-purpose long-running job/process scheduler. Without tests of any kind. WTF? No Quartz.net. No WF. No Persistent Domain events. Oh well.. I guess that’s how it usually unfolds. To that i’m thinking – why don’t I make a little application for the world?


Do everything the best, simplest way you can, and approach it with neverending inquisitiveness and optimism

http://i.imgur.com/73Rfp.gif


I hate MSBUILD

Just wanted to throw that out there. MSBUILD is great, unless you want to use it for C#, Silverlight, ASP.NET deployment, 64bit, TFS.. u know – anything useful.


MS Unit projects from NUnit

We needed to convert some Nunit projects to MS Unit. After some minutes trying to figure out why Visual Studio 2010 wasn’t treating the Project as a ‘Test Project’, we found this line in the .csproj file of an existing MS Unit project – <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> Added that – and all of a sudden all the


C# Lambda Expressions For Safety

I wanted to do something like this: var user = _repository.FindByPropertyValue<IUser>(u => u.UserID, "pavel"); I wanted to make sure that there weren’t any typos on the property name, and I swear I’ve seen this all over the place (but only MVC 2 comes to mind.) I figured you just pass the Expression in.. and then


Cost Reduction

Your job as a programmer is to reduce costs. BTW, call yourself whatever you want – software engineer, developer, code monkey – you’re a programmer. Your job is to write and maintain software. There are costs that you’re trying to alleviate with the software itself – it will make it easier for [Actor] to perform


Silverlight

I thought Silverlight was going to be a magic bullet. But instead it’s kinda glam.. I like the idea of server-side generate XAML though.. my favorite markup generator currently is ASP.NET MVC, so maybe I can bend one to serve the other.


Exceptional Error Handling

What are exceptions? Go look it up. What aren’t exceptions? Incorrect user input, business rules not being met, etc. In other words, events that you can and should plan for your application to handle. To make concrete. Not an exception: User age < 10. Not an exception: Phone number entered with/without dashes during registration Exception: