Blog Archives

An Interview With Kate Gregory

Kate Gregory is a C++ expert, who has been using C++ for nearly four decades. She is the author of a number of books, and is an in-demand speaker who’s given talks at the ACCU, CppCon, TechEd and TechDays among many others. She is a Pluralsight author, a Microsoft Regional Director, and a C++ Microsoft Valued Professional, and despite her hectic schedule she still manages to write code every week.

  1. How did you get in to computer programming? Was it a sudden interest? Or was it a slow process?

I did my undergrad work at the University of Waterloo. I started in the Faculty of Mathematics and they taught us algorithms and Fortran as a first year course. I didn’t choose it, but I had to do it. Other such courses followed, and when I transferred to engineering I discovered this was a useful and in-demand skill. I got opportunities to program on my co-op jobs, and it kind of grew from there.

  1. What was the first program you ever wrote? And in what language was it written in?

I don’t actually remember, but it’s a good bet it was assignment 1 in that first year Algorithms/Fortran course. And yes, punch cards were involved. My first program for money was a simulation of the way scale grows inside a pipe – in the piping of steam turbines scale forms in layers that can spall off and cause tremendous damage, so understanding that is an important problem. It led to a published paper for the researcher who hired me, and an award-winning co-op work term report for me. I probably should have demanded credit in the paper.

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

Sleep when the baby sleeps. It’s the best advice ever, and I pass it on whenever I can. Second best: the smaller the problem is, the more ridiculous it will be when you finally find it, the harder it is to find. Don’t feel bad about that. Laugh when you finally find the one character typo or the wrong kind of bracket or whatever the tiny thing is that has kept you aggravated for hours.

  1. How did you get in to C++? What was it that drew you to the language?

In the late 80s, I needed to write some numerical integration programs for these multiple partial differential equations I was tackling for my PhD work on blood coagulation. Fortran, PL/1, COBOL, MARKIV and the like were just not going to work for me. My partner was doing some C++ at the time and it seemed like it was going to be much better. Turns out, it was! I had experienced the misery that was the Fortran “common block” so I didn’t want to use Fortran any more, and the other languages were mostly about manipulating text and records, turning input into output. C++ was a better fit for working with numbers, for implementing an algorithm, for giving me what I needed to show some properties of those equations.

  1. Since 2004, you have been a Microsoft Valued Professional in Visual C++, how did that come about? That must feel pretty awesome?

MVPs are chosen primarily for their generosity. You can be a complete and utter expert on the C++ language or on Microsoft’s products, but if you don’t share that and help people with those tools, you won’t get the award. Mine I believe was triggered by my books, and more recently my activities on Stack Exchange sites, backed up of course by conference speaking. It’s nice to have that effort recognized. What I like best about the MVP program is the access it gives us to the team. I can reach just the right person if I have some issue with the Microsoft tools, and get advice or an explanation or “we’ll fix that in the next release.” Of course, the award certificates look good on my “bookshelf of showing off” as well.

  1. You hold an incredibly busy schedule between speaking at conferences, travelling, and doing Pluralsight courses, how do you keep your skills up to date?

It’s part of my job to stay current. If I spend an hour (or an afternoon) swearing at a development environment on a platform I don’t normally use, well that counts as work. It’s as valuable work as preparing a talk or doing something billable for a client. So is reading long documents about what’s new in C++ or trying out a new library someone has released. What’s nice for me is that once I’ve put that learning time in, I can use it in many different ways – as the backbone of a talk, a blog post, to help a client going through the same thing, as part of a course, and so on.

  1. If you were to start your career again now, what would you do differently? Or if you could go back to when you started programming what would you say to yourself?

I came up through a sort of golden age. You had to teach yourself things, or find someone to teach them to you, because there wasn’t a lot of training available. But then again, people didn’t demand credentials or challenge your background. If you said you could do something, the general response was to let you go ahead and show that you could. I think I would just reassure myself that my somewhat unusual path was going to work out to be amazing. I really only had a traditional job for two years after I finished my undergrad work. By the time my grad work was done I had a business with my partner, and we have made our own path for three decades now. It’s had some ups and downs, but I don’t think I would actually change any of it.

  1. If there is such a term, what would an average working day look like for you?

