Journal Articles

CVu Journal Vol 27, #3 - July 2015
Browse in : All > Journals > CVu > 273 (12)

Note: when you create a new publication type, the articles module will automatically use the templates user-display-[publicationtype].xt and user-summary-[publicationtype].xt. If those templates do not exist when you try to preview or display a new article, you'll get this warning :-) Please place your own templates in themes/yourtheme/modules/articles . The templates will get the extension .xt there.

Title: Anthony Williams: An Interview

Author: Martin Moene

Date: 06 July 2015 21:53:02 +01:00 or Mon, 06 July 2015 21:53:02 +01:00

Summary: Emyr Williams continues the series of interviews with people from the world of programming.

Body: 

Anthony Williams is the author of C++ Concurrency in Action, and Director of Just Software Solutions Ltd. He has extensive experience developing a wide variety of applications for a wide range of systems, including embedded systems, Windows applications and web-based applications, which he draws on when advising clients or developing bespoke software for them. A strong believer in the benefits of TDD and agile methodologies, Anthony is always striving to find ways to minimize the code that cannot be tested.

How did you get started in computer programming? Was it a sudden interest in computing? Or was it a gradual process?

I started when I was about 7. We had a ZX81 at home, and BBC Micros at school. I used to program them in BASIC. I became hooked rather quickly. Often I would write programs on pieces of paper for typing in later because I didn’t have access to the computers as much as I’d like. Later on we had an Amstrad CPC6128 at home, and I used to program that in BASIC and assembly language (hand-assembled on paper). What really got me interested was the idea that I could make the computer do anything I wanted, if only I took the time to work out how. Seeing software others had written I would want to know how they did it.

What was the first program you ever wrote? And what language did you write it in?

The very first program I ever wrote was something along the lines of

    10 PRINT "Hello"

in BASIC. It’s amazing the feeling that such a simple thing can give you: I can type instructions and the computer will do what I say! I then wrote other simple BASIC programs, such as the classic animal-vegetable-mineral game.

What would you say is the best piece of advice you’ve ever been given as a programmer?

“Write copious unit tests”. It’s simple advice, but I didn’t really get it for a long time. Of course you have to test your code, but the importance of unit tests didn’t really sink in until I started reading about TDD and refactoring. With a decent set of unit tests you can be sure that your code is working now, and when you change something you can immediately see if you unintentionally changed the behaviour of something else. Combined with source control so you can easily get back to previous versions that’s incredibly powerful.

If you were to start your career again now, what would you do differently? Or if you could go back in time and meet yourself when you were starting out as a programmer, what would you tell yourself to focus on?

I could probably have done with a book on algorithms and data structures when I was starting out. Though it’s fun working things out for yourself, it can get in the way of achieving the end goal.

What was the biggest “ah ha” moment or surprise you’ve experienced when chasing down a bug?

I don’t recall any particularly momentous “ah ha” moments or surprises when chasing bugs. Often enough it’s more of a “D’Oh!” moment when you realise that you used the wrong variable in an expression.

A lot is said about elegant code these days. What would you say is the most elegant code you’ve seen? And how do you define what elegant code is?

Elegant code is clear, simple and concise. You can read it and easily understand what it does without needing any comments, but there’s nothing extraneous. Sadly, it’s often really hard to write elegant code! To a large extent, it’s the use of suitable abstractions that enables elegant code. Code written using the jss::actor class from Just::Thread Pro can be remarkably elegant, as can code written using just the STL, especially when combined with the C++11 range for loops, and lambda functions.

With technology moving so fast these days, where do you think the next big shift in computer programming is going to be?

I think Functional Programming is going to become increasingly mainstream, especially as parallelism grows, since it greatly simplifies parallel programming if you have side-effect-free functions. However, I don’t think it’s going to supplant imperative programming; it’s just going to be another tool that good programmers reach for when appropriate.

One of the things you were involved with was writing the threading library that was included in Boost, which has now become a part of the C++ standard from C++ 11 onwards. How did that come about?

Bill Kempf wrote the original version of Boost.Thread. In 2005, there was a drive to get the whole of Boost covered under a single license – the new Boost Software License. Unfortunately, at the time Bill could not be contacted to change the license, so a couple of us began a rewrite project, and rebuilt the whole library from the ground up. As the work on the new C++ standard was underway, I then got involved with the proposals for the thread library portion of the new standard, and the ‘new’ Boost implementation and the draft standard then evolved together. I’ve since handed over maintenance of Boost.Thread to Vicente Botet, as my work on concurrency libraries has been focused on my own Just::Thread and Just::Thread Pro libraries.

What advice would you give a programmer who’d like to get involved in an open source project or contribute to something like Boost?

Become an active contributor on the project mailing list, so people know who you are when you submit patches. Ask the active developers which areas they need help with, or just submit patches that fix bugs in the bug tracker. Most developers will be glad of the help.

Contributing a whole library to Boost is a lot of work. Getting it reviewed and accepted can take years, though they are trying to address that, and once your library has been accepted then you need to handle bug reports and fixes, often for platforms you have no access to.

Do you mentor other developers? Or did you ever have a mentor when you started programming?

I am not currently mentoring anyone, though I have done in the past, and I enjoyed the responsibility of helping someone else expand their skills. I didn’t have a ‘mentor’ when I started, though you could probably say that my Dad took on that role.

What inspired you to start your own business? And how did you find the experience? And any advice for anyone thinking of going it alone?

I started my own business because I wanted to move to Cornwall, and I couldn’t find a decent programming job in Cornwall at the time. From a practical point of view it’s straightforward – fill in some forms, pay a bit of money. The scary part is ensuring that you have enough jobs coming in or product sales to pay your bills. Thankfully, I had existing contacts who were more than happy to subcontract development to my company, whilst I made new contacts and built up the sales of Just::Thread.

For anyone thinking of setting up their own business, my advice is to sound out existing contacts for work before you make the leap. It’s also worth reading the advice of people like Andy Brice (http://successfulsoftware.net) and Patrick McKenzie (http://www.kalzumeus.com/), especially if you want to sell a product rather than take on development work for other companies.

Finally, do you have any advice for any kids or adults who are looking to start out as a programmer?

There’s a lot of options for someone starting out today, with many books and tutorials available, as well as sites like http://www.codecademy.com/ which provides interactive lessons, and http://www.codewars.com/ which provides exercises of various levels to help you practice what you’ve learnt. When I was learning, I greatly appreciated the immediacy of BASIC: there was no compile step, and you could just type BASIC commands at the prompt. To get that today you need something with a REPL, like Python, or node.js for Javascript. My son got on well with ‘Invent your own computer games with Python’. Once you’ve learnt enough from the tutorials, pick a simple project and work through it.

Notes: 

More fields may be available via dynamicdata ..