Last Updated: 15/July/2013
This page basically attempts to bring together my knowledge and experience when it comes to languages, frameworks, technologies and all that jazz. Expect it to be pretty informal, I want something I can point people too when I want them to see what really makes me tick as an engineer. I expect it to be filled to the brim with opinions and if you don’t agree that fine but I’d love you to tweet me and explain why 🙂 I like to think of myself as pragmatic rather than dogmatic so I’m always willing to hear why I might be wrong!
This is the language I use most in my day job at Microsoft (big surprise) and luckily it’s actually my favorite. C# brings together everything good about Java, fixes all the bad things and supports all sorts of amazing stuff. Getting to work with C# on a daily basis was one of the biggest attractions to working at Microsoft for me. It has one of the greatest architects in the business behind it. I like C# because I can work on a well-established programming language that supports all the neat stuff the niche functional and OO ones do.
What I like:
- Static strong typing with optional dynamic implicit typing – I like static typing because it provides a degree of safety that dynamic typing doesn’t provide and also allows for powerful static analysis and precompiler checks that can lead to really, really solid code. However, there are times where code like Object objName = new Object(); code can waste a lot of space, so C# lets you use the var keyword to determine and infer type information at compile time. Dynamic typing also has it’s uses so theres a dynamic keyword too.
- Recognisable syntax – C# looks familiar to most programmers. I actually never learned C’# from a book or course, I just took my existing Java knowledge and dived in. This means you can be certain there’ll be someone ready to carry on the legacy of your codebase should you ever move on from it.
- Awesome IDE with extensions and a package manager – Yeah, we’re gonna talk about VS, because it’s awesome. Why? Speed. I can get VS all configured to the way I like it in about 5 mins compared to about half an hour for eclipse and about 2 hours for sublime text 2. One essential extension Jetbrain’s ReSharper though there are plenty of free alternatives available. Another for me is Code Contracts which I’ll get to right now.
- Code Contracts – I have a defensive programming style which I will likely elaborate on in the future, but basically if your functions are only supposed to take an int between 0 and 100 and a non-null string, then that function should fail at the earliest opportunity. In Java, this lead to be writing EXCEPTIONAL code. And by that, I mean you had damn well protect against invalid I/O or you’d know all about it!
C# has code contracts, with is an MSR project that provides static analysis to ensure preconditions are respected throughout your code base. It is amazing, and unlike Apache Commons or Guava in Java, it’s all precompiler checks so there’s zero hit on performance.
What I don’t like:
- Mutable C-like standard library – I want to write code like var reversedString = reverse(“test string”); but the stdlib method for reversing an array is void and doesn’t return. This means if I ever do this in code I usually write a small utility function that encapsulates this process. Pipelining function calls is one of my favorite ways to reduce code bloat and I wish that some areas of the stdlib were more like pythons.
This document is a work in progress and is nowhere near complete. I feel all my LinkedIn does right now is provide a tag database of things I know, but it might give you a better idea of my entire skill set until I get this done. Take a look.