C#

BDD with Cucumber, and some word-play

During a recent technical interview, I was asked to write: a snippet of code to test whether a string was a palindrome the ...Read more

Hello ‘Centred Moving Average’ – How very different the source code is in different programming languages!

As part of a data size reduction and chromatogram smoothing PoC project, I needed to implement a Hello World 'Centred Moving Average' algorithm on a ...Read more

RTFM System.Threading.Semaphore

I recently had the task of debugging a piece of C# that had been translated from C++ by a colleague. All I was ...Read more

SELECT * FROM TABLE(Oracle REF CURSOR)

Below is the most trivial of C# applications that generates an enumerable anonymous class collection, and spits out the content to the console. ...Read more

Der Hund beißt den Mann

Embedded deep in the psyche of kiwis my vintage is a fear two things: a) the 'Murder House', a place where en-masse dental nurses filled more than ...Read more

C# Often Surprises Me, part: 000001

The C# specification is clear, the language documentation second to none, and there are few surprises about language behaviour or .Net framework on a ...Read more

(String) letter frequency in LINQ

How would you determine the frequency of letters in a string using C#? If your mind naturally wandered down some abstruse solution involving loops ...Read more

Flattening a Dictionary of Lists with LINQ

I am quite fortunate in that being a Freelance Contractor, I can pursue only work that interests me. It is always a bonus when ...Read more

.Net/C# objects are immutable! Repeat after me, it’s a lie!

Being a Contract Developer, or Freelancer should you prefer, you find yourself constantly going to interviews, proffering your skills, and undergoing an obligatory technical interview quiz. ...Read more

‘SELECT’ing a distinct set of values from CSV :- LINQ and Regex

Over the past couple of years, I have found myself refactoring a lot of code written by others, spaghetti code, and often written ...Read more