Fog Creek

dev.life – Interview with Jon Skeet

In dev.life, we chat with developers about their passion for programming: how they got into it, what they like to work on and how.

Today’s guest is Jon Skeet, a Software Engineer at Google and long-time Stack Overflow contributor. Creator of Noda Time, a better date/time API for .NET, Jon is the author of the book, C# in Depth, and he writes regularly about coding on his blog.


jon_skeet
Location: Reading, UK
Current Role: Software Engineer at Google

How did you get into software development?

I started off with a Sinclair ZX Spectrum 48k – the original model with the rubber keys. The Spectrum manual was fantastic, with a detailed guide to Spectrum BASIC… so that was my first language. I remember the first program I was sufficiently proud of to show my parents – an enemy of some kind appeared, and you had to move your ship up and down then press space to fire at it. Obviously extremely simple, but I loved it anyway. I was probably 8 or 9 at the time.

zx spectrum

A little later, I used Logo on the BBC Micros at school. I enjoyed Logo, but we didn’t have a Logo interpreter for the Spectrum – so I decided to write one, with no understanding that this really wasn’t a project to be embarked on lightly. I was only 10 or 11 then, so I didn’t know any trigonometry – but the Spectrum manual explain the SIN and COS functions well enough that I could go from there. I ended up with a pretty respectable Logo interpretation, including variables, saving and loading programs etc.

When I was about 14 I wrote a little platformer game in BBC Basic on the school computers – and ended up getting most of my class doing level design on squared paper.

I’d love to see the code now – I’m sure it was horrible, but just seeing how a “younger me” thought about the world would be instructive.

So, I’m pretty much self-taught. I took Computing GCSE, but without going to lessons – looking back on it, my school was very accommodating. My project was the management system for the Worcester Half Marathon, written (very badly) in C. Our school performed all the registrations for the event, so if anything went wrong a secretary would interrupt whatever lesson I was in to come and get me for tech support.

Tell us a little about your current role

At Google, I mostly code in Java – but in the community you’re far more likely to find me writing C# code. In terms of community involvement, there are six areas I’m active in – although rarely all in the same period:

Of those, Stack Overflow is by far the most likely to pop up on any given day (with a probability of almost 1, even when I’m on holiday). The steps involved in answering a question vary greatly. Often I’ll drop down to a command prompt, open up Test.cs in the working directory (a mostly throwaway directory specifically for this sort of thing) and put together a little console app initially to reproduce the problem the poster is having, and then to fix it.

As well as being able to whip up a quick code sample, it’s also extremely handy to be able to pinpoint (and then quote) the relevant parts of language specifications or library documentation. Navigating around a language specification takes a little practice, but it’s well worth it – they’re fascinating documents, and the difference (in readability, completeness and elegance) between a good specification and a bad one is huge.

What are you currently working on?

Each of the aspects of community involvement has its own challenges, although the first two are probably easiest to describe. For Noda Time, it’s proved simultaneously fascinating and frustrating trying to format a Hebrew date properly (result: currently abandoned). For my beginners C# book, the current challenge is working out just how much to assume the reader already knows – assume too much and it will be too challenging; assume too little and readers will get frustrated reading topics they already know about.

Noda Time has also exposed me to the bigger challenge of what’s required for a useful open source project. In many ways, writing the code is the easy bit. There are many other concerns, some of which are specific to .NET but others are more general:

  • How do you balance a limited time budget between implementing features and writing great documentation or a compelling website?
  • When designing the API, how do you balance fitting in with potentially broken existing patterns vs creating new ones?
  • What’s the best way of generating API documentation for a .NET library, potentially including your own customizations?
  • What’s the best policy for strong naming with open source .NET projects? (Opinions vary significantly, each with its own good reasons…)
  • What versions of .NET is it worth targeting, including on the portable class library front?
  • How do you judge which use cases are important, without an existing audience?
  • How do you judge the importance of performance, and the trade-off between time and memory?

I wouldn’t say I’ve “overcome” any of these – they’re simply a continuing challenge.

When are you at your happiest whilst coding?

