Channels ▼
RSS

Design

Interview With Ward Cunningham


Current Programming Environment

DDJ: Tell me a little about your programming environment. What tools do you use for your day-to-day work and what languages are you programming in?

Cunningham: You know, I try not to get bound too much to anything in particular.

DDJ: I presume you must be using JavaScript if you're doing wikis and using JSON.

Cunningham: I'll tell you right now what I'm using and I'm enjoying is I write CoffeeScript, and TextMate, although I'm trying to learn Sublime Text 2, which I guess is the hot new editor. So, I switch back and forth between both of those. And it's been really nice. And of course, I love it because with one keystroke I can see the results of what I've written. I can select a paragraph and say, "run just this part." So it has this feel, that it's not very far from the engine. Of course, what engine is that? Well, there's node.js running right behind that, so I'm pounding things into node.js without hardly thinking about it.

I looked at it and I said, 'Who would have thought of making a language like that?' That's when I realized that open source was here to stay. There is no commercial endeavor that ever would have invented Perl.

In CoffeeScript, it feels very nice for me for doing the kind of things I'm doing now, which is programming event-driven stuff that's deeply nested, and it does that well. I will admit that I was a Smalltalk zealot, and I believed that Smalltalk could be the only language, and I knew about a dozen reasons why, and one of them was that once everybody programmed in Smalltalk, we would all communicate with objects. But that didn't happen. And the day that I gave up on that vision, I said, "You know what, we're all going to communicate with text files. We're all going to go ripping through these text files plundering them for whatever information we can infer from it."

That's when I picked up Perl. And it shocked me, just how well it worked for finding and plundering files because it had those reg exes built in and stuff like that. And it was so fast. It was fast to compile, it was fast to develop, it was fast to run. I could not believe it was so fast. And I know people like to complain about it, but I also thought it showed a tremendous amount of insight. It was insight, and I looked at it and I said, "Who would have thought of making a language like that?" That's when I realized that open source was here to stay. There is no commercial endeavor that ever would have invented Perl.

But Perl was my escape from object-oriented programming, and I still use it today. Probably a day doesn't go by that I don't just pick up Perl right at the command line just because idiomatically I can write commands. I know there's a command in UNIX but rather than go the command page and try to remember the options, I just write it from scratch in Perl. You know, I go on and finish the line. I know Perl well enough that I can do that. I think if you write big programs you know stuff that I never bothered to learn about Perl.

And of course Ruby has Perl as its father and Smalltalk as its mother, and so Ruby feels pretty good to me too. So those are the ones I like the most. And I've got a Macbook Air here, which is a pretty nice computer, especially if you commute by bicycle, it's not very heavy. I haven't bothered to update to Lion yet.

Learning As a Veteran Programmer

Cunningham: I'd say that computing is fabulous right now. It's a little complicated, but it's fabulous. And when I step back and look at my whole career, there was this time when we talked about how in the future there will be component libraries that have perfected solutions for everything that you would want to do.

DDJ: And you've had a long career to judge this.

That's the other thing: to be an old guy who's still a programmer. A lot of people think that you can't be old and be good, and that's not true. You just have to be willing to let go of the strengths that you had a year ago and get some new strengths this year. Because it does change fast, and if you're not willing to do that, then you're not really able to be a programmer.

DDJ: Well, it's not only strengths. You have to be willing to let go, just like you did with Smalltalk, of your affections for certain technologies. If you stick to Smalltalk and don't look at CoffeeScript and node.js, you become much less effective as a programmer.

Cunningham: Absolutely! And part of that is to say that there are some patterns that you've learned to put Smalltalk to work, or there are patterns that you've learned to make Perl programs work well. And when you go into the new world, some of those patterns don't come with you, and you can be really annoyed at that. You can feel insulted that you bothered to learn that and it's not good anymore. You just have to put that behind you and say, "What am I going to learn today?" And it's easier to learn good stuff, because there's great code out there. There's a lot of junky code. But there's great code, and if you find developers who really do their craft well, and read their code, that's the best way to learn a new language.

DDJ: When I look at good code, I frequently think, "I never ever thought of doing that that way." The joy of those small revelations is a wonderfully instructive thing.

Cunningham: Let me close with an example that is close to me today. I was looking to make things move on the screen and I fell upon this d3.js library. It's a nice library with a lot of examples of it doing impressive things. And then the code for those examples is 20, 30, 40 lines. And then I read the introductory material, and it says, here's our philosophy, and I agree with their philosophy. I like the picture and I like the look of the code. It's only 40 lines, but every line carried some careful thought. There was a learning curve there that surprised me because the programs looked short. The most rewarding work I've done this year is digging through that code and understanding what it does and understanding what it didn't do, and how to approach the problem.

Anybody who's willing and wants to have pictures on the screen that move, I would encourage them to do the same thing. But do it with an open mind, because you're following the footsteps of a very skillful developer.

DDJ: Thank you.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 

Video