The coding blog of Alastair Smith, a software developer based in Cambridge, UK. Interested in DevOps, Azure, Kubernetes, .NET Core, and VueJS.
Last night, a new community was formed in Cambridge. Nearly 20 software developers congregated for the inaugural meeting of the Cambridge Software Craftsmanship community, and the feedback on the event has been excellent.
I’ve been attending the London Software Craftsmanship Community (LSCC) for the better part of a year now, and have thoroughly enjoyed the events that Sandro and Samir put together there. The group has gone from strength to strength, and is now the largest Software Craftsmanship community outside of the US.
About six months ago, I toyed with the idea of starting a similar group in Cambridge. I put out a call on Twitter, but had little response so put the idea on the back-burner for a little while. Then, whilst attending a couple of LSCC events in April, a few of the practitioners there suggested I start up a more local group. I put out another, firmer, call on Twitter, and this time the response was much more favourable: the seeds had been planted. With people like Sandro, Jason Gorman and Dave Green (a former LSCC organiser) offering support and encouragement, I knew this idea had legs.
And then, for a while, it stopped. I spent most of May in the US (those blog posts are still coming…) and everything ground to a halt. The momentum was not lost, though: even whilst I was away, the group was at the back of my mind, gestating. I knew that I wanted to model the group on the LSCC, to try and replicate its success, but how much did I want it to be a cookie-cutter group? I decided to adopt two of the meeting formats that LSCC run, the round-table discussion and the hands on sessions as the initial programme. On my return to Cambridge, I signed up to Meetup as a group organiser and put a little bit of flesh on the bones of the group: we now had a place to congregate online.
A month ago, I officially launched the group, advertising it on Twitter, and taking advantage of the free promotion through Meetup to similar groups. I was blown away by the response: within two days, 15 out of the 20 places to the first meeting, a round-table discussion session, and by the end of that week we had hit 30 members! Clearly the group had struck a chord.
Next I had to arrange some sponsorship: a key ingredient of the round-table discussions is free pizza, and feeding 20 hungry developers is not cheap! I’ve been injecting the craftsmanship ethos into my team at work for a while now, so I wanted to give my employer, Granta Design, first refusal on the opportunity. I’m very happy to say that we are sponsoring the group both through providing a space for the group to meet at our offices near the station, and in providing the pizza and drinks for the evening.
The day of the meeting soon came around, and there was a lot to do: buy the necessary supplies, book the pizza, set up the space, etc. Thank you to Ceri, Adrian and Sean for their help beforehand and to them and everyone else who helped clear up afterwards too! We had a few introductions whilst waiting for the pizza to arrive, and some small talk over pizza. The round-table discussion itself kicked off a little while later, and this took the format of an open space-style discussion: topics were provided by the participants, and then the group voted on the ones they wanted to discuss. We then broke into two groups to discuss Functional Programming, and Legacy Code.
Both discussions seemed very fruitful: I participated in the Legacy Code discussion, and took away some new information on tools that can be used with C++ for static analysis, unit testing, and code coverage. The Functional Programming group came back very enthused, with one member even saying they wanted another one!
It was also interesting listening to the particular problems that developers working with C and C++ run into, especially those in embedded software. There does seem to be less available in the way of tooling for C and C++ developers than there are for managed languages like C# and Java; I guess this is just the nature of the beast when you’re writing code that runs on the metal itself rather than inside a runtime.
After the round-table discussions, everyone re-grouped in the main area and we had a little bit of a discussion on the expected programme for the group. This is a summary of my short-term plan:
However, these are just my ideas, based on where we are now; as the group grows and evolves, we’ll adapt the programme to suit the group. The monthly hands-on sessions in particular I am keen to open to both members of the group to lead, and to bring in luminaries from the Craftsmanship movement to lead as well.
In the meantime, our next meetup will be another round-table discussion, to be held at Granta Design on Tuesday 7 August. Keep an eye on the Cambridge Software Craftsmanship website, and the #CamSWCraft hashtag on Twitter for more information!
I’m really looking forward to seeing where the group goes from here. We’ve had an auspicious start, and the feedback from last night’s event suggests we have a group of developers passionate about their craft on our hands. Exciting times!
DDD South West 4 ran a couple of weeks back, and I was lucky enough to be amongst the attendees. Here’s a round-up of my experience.
Compulsory opening statement: It’s been a little while since I last blogged, and there’s a level of irony in that fact because now I have rather more to blog about than I did before. In the last few months I’ve been working with a small handful of guys from my GiveCampUK team to launch GiveCRM. Whilst we were all quite fired up to be working on it over the course of the GiveCampUK weekend, not everyone wanted to carry on with it beyond that event, and not everyone has had time to dedicate to it. Such is the nature of open source, I guess.
So we ran into a little bit of bother with some pull requests to GiveCRM: I had submitted a feature that had been merged in, but it was subsequently lost (in part) when a later pull request was merged in. It seems the submitter of the later pull request hadn’t updated from the central repository before submitting his pull request, so when his pull request was merged my feature was overwritten.
My experience with Git is almost entirely as an individual developer, so I’m learning how to use it in a distributed team as we go with GiveCRM. I turned to my friend, colleague and resident Git expert Adam Wood for some advice.
I am going to open this blog post with a bold statement: GiveCamp UK was one of the greatest experiences of my life. Here's my story.
So earlier today, I posted on Twitter that Meanwhile, I’m quietly shitting myself about #givecampuk which is in just two days’ time!
This prompted a slew of replies, not least from Paul Stack, one of the GiveCamp UK organisers, who said
“I wish there was no nerves over #givecampuk - we are all in the same boat - noone is better than anyone else :)”
There was some discussion on this topic a few weeks back, which Paul addressed in an excellent blog post at the time, essentially stating that no one person knows everything about software development, and everyone (including the likes of Scott Guthrie) considers themselves to be learning from other people all the time.
Here’s the thing: I get all that, and I agree with it; the continual learning process is why I love this career that I’ve chosen as much as I do. But still I’m nervous. Why?
Paul said that GiveCamp UK is “NOT A JOB INTERVIEW” (emphasis his), and I do agree with that statement, but I think it is like the first day of a new job. It has the same unknowns: people, project, product, practices and processes, and in that regard I think those nerves I’m feeling are perfectly healthy. They’re the same nerves I felt when I started at Granta a little over a year ago. They’re the same nerves I feel when I play a solo bassoon gig. They’re same the nerves I still feel sometimes when playing an orchestral gig. They’re the same nerves I’m feeling for my new role leading a small Agile team at work. It’s not so much performance anxiety (although there is certainly an element of that) as jitters fuelled by excitement and the unknown; it’s the build-up of adrenaline as I get to face another great challenge.
GiveCampUK is going to a fantastic experience and, most likely, a massive rush. These nerves are just the start of it.
Here’s a handy trick I discovered whilst fixing a bug. You can initialise a collection from another collection and add new items to it as follows:
[gist:1219663]
Note that the collection initialiser on AllFoo
runs before the constructor, so the Foo
created with constructor parameter 4 will appear first in AllFoo
, followed by everything in BaseCollectionOfFoo
in the expected order.
Very often when I’m writing a script in PowerShell, I will need to obtain the directory in which that same script resides. This is sadly not completely trivial in PowerShell, but the following function achieves the desired result:
[gist:1215274]
Hopefully, having created a gist for this and blogged about it, I won’t have to keep resorting to Google in future to remind me how to do this. This particular version was posted to the PowerShell Code Repository by Andy Arismendi.
I’ve just been reading Brad Wilson’s latest blog post, Interface Attributes != Class Attributes, and hit upon this interesting nugget regarding the implicit implementation of interfaces in .NET:
Implicit implementation (as seen above) is when a class implements the method/property in question as a public method or property on the class. It’s important to note that this method/property is NOT the same thing as the interface method/property; it merely has the same signature, and thus can be used to implicitly create the implementation of the interface. In reflection terms, the two are distinct and different.
Hum. I did not know that.
I encountered a couple of issues moving on from the Ruby chapter of Bruce Tate's book *Seven Languages in Seven Weeks*: 1. Io does not currently compile, 2. Prolog installs to an odd location.
I was struggling to find a way to pretty-print a JSON string in .NET. I already have the excellent Json.NET package available and after a bit of hunting, I came up with this:
[gist:1152445]
It wasn’t obvious how to do this, for some reason - I spent a while investigating the JsonReader
and JsonWriter
classes to no avail.
Hope this helps you too!
In preparation for CAMDUG’s first ever Dojo yesterday, I worked through the Leap Year kata, which I had intended to run in the first session, “Introduction to TDD”. I ended up swapping it out for the Roman Numerals kata, because I got through two iterations of the exercise in about 20 minutes. However, I thought it would be useful to share the problem and my approaches to it with my readers.
At NxtGen’s Fest event back at the beginning of July, I bought a copy of Bruce Tate’s excellent and highly-regarded book Seven Languages in Seven Weeks. The aim of the book is to teach you seven new languages (in seven weeks!) to change the way you think about your code and the languages you use in your day-to-day job. Each language covered (Ruby, Io, Prolog, Scala, Erlang, Clojure and Haskell) approach problems in a different way: Ruby is a pure object-oriented language with dynamic typing, for example, whilst Haskell is a pure functional language; Scala bridges this gap somewhat, whilst Prolog resides in a completely different paradigm all of its own (logic programming); Erlang is great for multi-process applications, underpinned by a philosophy of “let it crash”; Clojure is an implementation of Lisp for the JVM, and I’ve never even heard of Io.
You can track my progress through the book via the GitHub repository I set up for it.
Yesterday, CAMDUG, the Cambridge Developer’s Group, ran its first coding dojo generously hosted by my employer Granta Design (we’re hiring!). Rooted in the principles of Software Craftsmanship, dojos bring developers together to sharpen their Test-Driven Development and Design (TDD) saws. Like musicians practising their scales, kata are exercises for developers to instil muscle memory.
CAMDUG was joined for the first time by members of the London Software Craftsmanship Community including one of its co-founders, Sandro Mancuso who was gracious enough to cross-promote the event to his own members. Thanks Sandro! The mix was approximately 50:50 which brought us an interesting diversity of primary languages too: ~50% Java, ~30% C#, ~10% Python and ~10% Haskell. This was particularly good for CAMDUG as we originally started out as the Cambridge .NET User’s Group and expanded the remit about eighteen months ago.
I spent some of this evening watching the video from Microsoft Research on their Project Roslyn, the codename for the Compiler-as-a-Service functionality they’re developing for .NET vFuture.
Today I spent most of the day pairing on a task with another developer. This is unusual for our company (the usual arguments fears are raised) but we both found it a useful experience. Here’s what I learned today.
As part of the pairing scenario, I suggested using a ping-pong test-first approach:
We found this a useful approach that allowed us both to build up a picture of the system as we developed it: both developers have to work out the tests and implementation, either by writing the failing test or by making the test pass. I have since found (as is usually the case with TDD) that we have exceptionally high code coverage: 100% nearly everywhere.
Progress was possibly a little slow given that I am a relative novice to TDD and my partner is even more so. This is what I learned from the process, that I’m trying to feed back into my personal TDD style:
I’m really loving my job at the moment. We’re hiring, so why not come work for us? We have graduate roles, senior roles, and ASP.NET roles. We have the widest range of teas in Cambridge.
At the end of May, I attended the Software Craftsmanship Conference 2011 at Bletchley Park, near Milton Keynes. As with the 2010 conference held in October this event proved to be well worth attending, although sadly (and counterintuitively) the weather didn't really allow for tours of the Park this time. Thanks to Jason Gorman, the speakers, and the folks at Bletchley Park for organising and contributing to the event, and to the volunteers at Bletchley Park in particular for braving the elements to offer us tours of the historic site. Read on for a summary of my day...
Well, you might have noticed a change of look around here. Over the weekend, I upgraded this blog to Drupal 7, which was released a couple of months ago.
So this afternoon I’ve been attempting the first of The Pragmatic Programmers’ kata. This is a modelling-only exercise, designed to get you thinking around a problem. You’ll need to be familiar with the kata in order to get the most out of this post, so I’ll go get a cup of tea whilst you go read up on it.
Anyone who has ever learnt a musical instrument will tell you of the pain of learning scales and arpeggios. Those that stuck with their instrument will tell you that these are the constructs around which all music is based, defining which notes sound right or good within a given key. The most common keys in classical music are grouped into major ("happy") and minor ("sad"); other musical forms have other scales, such as modes and blues.
Over the weekend, I attended DDD9, a really excellent and free event for developers. The event was held at Microsoft’s office in Reading, but was not a Microsoft event: Microsoft employees are forbidden from speaking. This really is the premier developer event in the UK.
I may do a round-up of the day here shortly, but in the meantime, I wanted to re-visit a topic I’ve touched on here before: the SOLID principles, and specifically the Single Responsibility Principle (SRP). One of the sessions I attended at DDD9 covered the SOLID principles in some depth (thanks, Nathan!) and this triggered a thought I’d had previously regarding the first of these principles, the Single Responsiblity Princple.
I'm a big fan of TekPub and its thorough video tutorials on a wide range of development topics from frameworks like ASP.NET MVC and Ruby on Rails to building apps for the various mobile devices, to their free series such as key development concepts.
This evening I attended an event at entitled "Inside the Mind of Oren Eini". Oren is probably better known to you as Ayende Rahien, prolific blogger, Open Sourcer and general all-round legend in the .Net community.
Back in November, I attended the Agile Testing and Behaviour-Driven Development Exchange (BDDX) at Skills Matter in London. Here is my very delayed write-up of the event.
John Graham-Cumming, a prominent British programmer, has kickstarted a plan to build Charles Babbage's Analytical Engine. John has put out a request for funding for the project: it is a truly mammoth undertaking and will not happen easily or cheaply. John has estimated that it will take £500,000 to complete. He is asking for only £10 (or dollars, or euros, or whatever your local currency is) from each donor. Please pledge a tenner of your own and help get this vitally important and worthwhile project underway. Read more about Babbage's Analytical Engine.