Unit Testing with Object Mothers

Unit tests are exciting enough (or not!)

We don’t need long and convoluted test code to obscure the features we’re actually testing.  So instead of newing up objects directly in our tests, we can use separate code called Object Mothers.

Martin Fowler (https://martinfowler.com/bliki/ObjectMother.html) explains that Object Mothers are nothing but canned objects for unit testing.

Continue reading “Unit Testing with Object Mothers”

Screen capture made easy

I write software for a living, and all software needs to be documented.  There’s no better way to document step by step instructions than by using pictures.  Or you can write a thousand words.  Your choice!

I don’t always have time to take a screenshot, then paste it into a graphics editor, then annotate, then save as, then upload to Confluence, Google Docs, etc.

I started using Greenshot to capture the exact screenshot, then annotate and paste to Jira, Confluence or Google Docs, without the intermediate steps of saving it to my PC. Continue reading “Screen capture made easy”

Remote Desktop Connection Manager

When supporting my code in production, invariably I need to connect to a remote computer via RDP.

The built-in Windows Remote Desktop client has a few quirks:

  • It’s not possible to zoom or scale to fit inside the client width
  • It opens on random monitors, sometimes full screen and sometimes not
  • It produces ugly scrollbars when moving from one screen to another, or when resizing

My needs are different:

  • I want my RDP sessions to adapt to my screen size
  • I want to manage 20 or more servers with minimal configuration
  • I want to easily switch between RDP sessions

Then I found Remote Desktop Connection Manager Continue reading “Remote Desktop Connection Manager”

Externalise your configuration

It’s never a good idea to store configuration in code.  Not even in constants, or a transformed config file.

I found that whenever we had the need to create a new environment, we often forgot to update the web.config transforms or the constants in code.  And then there’s always a frantic series of hotfixes to get the correct settings into the code base.  There’s also a security risk when sensitive data lives in a code repository.

Let’s be honest.  We deploy to many environments like: Continue reading “Externalise your configuration”

What a neat profiler – Stackify Prefix

When I run code, I always want accurate metrics.  I find that I can’t improve what I cannot measure.

But it’s quite hard to debug code that transcends several code bases at once.  Perhaps you have a data provider, an API, an API client and also a UI.  While it is possible to debug them all at once in Visual Studio, there is a much better way.

Enter Stackify Prefix! Continue reading “What a neat profiler – Stackify Prefix”

Finding ConEmu

I love automating CI tasks with cmd or Powershell scripts, so that I get predictable results with every build or release.

But sometimes the Windows cmd terminal doesn’t feel like a 2017 app. Highlight, copy and paste are basic requirements for a modern application.  Grouping several cmd windows in tabs would be great too.

And then I found ConEmu! Continue reading “Finding ConEmu”