Tuesday, March 25, 2008

A Delightful Business Model

This post is not related to my current employer eCompliance. However, this post is related to many of my previous employers.

Wouldn't it be delightful to work in an environment where your salary is based purely upon friendship and the attendants of social functions. That's right, working hard and striving to be the best in your field are not predicts for success. These actions are frowned upon. After all, they don't help you climb the corporate ladder. So put that book down, turn your brain off and let's help someone else achieve their dreams at our expense.

Unfortunately, the business model described above is a sad reality. At one time or another we have all fallen victim to inconsiderate and greedy employers out to make a quick buck. Our hard work and dedication to our craft is exploited to help achieve the dreams and aspirations of someone else other than ourselves. This type of environment is characterized by: high turn over, water cooler talk, loss of passion and a never ending downward spiral.

Don't despair, there is a solution. In fact the solution is simple, find another job. Better yet, find a career. Find a career that allows you to perfect your craft. Some of you might be asking "but how do I do this Adam? ". To be honest, it's not easy. Here are a few options to consider:

  1. Become a consultant
    Consulting allows you to pick and choose the projects you work on.

  2. Find a company that cares about it's employees
    Start up companies often value and appreciate the hard work and dedication of its employees. After all, the success of a startup is very dependant on its employees. If startup's aren't your thing you can always work for a large corporation like Google, Microsoft or ThoughtWorks. If anything at least the aforementioned companies care about their employees.

  3. Win the lottery
    With the right amount of money you can spend your days perfecting your craft to your heart's content.

Don't get me wrong, there are negatives associated with each of the options stated above.

Aesop Rock is a underground hip hop artist who's lyrics helped to inspire this along awaited blog post.

9-5ers Anthem
We the American working population
Hate the fact that eight hours a day
Is wasted on chasing the dream of someone that isn't us
And we may not hate our jobs
But we hate jobs in general
That don't have to do with fighting our own causes

We the American working population
Hate the nine to five day-in day-out
But we'd rather be supporting ourselves
By being paid to perfect the past times
That we have harboured based solely on the fact
That it makes us smile if it sounds dope

The complete lyrics can be found here
more on Aesop Rock

Monday, March 24, 2008

Polymorphic PodCast

I just stumbled upon a new podcast called Polymorphic Podcast. Polymorphic is hosted by Craig Shoemaker. I'm still trying to figure out if shoemaker is his real last name. The podcast series focuses on software development in the .Net industry.

What I like about the podcast is that Craig seems like a down to earth type of guy. Unlike the .Net Rocks series there are a fewer number of podcasts. To be frank I have no Idea how Carl Franklin and Richard Campbell have time to record two podcasts a week. On another note the .Net Rocks podcast audio quality is vastly superior to polymorphics. I also enjoy the fact that the polymorphic series show length is about 30 to 45 minutes long and doesn't include commercials for Telerik products. I really enjoy the .Net Rocks series but can't stand to hear those commercials. I think the problem stems from that the fact that I have been listening to the .Net Rocks series non-stop for the last several weeks and those commercials are driving me nuts.

You can find the polymorphic podcast at http://polymorphicpodcast.com/

Sunday, March 23, 2008

A Filing Cabinet For Design Documents

From here on out, this is where I'm going to keep my design documents.


Tuesday, March 18, 2008

The Ultimate Whiteboard

Here are a few pictures of our whiteboard. April 1st 2008 ThirdAngle is moving to a new office and I think we may have to leave our whiteboard behind. There is no doubt that we will have to hire a team of about 20 people to build another ultimate whiteboard. Sadly the materials need to build such a whiteboard can only be found on the outer most reaches of Calgary.















Last but not least here is a photo of us building our monolithic whiteboad.



Sure it's not the prettiest office but we have a really big whiteboard. Come to think of it, it's not an office but a studio. To find out more check out Mo's thoughts on the office vs the studio.

Sunday, March 16, 2008

NAnt FTP Task

I came across the NAnt FTP task while automating the deployment of an application. This task is not included with NAnt. However, NAnt has made it really simple to install third party tasks. You can download the NAnt FTP task from:  http://www.spinthemoose.com/~ftptask/

To install this task you will need to do the following:

  1. Unzip the bin contents to your folder of choice. My choice was tools/nant/tasks/ftptask/

  2. Leverage the loadTasks task in your build file to load the assembly:

    <loadtasks assembly="${tools.dir}\nant\tasks\nantFtp\ftptask.dll" />

  3. That's it. Your finished. You can start to use the FTP task.

Here is an example of how I used the NAnt FTP task.

<loadtasks assembly="${tools.dir}\nant\tasks\nantFtp\ftptask.dll" />

 

<connection id="liveAuditToolConnection"

        server="YourServerName"

        username="Umm Your User Name"

        password="Umm Your Password" />

 

<target name="upload.application.only">

  <echo message="The application is being deployed to the live server"/>

  <ftp connection="liveAuditToolConnection" connectmode="PASSIVE">

    <put type="bin" localdir="${clickonce.dir}" remotedir="" flatten="false">

      <include name="${version}/**"/>

      <include name="setup.exe"/>

      <include name="index.aspx"/>

      <include name="${app.exe}.application"/>

    </put>

  </ftp>

</target>

Saturday, March 15, 2008

test.what.I.want target for NAnt

