Monkey see, monkey do; occasionally monkey learn.
TwitterRSS Feed

Monkey see, monkey do; occasionally monkey learn.

random posts from a semi-sentient simian (heroku)

microservices

Microservices... Where to Start?

Micro-services are becoming a "thing" now and are probably de-facto when someone begins a new project and are thinking about hosting in the cloud but where do you start when you have a brown field project. Now I don't have any hot answers or amazing insights here all I can do is describe what my first "micro-service" was and how it came into being. Over time the application was getting more use and the number of servers involved started to increase; we were using auto-scaling and the number of
Shaun Wilde
Shaun Wilde
3 min read
open cover, tdd

Excluding code from coverage...

This may (no guarantees) turn into a series of posts on how to refactor your code for testing using simple examples. This particular example came from a request to add an "Exclude Lines from Coverage" feature to OpenCover [https://github.com/OpenCover/opencover]. Now there are many ways this could be achieved, none of which I had any appetite for as they were either too clunky and/or could make OpenCover very slow. I am also not a big fan on excluding anything from code coverage; though OpenCov
Shaun Wilde
Shaun Wilde
2 min read
open cover, tdd

A simple TDD example

I recently posted a response to StackOverflow wrt TDD and Coverage [http://stackoverflow.com/a/26152423/189163]and I thought it would be worth re-posting the response here. The example is simple but hopefully shows how writing the right tests using TDD gives you a better suite of tests for your code than you would probably write if you wrote the tests after the code (which may have been re-factored as you developed). "As the [original] accepted answer has pointed out your actual scenario reduce
Shaun Wilde
Shaun Wilde
2 min read
api, cloud

The API Journey for AccountRight Live

My talk at ALT.NET on designing the MYOB API. "Building an API for your product isn’t just about choosing your technology and planning your scaling capabilities when you unleash it upon the world. For nearly 2 years MYOB have been developing an API for our AccountRight Live product and we would like to share with you our journey into making an API that is used by our own products, such as PayDirect, and one that our developer partners can also use productively - “Integrating with the MYOBapi ha
Shaun Wilde
Shaun Wilde
1 min read
cloud

Customsing New Relic installation during Azure deployments

For about a year we've been running New Relic to monitor our WebRoles running on the Azure platform. Installing has been quite simple by following the instructions initially found on the New Relic [https://docs.newrelic.com/docs/dotnet/] site and is now available via Nuget [http://www.nuget.org/packages/NewRelicWindowsAzure]; however two things about this process have been irking me. First, I wanted to be able to distinguish the CI and Production deployments in the New Relic portal by making th
Shaun Wilde
Shaun Wilde
4 min read
api, review

Book Review - Building Mobile Applications Using Kendo UI Mobile and ASP.NET Web API

I've written a book review on 'Building Mobile Applications Using Kendo UI Mobile and ASP.NET Web API' and posted it up on CodeProject [http://www.codeproject.com/Articles/696464/Building-Mobile-Applications-Using-Kendo-UI-Mobile] . Summary I liked this book and I took a lot from it that I am now using to build that sample application using KendoUI [http://www.kendoui.com/]. If you want to learn about ASP.NET Web API then this book isn't for you and you'll learn a lot more from the ASP.NET Web A
Shaun Wilde
Shaun Wilde
1 min read
codeproject, open cover

Getting code coverage from your .NET testing using OpenCover.

Introduction OpenCover is a free, open-sourced [https://github.com/sawilde/opencover], code coverage tool for .NET 2.0 and above running on the .NET platform. It supports sequence coverage, branch coverage and has a cover by test facility. Though OpenCover is command line only, a rich HTML UI of the results can be visualized using ReportGenerator [http://reportgenerator.codeplex.com/]. We will aim to demonstrate how you can use this utility to get visibility into your testing coverage. Backgro
Shaun Wilde
Shaun Wilde
3 min read
open source

Application Tracing

So OpenCover [https://github.com/sawilde/opencover]is as feature complete as I care to take it at the moment, I may do this one feature involving Windows Store applications [https://github.com/sawilde/opencover/issues/144] should I have a need for it, and I decided to not continue with OpenMutate [/2012/02/mutation-testing-use-for-re-jit] as I can't really find a need for it other than an exploratory investigation into reJIT. I do have one more itch to scratch when it comes to profilers and tha
Shaun Wilde
Shaun Wilde
2 min read
mongo db

Creating a simple NodeJS app with Mongo

Okay, I woke up this morning (6am) with a need to create a simple reporting dashboard to display the coverage results from OpenCover when it dog-foods its own tests. Now that OpenCover has no **_reported _**bugs, I decided to use my spare time to investigate other technologies for a while. What I needed was simple 'online' storage to capture results from the build system and the ability to extract that data into charts. Normally I'd probably knock up a simple rails app because it is easy to do,
Shaun Wilde
Shaun Wilde
1 min read
mongo db

MongoDB, Mongoid, MapReduce and Embedded Documents.

I am using Mongoid [http://mongoid.org/en/mongoid/index.html]to store some data as documents in a MongoDB [http://www.mongodb.org/]database and then run some MapReduce [http://en.wikipedia.org/wiki/MapReduce]queries against the data. Now I have no trouble with mapping data from normal documents and an embedded document but I could not extract data from an embedded collection of documents i.e. class Foo include Mongoid::Document #fields field :custom_id, :type => String #relations
Shaun Wilde
Shaun Wilde
2 min read
agile

The "Pigs" and "Chickens" fable

I think anyone who is anyone who has heard of Agile and Scrum have heard of the Pigs and Chickens story and how it describes those who are committed to the delivery of the project, as "Pigs", and those who are just involved, as "Chickens"; if not click on the image below and learn more about it. [https://en.wikipedia.org/wiki/The_Chicken_and_the_Pig]However I was just recently re-reading "Death March [https://www.amazon.com/Death-March-2nd-Edward-Yourdon/dp/013143635X]" by Edward Yourdon (1st E
Shaun Wilde
Shaun Wilde
1 min read
open cover, open source, github

Mutation Testing; a use for re-JIT?

Where to start... Mutation testing is described [http://en.wikipedia.org/wiki/Mutation_testing] as modifying a program in small amounts and then executing the original 'passing' tests that exercise that code and then watching them fail. It is a way of making sure your tests are actually testing what you believe they are testing. Setting the stage... So how can we do this with .NET? Well first we need to know what tests execute what code and we can use OpenCover [https://github.com/sawilde/openc
Shaun Wilde
Shaun Wilde
2 min read