Various situations:

  • Micro-optimization is a lot of fun, even if it’s not always a good idea.
  • Anytime you can refactor to improve performance and reduce the size and complexity of the code and add then new features – that’s a special moment.
  • Debugging can often be really interesting although sometimes frustrating. In Noda Time there are lots of corner cases (e.g. a time zone which has its transition at 24:00 on December 31st for year X, so the transition actually happens when you’re in year X + 1) and trying to work out exactly what’s gone wrong can be a fiddly but rewarding business.
  • On the rare occasions when I know exactly what I want to do, and it’s just a matter of writing the tests and then implementing the production code, that can lead to a short period of bliss – until it transpires that I didn’t have such a clear idea after all…

jed editor

What is your dev environment?

For Noda Time, I’m currently using the Visual Studio 2015 Preview (we’re now using C# 6 features) with ReSharper. I’m considering changing to CodeRush at some point, when the Roslyn-powered version comes out – it’ll be interesting to evaluate, at least.

Currently, I’m working on a Surface Pro 3, which is a lovely little machine. I have the docking station, so when I’m at home I can still use my 27″ monitor, proper keyboard and mouse very easily. I’m still on Windows 8.1 – I haven’t tried the Windows 10 preview yet, though I’m sure I’ll upgrade when it comes out.

For unit tests, I’ve stuck with NUnit – I seem to have adopted most of the “reasons to change” of newer frameworks over time, so I’ve never felt much reason to change.

I use NCrunch for continuous testing, although I admit I haven’t got round to installing that on my SP3 yet. As I do a fair amount of coding on the train, in that environment I only run tests occasionally, as otherwise the battery life is reduced. It’s great to be able to see coverage and test failures on the fly when you’ve got power though.

For Java, I use Eclipse, and as I mentioned earlier I use a very light-weight text editor for quick console apps when answering Stack Overflow questions. That happens to be Jed but that’s mostly for muscle memory reasons – I’ve been using it since university. I don’t use any fancy integration in that – it has syntax highlighting and auto-indentation, but that’s about all I use. (It may well be capable of much more, but I’m happy enough to switch to the command line to compile).

When I code I’m usually sitting, either at my desk at home or on the sofa or on the train commuting to and from work. I don’t usually have music on, but that’s mostly because I rarely get long concentrated spells of coding anyway – and pausing the music for interruptions adds more friction.

What are your favorite books about development?

Although I’ve got a huge number of books about coding, I confess I haven’t actually read most of them. The book that sticks in the mind most is Effective Java, 2nd edition – a brilliantly written book with a lot of careful thought that C# programmers could benefit from too. I’d love to see a third edition covering many of the newer features of Java.

effective java

How do you stay productive and avoid interruptions?

I reject the premise of the question! I’m constantly interrupted, whether naturally due to other commitments (taking the kids to Cubs or Scouts, getting off the train etc) or because I can’t resist checking Stack Overflow every so often. I’m quite good at context switching though, which has proved very handy in a number of ways.

What technologies are you currently trying out?

I’m interested in Docker, particularly with the recent announcements about ASP.NET becoming more portable – and Windows itself being more Docker-ready in upcoming versions. It’s not clear to me whether Docker is going to be “the” container solution, or whether it will give the industry enough experience to come up with a better successor, but something like Docker seems likely to be very common in the future.

If you weren’t a developer, what else would you do?

No idea. I’ve expected to be a software engineer since I was about 12. I’d like to think that I could do something involving teaching or writing, but I can be quite impatient.

When not coding, what do you like to do?

Well, I have a wife and three kids, so there’s a lot of family time to think about – our kids are just old enough now that we’re starting to share the films we love with them, which is very rewarding. We love going to the theatre (I particularly enjoy Sondheim musicals) but that’s more of a rare treat than a regular outing.

I’m heavily involved in our local Methodist church – I’m a local preacher, house group leader, steward and I also run the A/V once or twice a month, so there’s obviously quite a lot of time involved there, although I try to make my faith part of everything I do rather than segregating my life into secular and religious aspects.

What advice would you give to a younger version of yourself starting out in development?

Find something you enjoy, and do a lot of it.

While I’m sure there are plenty of things I could have done better, I really do feel blessed with the experience I’ve had in life – there’s not a lot of it I’d change. I’ve worked with many wonderful people and been given far more recognition than I really deserve due to things like Stack Overflow.

 

Thanks to Jon for taking the time to speak with us. Have someone you’d like to be a guest? Let us know @FogCreek.