Oh there are most definitely no average days. I have routines when I’m home – swimming in the morning, coffee and email before I get out of bed – but I do so many different kinds of work that it’s hard to characterize. I try to react to my moods if I can – some days are better for writing a lot of code, others are better for big picture design whether of code, a course, or something I’m writing, and still others are the days when you have to catch up on emails, phone calls, paperwork, and buying things. Some days I might be elbow-deep in code when it’s time for my evening meal and I just keep right on working well past when I should have gone to bed. Other days I stop in the afternoon and for the rest of the day I just do something – anything – that isn’t work. It’s nice to be able to work according to my own rhythms. I have to be diligent about deadlines and promises, and some days I have to do things that are a little suboptimal because I have no more room to rearrange, but for the most part I do things I like from when I get up until when I go to bed, I do them side by side with my partner (my husband is my business partner) and I get paid for it, so that’s a pretty nice life, isn’t it?

  1. What would you say is the best book/blog you’ve read as a developer?

The Mythical Man Month got me thinking about the big picture of managing teams and people, managing projects, instead of just writing code. And it showed me that people can disagree and best practices can change. While I rarely draw on specific facts or quote from it, it changed the way I thought about creating software.

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

Yes, I mentor others – I’ve done so as part of a paid engagement and I occasionally just offer unsolicited advice to those I think need it. People ask me to help them and if I can, I do. That doesn’t mean I’m going to write half their application pro bono, but I answer questions and suggest things to learn or try. I’ve been the happy recipient of a great deal of marvellous advice from friends and peers, folks who were a little further ahead on one aspect of all the huge difficulty that is being a developer, and would tell me things I needed to know or introduce me to the right people. I try to do the same for others as often as I can.

    1. If you do mentor others, how did that come about? Do you do face to face mentoring, or do you do electronic mentoring?

Because I live in the middle of nowhere, most of my advising is not in person. I have had regular Skype calls with those who I am advising, and that works really well. Sometimes people email me their questions, or even message my public Facebook page, but the nice thing about Skype is I can see their screen, or show mine, while we’re talking live. That’s generally a lot better than email or other kinds of asynchronous messaging.

Then again, some of my most valuable advice has been given in restaurants and pubs. There’s no need to be in the same place if I’m explaining C++ syntax or architecture or “good design”, but career advice, soft skills things like dealing with difficult people or knowing if you’re charging enough for your time – that works better when we’re in the same place and relaxed. It’s one of the great things about conferences and other in-person get-togethers – a chance to give and get advice, or to listen to other people’s advice sessions.

  1. Finally, what advice would you give to someone is looking to start a career as a programmer?

Be prepared to keep learning your whole life. Be prepared to spend a long time learning something, to use it for a while, and then to see it become useless. Don’t fight that, move to the next thing. Watch for the big architectural and people lessons that still apply even when you don’t work on that platform, in that language, or for that kind of business any more. Hold onto the wisdom you build up, while realizing you still need to learn new knowledge (language syntax, tool use, platform idiosyncrasies) every day.

You can learn from online courses, from working on a project on your own time, on the job if you’re lucky, from just trying things and then frantically Googling when they don’t work. You can combine dozens of different ways of learning things, getting unstuck when you’re stuck, and realizing when to give up and start over. We all feel stupid from time to time, that doesn’t mean we really are. (If you’re working with the pre-release of something, you may have found a bug – I’ve done it and most of my friends have too. It isn’t always you who’s wrong.) And we all have to start over – new languages, new tools, new teams, new platforms – from time to time. If you know how to learn, how to start at something and recognize where you can use things you know from before, how to ask the right questions and how to make sure you don’t have to ask the same question twice – you’ll be doing very well indeed.

Oh, and sleep when the baby sleeps. Do not forget that. In the larger sense, that advice applies even for people who never raise a baby. There are times in your life when there just isn’t time to do everything, so you have to do the most important thing whenever you get the chance. Don’t waste time doing the second most important thing if there’s a good chance you won’t get another opportunity to do the most important thing. When you have a new baby, that means you don’t tidy during naps – your most important thing is sleeping and you do it whenever you can. When you’re writing software, there’s never enough time for everything. If you spend time doing less important things, you may never get to do the most important ones. That’s a disaster. Know your priorities and don’t skimp on what’s most important when there isn’t enough time to go around – which is most of the time, to be honest.

Advertisements

An interview with Kevlin Henney

I recently got the opportunity to do an e-mail interview with Kevlin Henney. He is a well-known author, engaging presenter, and a consultant on software development. He was the editor for the book 97 Things Every Programmer Should Know, and has given keynote addresses not just at ACCU but at other conferences as well.

How did you get in to computer programming? Was it a sudden interest? Or was it a slow process?

I was aware that computers could be programmed, and the idea sounded interesting, but it wasn’t until I was able to actually lay hands on a computer that I think it occurred to me that this was a thing that I could do myself.

What was the first program you ever wrote? And in what language was it written in? Also is it possible to provide a code sample of that language?

I can’t remember exactly, but I suspect it probably just printed “Hello” once. I strongly suspect that my second program printed “Hello” endlessly — or at least until you hit Ctrl-C. It was written in BASIC, and I strongly suspect that it was on a UK-101, a kit-based 6502 computer.

