Welcome to our continuing series of Code Project interviews in which we talk to developers about their backgrounds, projects, interests and pet peeves. In this installment we talk to Daniel Godson (aka .dan.g., aka AbstractSpoon), author of perhaps the most popular article on CodeProject: ToDoList.
Who are you?
My name is Daniel Godson (aka .dan.g., aka AbstractSpoon). I live and work in Sydney, Australia, having emigrated from the UK in 1997. My employer for the last 8-9 years has been Maptek Pty Ltd, a leading global software house developing 3D visualisation and planning software for the global mining industry.
Before I left the UK I was a fully qualified structural engineer, living and working in London.
What do you do?
I love to write tools that simplify my life. Almost all the projects I have worked on and then published are tools that I originally wrote for myself before seeing a possible value for others.
When I first taught myself C++ I wrote a bunch of Windows shareware to fill niches that were apparent to me. Two of these were:
WorldTime, giving access to the local time in all of the 200-odd countries in the world,
TimeOn, which tracked time/money spent on dial-up internet connections.
DeskMenu, which provides menu access to the contents of the desktop from the notification tray on the taskbar
DeskMenu I use every day, but unfortunately WorldTime and TimeOn were made obsolete by the modern internet and I no longer use either.
In my first real developer job, having just moved to Sydney, I wrote:
VSSReporter, to provide more advanced reporting functionality for VSS,
ProjectZip, which takes a VC6 workspace (dsw) and zip all the associated files into a single zip,
MiniSpy, a cut-down Spy++ which displays the attributes of a any window under one of its corners.
I still use MiniSpy and ProjectZip weekly.
Finally there is ToDoList, which I have been working steadily on for the past 10 years and which shows no sign of stopping. For those who like metrics it contains 300,000+ lines of code.
And apart from having to deal with the occasional challenging user, it's been source of fun throughout. I've had to adapt the architecture a number of times due to design limitations I imposed at an earlier time and I genuinely believe that it's a better written and easier to understand (not saying it's _easy_ to understand) piece of software 10 years on.
I've remained disciplined in using its exposed extension points to develop my own extensions in an attempt to produce a more weakly coupled and easier to debug architecture.
What is your development environment?
I develop on Windows 7, running an 4-core hyper-threaded, 3.5 GHz machine with 32 Gb ram and 750Gb storage and twin 24" screens each running at 1920x1080.
We develop primarily in C/C++ on VS2010, occasionally falling back on VS2005 for older versions of our software. Some parts of the software use perl, but I try to avoid those parts at all cost!
In stark contrast, I develop primarily on Windows XP (triple booting also to Vista and Windows 8), running a single core, 2.3 GHz machine with 2 Gb ram and 300 Gb storage with a 19" screen running at 1600x900 and a 17" screen running at 1280x1024.
I write exclusively in C/C++ on VC6, leaning heavily on MFC and Win32. For compatibility I try to ensure my code also compiles on VS2008.
I have a folder containing 60+ Windows dev tools that I have accumulate over the years.
What new tools, languages or frameworks interest you?
To be honest I'm a bit of a stick-in-the-mud when it comes to new things. I know what I like and I like what I know. That being said I do understand that it's in my interest not to get left behind wrt to my employability.
So my goal in the near future is to learn how to interface C# to C/C++. I know Nish has written a number of articles on C++/CLI that is the glue between C++ and C# but I've always been stumped by how to handle some of the trickier marshaling that my specific needs have, namely that of writing C# plugins for a C++ app.
Fortunately I have a very bright co-worker who has agreed to assist me in this endeavour, interestingly the only one of my co-workers who also writes software as a hobby outside of the office.
What is your coding pet peeve?
- I love whitespace, both vertical and horizontal.
- I always locate braces on their own line to simplify scanning code blocks.
- I use standard Microsoft naming conventions at home and camel-case at work.
- I try to code unrelated conditions as separate conditional statements to avoid confusion.
- I try to always use meaningful variable names, both as class members and locals.
- I try to avoid massively indented logic, preferring to have multiple function exit points instead.
- And finally, so as to try to stimulate a flame war, I prefer meaningful return codes to exception handling.
How did you get started programming?
I was first introduced to computers at university in 1983: Fortran on a mainframe computer. It was a very painful experience because the process of writing, compiling and coding was so disjointed: i wouldn't find out I'd made a coding mistake until the next day when the I got my next timeslot.
However, in parallel with that, I was also introduced to Basic on the BBC Micro also at uni, and I fell in love almost at once. The simplicity of the language, and the wonderfully iterative nature of developing with an a interpreted language was positively joyful. Before long I convinced my parents to fork out for my own BBC Micro and then the late nights programming began.
I stayed working with Basic, later on an Archimedes, and then on an IBM PC, right up until the release of Windows 95 when I realised that if I wanted a career in programming I was going to have to learn to program on Windows. Then I taught myself to program in C/C++ and the rest is history.
How has the developer community influenced your coding?
I have been gifted so much by the developer community as a whole and CP in particular, and despite what I see on the news each day, I know that most people are decent, hardworking and generous because that's what I also see every day on the many websites I visit.
The only downside I've experienced is a the occasional abruptness and/or defensiveness in communication, when someone's ideas are questioned. And I know this because I have been one of those people. But it's amazing what 10 years of shipping software with bugs will do to chip away at the ego!
Where do you see yourself in 10 years?
Work wise I hope to still be programming (I'll be 58) because that's what I love and what I'm best at. I'm very fortunate to have an excellent employer and great co-workers, and if I keep performing to best of my ability I can't see myself wanted to change.
At home, I would like to think that ToDoList will still be actively developed, primarily in the form of extensions.
If you had one piece of advice for an up-and-coming programmer?
Wow, where to start!
- Try to write your best code all the time.
- Try to constant re-evaluate your code looking for ways to improve it, especially by refactoring it into more re-usable and testable blocks.
- Try to avoid cut'n'paste: the long term consequences are truly awful!
- Try to write de-coupled code as much as possible.
- Who would you like to see us interview?
- Over the 10 years I've been working on ToDoList, a number of personalities have appeared and then hung around on its forum. These people have spent countless hours of their time testing alphas and betas, working up test-cases, proposing improvements, without which ToDoList would never have been able to develop into the mature and (relatively) bug-free software it is.
.dan.g. is a naturalised Australian and has been developing commercial windows software since 1998.