An agile project retrospective - tips for your (and my) next project

Insanity: doing the same thing over and over again and expecting different results. Albert Einstein I recently finished another agile development project and we ran some really great retrospectives over the 9 months, along with a thorough review at the end. We captured lots of data and feedback and I decided to pick out the best and publish them in the hope of not making the same mistakes in future....

June 7, 2016 · 5 min · 1015 words · Alastair Crabtree

Choose the right return type for WebApi controllers

WebApi controller actions can return a variety of response types: HttpResponseMessage, IHttpActionResult, CLR objects and then the Task based variety of each for async actions. But which one is best? And how do we unit test them? Lets look at each in turn and examine why IHttpActionResult is usually the right choice. Synchronous controllers returning objects The simplest web api controller can directly return the object in question. Say you have a ProductController that is concerned with CRUD operations on Products, it might have a method like the below:...

May 30, 2016 · 4 min · 661 words · Alastair Crabtree

LazyCache: The easy way to add caching to your .net app & make it fast

tl;dr If you need to speed up your c# application you probably need to add caching, and the easiest way to do that is use the source library I wrote called LazyCache. Do I need to cache? Lots of apps don’t need caching because web servers and databases are fast. However many apps get to a point where performance becomes an issue, and adding caching is one easy way to get a significant performance boost....

May 23, 2016 · 7 min · 1282 words · Alastair Crabtree

Smoke test windows authenticated sites with Octopus Deploy

After deploying a website don’t assume it succeeded - add automated tests to check everything works. Back in the old days you would open a browser and check your new version of the site works - make sure IIS is running, the app pools starts, your database login credentials are valid etc. A human sanity check is always good - i still do it often - but ideally I want to know during deployment if something simple like that has caused the deploy to break the system....

May 5, 2016 · 4 min · 643 words · Alastair Crabtree

400 (Bad Request) when pushing a package to Octopus Deploy using nuget push

Stumbled on a little gotcha today when using nuget packages as deployment artifacts to be send to Octopus Deploy and thought it worth documenting so i don’t forget next time. The quick answer is that you cannot push the same package and version to the built in octopus deploy package repository - if you try you get 400 (Bad Request). Our build process goes a little like this: Install the Octopack nuget package in each deployable project in the solution Compile the solution using Teamcity and msbuild, specifying the octopack build property to output packages msbuild MySolution....

May 4, 2016 · 2 min · 242 words · Alastair Crabtree

How to build a Visual Studio 2013 or 2015 solution on a build server using NAnt

In VS 2013+ msbuild moved out of the core .net framework and is available as a separate install for build agents know as “Build tools”. You need to be aware that MsBuild has moved path for studio 2013 and 2015 - the path of msbuild in 2015 is C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe (moved from C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild.exe in 2013 and C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe in 2012 and before). More info on the studio blog from 2013....

March 22, 2016 · 2 min · 232 words · Alastair Crabtree

Sites worth reading for .net developers | Mar 2016

Some stuff I have read in the last couple of weeks that I think are worth checking out, mostly new but some old stuff too. All worth subscribing to. ASP.NET Core is approaching its full release and the polish is starting to shine. Using Kestral it passed node in some benchmark perf a while back, and now it’s getting silly. 1 million requests a second | ageofascent.com 3 top notch free videos from Thoughtworks and Martin Fowler, especially the last one on microservices....

March 16, 2016 · 2 min · 298 words · Alastair Crabtree

What should I look for when doing a code review?

In addition to my previous post about how to do better code reviews below is a list of specific things to watch out for during code reviews, in no particular order: All the CI builds are green The diff/pull request should be small enough that it is reasonable to review it in under 30min - avoid giant whitespace changes. The entire app build is scripted and available with one click/script CI builds are clearly named and well organised, with separate build/test, deploy and acceptance tests stages Deployment is 100% automated New code does not introduce unnecessary duplication....

March 11, 2016 · 3 min · 428 words · Alastair Crabtree

How to do a code review without it being awkward and painful

Code reviews, the process of showing your hard work to another developer and having them tear it to shreds, are often an unloved part of the modern development cycle. The project manager asks why you would change the working solution, the tester refuses to test something twice, and you have to make your colleague admit on closer inspection their masterpiece has an awful double chin. However it doesn’t have to be that way; code reviews can become part of the daily process and you and your colleagues might start looking forward to showing each other work and sharing knowledge....

March 7, 2016 · 4 min · 675 words · Alastair Crabtree

Sites worth reading for .net developers | Feb 2016

Some stuff I have read in the last couple of weeks that I think are worth checking out, mostly new but some old stuff too. All worth subscribing to. The command line tooling shipped with git for windows is pretty useful, even if you are not using git itself. I often find myself dropping into the bash shell for ls, touch, less, and grep and Matt Wrock gives another useful tip....

February 29, 2016 · 2 min · 320 words · Alastair Crabtree