These days I am more likely to disavow any knowledge of BASIC than I am to provide code samples in it — but I think you can probably guess what those examples I just mentioned would look like!

What would you say is the best piece of software you’ve ever written? The one you’re most proud of?

Difficult to say. Possibly the proof-of-concept C++ unit-testing framework I came up with a couple of years ago, that I dubbed LHR. I don’t know if it’s necessarily the best, but it incorporated some novel ideas I’m proud of.

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

To understand that software development concerns the management of complexity.

If you were to go back in time and meet yourself when you were starting out as a programmer, what would you tell yourself?

As a professional programmer? Don’t worry, it’s not all crap. As a schoolboy? Yes, it really can be as much fun as you think it is.

Do you currently have a mentor? And if so, what would you say is the best piece of advice you’ve been given by them?

I don’t currently have anyone I would consider a mentor, but there are a number of people I make a point of shutting up and listening to when they have something to say.

You are well known for giving excellent talks on various topics to do with Software Engineering, I recall the one you did at ACCU Conference last year. How did that come about? And how scary was it to leave the security of a regular 9 to 5 job and go solo?

I worked as a principal technologist at QA, a training and consultancy company, for a few years. Training was part of my job role and that gets you comfortable with presenting and thinking on your feet. Conference presentations are a little different as the objective of a talk and the environment of a conference are not the same as a course or a workshop, but there’s enough overlap that practice at one supports practice in the other.

As a principal technologist at QA I enjoyed a great deal of autonomy and so the transition to working for myself was not as jarring as it might first appear. Meeting people at conferences also opened more opportunities than I had perhaps realised were available when I was associated with a larger company.

I’m not sure I could have gone straight from working for someone to being independent. Actually, that’s not quite true: I went from being an employee to being a contractor many years ago, but I didn’t find that fulfilling.

And following on from that, what advice would you give to someone who’s looking to go it alone?

Make sure you know what your motivation is for going it alone, that your expectations are realistic and that you have some work lined up!

I’m guessing you work from home, if so, how do you keep the balance between work time and family time?

A question I’ve wrestled with for years and still not one I’m sure I have a good answer to! I am, however, far better at turning off than I used to be, recognising that work time is an interruption from family time and not the other way around. As I travel a lot the work–family distinction is often reinforced by whether I’m at home or away, so I try to get more work-related things done when I’m away because it doesn’t distract from family. I notice that when I’m working and at home the context switch can be harder because the context is effectively the same.

How do you keep your skills up to date? Do you get a chance to do some personal development at work?

I attend conferences, I talk to people I meet (and people I don’t meet) and I read. I probably get a lot more breadth than depth, but I temper that by focusing on things that interest me — so I’ll freely admit to being more driven by interest than necessity.

I’ve seen that you contribute to the Boost libraries as well. How did you get involved in that? And what advice would you give to a prospective developer looking to get involved in such a project? Or any open source project for that matter.

My involvement came about primarily because of my involvement in the C++ standards committee and writing articles about C++. That said, although I have a continued interest in Boost, I am no longer an active contributor, having long ago passed maintenance of my contributions to others.

As for advice on doing it: if you think you want to get involved, then you should. It’s worth spending your time familiarising yourself with the ins and outs and mores of your project of interest, asking questions, getting a feel for what you can best contribute and how. If you’re a developer, don’t assume it’s going to be coding where you stand to learn or contribute the most — maybe it’s code, maybe it’s tests, maybe it’s documentation, maybe it’s something else.

What would you describe as the biggest “ah ha” moment or surprise you’ve come across when you’re chasing down a bug?

That good practice I ignored? I shouldn’t have ignored it. I don’t know if that’s the biggest surprise — in fact, it’s the exact opposite — but it’s the biggest lesson. There’s nothing quite like the dawning, creeping realisation that the bug was easily avoidable.

Do you have any regrets as a programmer? For example wishing you’d followed a certain technology more closely or something like that?

Listing regrets or indulging in regret is not something I really do, which I would say is no bad thing — and not something I regret.

Where do you think the next big shift in programming is going to come in?

Realising that there are few big shifts in programming that change the fact that, ultimately, it’s people who define software. We have met the enemy and he is us.

Are you working on anything exciting at the moment? A new book? Or a new piece of software?

There’s a couple of code ideas I’m kicking around that I think are quite neat, but perhaps more for my own interest, and a couple of book projects that have my eye.

Finally, what advice would you offer to kids or adults that are looking to start a career as a programmer?

Look at what’s happening now, but also look at what’s gone before. If you can figure out they’re related, you’re doing better than most.