Posts

Currying and Closures

Just a quick one Closures might be well known amongst many C# practitioners - apart from  me it seems. I read about them ages ago and then haven't knowingly applied them.  Of course, I have been using them  (or at least a variation on the theme) often in C# by virtue of using 'lambdas in lambdas' when using LINQ for example, and lambdas which refer to variables in the method in which they are created.  I mentioned functional programming including Currying in the last post, and this is still my current focus, its satisfying my ADHD for the time being.   Anyway, It turns out that if you want a bit of a better understanding of how Currying works,  then understanding closures can help you  take a leap of faith.  Currying in Haskell The following example is taken from Learn you a Haskell The function multiplies 3 numbers together and returns the result. The  first line defines a function, multThree,  which can be read as  taking 3 arguments and returning a valu

Functional programming and blind adoption of 3rd party software.

Training I was lucky enough to have had the pleasure of attending an introduction to Domain Driven Design, CQRS (coined - in part at least - by the presenter himself)  and Event Sourcing by Greg Young at Skills Matters in London last week.   It was snappy, contentious - at times - and very informative and definitely gave me  a lot of food for thought, I now have a reading list as long as my arm.    As an added bonus, the people who attended, as well as Greg himself, were approachable and easy going, as the beers after will testify to.  The background to me getting on this course,  is that we are currently going through a massive set of architectural, infrastructural and cultural  change at my current employer, and this course has set me up to be asking more searching questions and provide input on some of the stuff we are currently doing and are planning to be doing soon. I'm not going to write about any of the above though, a quick search will elicit a million articles, and

SSDT March 2014 Static Code Analysis Extensibility

Static Code Paralysis. Coding standards (and more latterly styles) in any organisation of any size are liable to incite religious wars and makes zealots out of even the most considered or apathetic of us.   Inconsistency and subjectivity,  lack of enforcement and heavy handedness all contribute to the contempt often leveled at them.   Sod it. I say sod all that, if you or your company aren't using static analysis tools  then you are missing out on improved code quality and productivity (borne out from a consistent approach) and reducing the most banal and mind numbing conversations and sometimes pissing contests associated with discussing the minutiae of standards.   As an aside, having a few years under my belt  in the industry  I've found that people who "really" moan most about this are usually rabble-rousing morale sappers who like to moan about everything, so it stops them doing this and maybe might lead to them getting on with work instead! Makes thin