Skip to content

Instantly share code, notes, and snippets.

View GraemeBradbury's full-sized avatar

Graeme Bradbury GraemeBradbury

View GitHub Profile
@GraemeBradbury
GraemeBradbury / RomanNumerals.cs
Created March 8, 2018 17:49
RomanNumerals Convert to int
using System;
using System.Collections.Generic;
using System.Linq;
namespace Pairing
{
public static class RomanNumerals
{
// C# specification explicitly forbids explicit operator calls.
// So build our own.

Investing the Last Liberal Art

  • Ignore everything else on the list and come back when you've read this.
  • If it's slow going (it's dense as anything), dip into "Thinking, fast and slow" at the same time.
  • Yes it's about investing. Which is, at it's core, about making decisions in a non-familiar domain without the luxury of the time to become an expert. Basically the same core description of being in software. It teaches how to look at a problem and simplify enough to make a good (not perfect) decision. Then follows up with details on constructing hueristics so that the learning can be carried forward.
  • There is another book than this called "Poor Charlies Almanac" by Charles T Munger, but that can only be ordered direct from the mom 'n pop publisher in the states. You can also find his various speaches on the internet.

Thinking, Fast and Slow

  • Excellent book that digs into thinking and learning.

Release It

<UserSettings>
<ApplicationIdentity version="12.0"/>
<ToolsOptions>
<ToolsOptionsCategory name="Environment" RegisteredName="Environment"/>
</ToolsOptions>
<Category name="Environment_Group" RegisteredName="Environment_Group">
<Category name="Environment_FontsAndColors" Category="{1EDA5DD4-927A-43a7-810E-7FD247D0DA1D}" Package="{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}" RegisteredName="Environment_FontsAndColors" PackageName="Visual Studio Environment Package">
<PropertyValue name="Version">2</PropertyValue>
<FontsAndColors Version="2.0">
<Categories>
Usage basics eg:
multinode remote
Will run any tests in the remote multinode test dll (.
The script finds any Tests.Multinode.dll file that also includes the arg passed in the command line.
@GraemeBradbury
GraemeBradbury / gist:c14eb5133bb01f979328
Created April 2, 2015 12:03
Multiple asserts single detailed response
That's not really a pattern and more a tooling thing.
Sometimes scenarios have behaviour that has multiple aspects, which individually are worthless but together have worth.
So contrived scenario ahead
Given a Spline
When it's Retriculated
Then it beeps
And it flashes
using System;
namespace Blah {
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = true)]
public sealed class ValidatedNotNullAttribute : Attribute
{
}
public static class Guard
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace AsyncPlayground
{
class Program
{
@GraemeBradbury
GraemeBradbury / Darcula Color Settings
Last active August 29, 2015 14:02
VisualStudio and PoshGit Colours
<UserSettings>
<ApplicationIdentity version="10.0"/>
<ToolsOptions>
<ToolsOptionsCategory name="Environment" RegisteredName="Environment"/>
</ToolsOptions>
<Category name="Environment_Group" RegisteredName="Environment_Group">
<Category name="Environment_FontsAndColors" Category="{1EDA5DD4-927A-43a7-810E-7FD247D0DA1D}" Package="{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}" RegisteredName="Environment_FontsAndColors" PackageName="Visual Studio Environment Package">
<PropertyValue name="Version">2</PropertyValue>
<FontsAndColors Version="2.0">
<Categories>