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 Vaughan, a prolific author on The Code Project and winner of many awards for his articles. Daniel is also well-travelled and, as it turns out, made a life-changing connection right here at The Code Project. Read on to find out more.
Who are you?
My name is Daniel Vaughan. I am an Australian living in Geneva, Switzerland, which is in the French speaking part of the country. I provide consulting to clients in Switzerland, the US, and elsewhere.
I’m the author of the upcoming book Windows Phone 7.5 Unleashed, which will be out around Christmas 2011.
What do you do?
Recently I’ve been working on a tool for multidimensional databases in the area of finance. The tool allows the user to prepare multidimensional queries; to retrieve and store subcubes, using a drag and drop designer, and to coordinate activities using a custom WF process designer.
I've also been working with another client creating a command-and-control system for airports, police departments, fire brigades, ambulance centres and industry. In particular, a tablet and Windows Phone based implementation of the software.
I work a lot on an open-source project called Calcium. I have been extending the framework greatly over the last year to the Windows Phone platform, which I plan on releasing at about the same time as the book comes out.
There's also the Windows Phone Experts group on LinkedIn (with over a thousand members) that I manage.
Of course, a lot of my time over the last year+ has been spent writing Windows Phone 7.5 Unleashed.
This year Katka and I are starting a new company. By year ten I hope to have sold it, or made it largely self-sufficient, and hope to be spending a lot more time on the beach.
What is your development environment?
My development environment primarily includes Visual Studio 2010, ReSharper, and .NET Reflector. No surprises there.
My principal programming language is C#. I use my own Calcium framework a lot, which leverages Prism. For Windows Phone development, I use a soon to be released ‘light' version of the Calcium SDK which doesn't depend on Prism.
I live out of a laptop, though my current one is quite beefy. It is a Dell M6600 with 16gig RAM, an SSD primary drive, 750GB hybrid secondary HD, and a 2.2 GHz Intel i7 processor. Having a laptop is essential for the type of work I do, and it also allows me to jump on a flight and work while hanging out in Majorca, Prague, or wherever.
These are tremendously interesting times for developers working with Microsoft technologies. There's a lot arriving with Windows 8. Exploring WinRT is something I am doing now. I'm looking forward to using the Roslyn (compiler as a service) project in conjunction with WinRT to do something interesting.
What is your coding pet peeve?
Misuse of the C# "as" keyword is a pet peeve. Often you see code that uses "as" in place of what should be an explicit cast, like the following:
string foo = (bah as Person).Name;
If bah is null, a NullReferenceException is raised. If bah is not a Person, however, a NullReferenceException
is also raised; which is bad because you cannot tell if it was one or the other. This is better code:
string foo = ((Person)bah).Name;
The cause of the error is not hidden, and an InvalidCastException is raised instead.
I don’t like seeing single line if statements like this:
if (condition) return;
It makes code harder to read because your eye must scan to the end of the line to determine the logical flow of the code. It’s the same principle as designing good forms, where titles should be placed above, rather than beside, input controls. I recall reading a study where it traced the eye movements of respondents (here’s another take on the subject), and people took longer to fill in forms where titles were placed on the left alongside response fields. There you go.
I don't like underscores as prefixes such as "_someField
". I used them myself for a couple of months back in 2003, but soon switched back. I find them distracting and they make code less readable. I also challenge you to find the underscore character on my English-mapped Swiss French/German keyboard.
How did you get started programming?
As a kid, at the age of about 9, I was enamored by my classroom's Apple IIe. It was a boxy yet somehow beautiful machine, which, for a few minutes each day, we were allowed to use to create and print line drawings. I drew a samurai sword, because samurai are cool.
I also found myself hanging out a lot at my friend's house, whose dad owned a business selling MicroBee computers. I went on to convince my mother to buy me a Commodore 64, for which my friend never forgave me.
What could I do? At 64 kB it had twice the RAM of the MicroBee.
Like many, I didn't start out as a developer. Or perhaps I did, but certainly not in my working life. I initially wanted to fly aircraft, but I broke my neck in an accident when I was a teenager. Though I was young and recovery came easily, I was unable to take up an aviation course because of restricted movement in my neck that made passing the physical for the course impossible. I'm okay these days, and you'd hardly know that my noggin is wired on.
After the accident I went traveling, and met my future wife, fellow CodeProject author Katka Vaughan, in the Czech Republic.
Later I returned to Australia, studied Biology at the ANU, dropped out, and then eventually went back to uni to study computer science, which was more my thing.
My early days in software development, in the late 90s, involved creating Macromedia Flash/Director UI and ASP websites, during which I studied for my degree.
Around 2001 I landed a part-time role as a Java programmer at the National Library of Australia. I remember doing some Struts-related work, and creating an XML and ANT-driven Java application generator. I had XSLT coming out my ears.
After I completed my degree I left the library to go freelance, and worked on my first commercial product in .NET. Those were very early days. Eventually, I found myself working as a contractor for various government departments.
In 2007 I won the CodeProject Visual Studio 2008 Competition for an article on grid computing with Silverlight. This was a turning point for my career, and the generous prize money enabled Katka and I to shoot to Fiji to get married. It was a CodeProject wedding.
After those early articles, I got quite a few job offers from around the world. I eventually took one up, which led Katka and me here, to Switzerland.
The high level of camaraderie in .NET online communities still amazes me. I could be wrong, but it seems to be more prevalent in dev communities, as opposed to many other vocations. I've also greatly appreciated the assistance and encouragement that has been shown to me in my own open-source projects.
What advice would you offer to an up-and-coming programmer?
I have two, though they sound a bit holier-than-thou, it's the best advice I can give:
First, read code from well-respected open-source projects that you are interested in. If you don’t read code, you will not be any good at writing it. Identify and familiarize the software design patterns used in the project.
Second, write articles. I see a lot of developers wondering how to advance their careers. Writing articles to advance your career is the world’s best-kept secret! It also helps to publish them right here on CodeProject. ;)