Allow me to introduce the test.what.I.want target. For this post I'm going to assume that you have or are using NAnt with MbUnit.

A special argument

The MbUnit application provides a very special argument called /filter-namespace. If you haven't guessed it yet this argument allows you to filter a suite of tests by a namespace.

mbunit.cons.exe /filter-namespace

An awesome target

The test.what.I.want target is very straight forward. The target first amalgamates the xunit.console.args property and the the namespace.to.test property into a single property called xunit.args. Next MbUnit.cons.exe is executed with the arguments supplied by the xunit.args property. The awesomeness of this target is categorized by its reusability.

<target name="test.what.I.want" depends="test.compile, test.copy.dependencies"

 

  <property name="xunit.args" value="${xunit.console.args} /filter-namespace:${namespace.to.test} "/>

 

  <exec basedir="${tools.dir}\mbunit\bin"

    useruntimeengine="true"

    workingdir="${build.dir}"

    failonerror="false"

    program="mbunit.Cons.exe"

    commandline="${xunit.args}" />

 

</target>

The bat file

This is where the magic happens. In order to make our test.what.I.want target dynamic we need a way to override the namespace.to.test property. Thankfully, the Nant.exe allows you to supply an argument that can override the value of a property. This argument is simply called "D". "D" is my new best friend. His only purpose in life is to set the value for a given property and he does it like nobodies business. Taking advantage of D's sick skillz we can achieve a level of dynamicisim never thought of before. D will allow us to change the namespace.to.test property to any namespace space we desire to filter by.

typical build.bat

@echo off
tools\pskill.exe notepad.exe (not typical but check out my previous posts to learn why)
tools\pskill.exe Ec.Aasp.OfflineTool.exe (not typical but check out my previous posts to learn why)

cls
tools\nant\bin\NAnt.exe -buildfile:Ec.Aasp.OfflineTool.build -nologo -logfile:build.txt %*
echo %time%


test.bat leverages build.bat
build -D:namespace.to.test="%*" test.what.I.want

Just incase you your new to bat files the %* is a placeholder for an argument.

An example using test.bat
>test Ec.Aasp.OfflineTool.Test.DataAccess

Expanding on this target

Now that you have this wicked little target, how can you take advantage of it.

  1. The first and most obvious benefit is that you can now test a single namespace on the fly at the command prompt. This comes in very handy when you want to test just one part of your project and you have not created an additional target. 

  2. Using this new target you can easily create additional targets. For example, here is a target that I recently created to only test the domain.

    <target name="test.domain" depends="test.compile, test.copy.dependencies">

      <property name="namespace.to.test" value="Ec.Aasp.OfflineTool.Test.unit.Domain" />

      <call target="test.what.I.want" />

    </target>

  3. Why not create more bat files. Lets face it, reduced key strokes equals increased productivity. Instead of typing "build test.domain" why not type "domain" or "test.domain". With our new test.bat file we can eliminate creating additional targets in our NAnt script. We can eliminate the test.domain target by leveraging the test.bat file.

    domain.bat leveraging test.bat
    test Ec.Aasp.OfflineTool.Test.Unit.Domain

    From the command prompt just type:
    >domain

Your creativity does not have to be limited to C# or your programming language of choice. NAnt, batch files, SQL, etc are all venues and opportunities where you can flex your creative muscles.

Thursday, March 13, 2008

Tests run: 1805, Failures: 0, Skipped: 0, Ignored: 0

This post is slight delayed but I figured it deserves some mentioning. We have been working on our current application for about 5 months. With each iteration our velocity for writing tests has been steadily increasing. Three months ago our development team consisted of roughly four developers. Today we only have two developers. Even though we are down two developers we have been able to surpass the number of tests that we could write with four developers. Now I know what your thinking, the other two developers were no good. Your wrong, the reason our test numbers have been increasing is that we have been ramping up our skill levels. When the other developers return I'm sure that we will be able to double our test numbers.

Anyhow our current number of tests is 1805. The important thing to remember is that tests are not the only metric for success. If you look closely at the agile principles I'm sure you can figure the other ones out.

Thursday, March 6, 2008

Domain Driven Design In a Nutshell

If you know anything about domain driven design, you know that the domain is the heart of your application. It is the warm little centre that the life of your project crowds around.

Jeff Palermo is the man. Jeff eloquently explained on DotNetRocks that he has a problem with layered architectures. Each layer talks only to the layer below it and so forth. This is the traditionalist view of a system architecture. Jeff likes to think of a system's architecture like an onion. At the core of the onion is the domain model. The layers around the domain model provide more functionality. This extra functionality can include persistence, reporting, aggregating concepts into different forms and much more. The outer most layers of the onion deal with human interaction. The outer most layer of an application could be a command window, windows form, web app, the buttons on a toaster. The neat thing is that if you peel away all the layers of the onion you are left with the domain model. In my opinion the domain model is king. Whenever, I have a new story to work on I focus on the domain first, then the UI and lastly everything in between.

(It kind of looks like an onion, but it most likely is crop circle.)

Map image

Saturday, March 1, 2008

Alan Turing

Alan Turing said:

"A man provided with paper, pen and rubber and subject to strict discipline with no understanding of the problem, should be able to solve any solvable problem."

I said(as a joke):

"A programmer provided with frameworks, wizards and drag and drop controls with no understanding of the problem, should be able to build any software application."