[英]Bob大叔:程式設計“老師傅”和他的職業素養(圖靈訪談)

盼盼姐發表於2012-09-27

圖靈訪談之三十五:專訪Bob大叔Robert Martin

Robert C. Martin,世界級軟體開發大師,設計模式和敏捷開發先驅,敏捷聯盟首任主席,C++ Report 前主編,被後輩程式設計師尊稱為“Bob大叔”。20世紀70年代初成為職業程式設計師,後創辦Object Mentor公司並任總裁。Martin還是一名多產的作家,至今已發表數百篇文章、論文和部落格,除本書外,還著有《程式碼整潔之道》、《敏捷軟體開發:原則、模式和實踐》、《UML:Java程式設計師指南》等。他最近創辦了cleancoders.com網站,專為軟體開發人員提供教育視訊。

enter image description here

iTuring: The Chinese translator of your book found there seems to be some inner connections between Clean Coder and the Book of the Five Rings by Miyamoto Musashi, who was a Japanese legendary samurai swordsman. Have you read that book before? And have you been influenced by any eastern philosophies like this, for example “Zen”?

Uncle Bob: I'm sorry to say I've not read the Book of the Five Rings; it sounds like something I'd enjoy. However, I was involved in the Martial Art of Jujitsu for several years, and learned many lessons of discipline that apply to craftsmanship from that experience.

iTuring: The covers of Agile Software Development、Clean Code and The Clean Coder are all pictures of nebula. If this is not a coincidence, what do you try to express through these cover pictures? And as a collection, what’s the connection of these three books(maybe more in the future)?

Uncle Bob: From a very young age I was always fascinated by Space. I remember a time when we had no closeup pictures of any planets, including the moon. I remember the pictures snapped from the Ranger spacecraft just before they plowed into the Lunar surface. I remember Uri Gargarin's, Alan Shepherd's, and Scott Glen's, missions. I watched as Neil Armstrong stepped out into the Sea of Tranquility. In my lifetime I have seen close up images of every planet, and many minor planets. I have seen robots crawl across the Martian surface, land on the icy crust of Titan, and struggle to send a few brief messages out from the depths of Venusian hell. I have seen the Pale Blue Dot of the Earth, a single pixel in a photograph taken by Voyager 1 looking homeward through Saturn's rings. And it thrills me that We Took That Picture.

The images of nebula, stars, and planets that grace the covers of my books to remind us of what we humans are capable of doing when we put our mind to it, and discipline ourselves to succeed.

iTuring: You have transformed yourself from a professional programmer to a mentor in this field, who has influenced you to take this transition? Are there any interesting stories behind the scenes?

Uncle Bob: I have not had many direct mentors in my career. I grew up at a time when there just weren't very many experienced programmers. So I drew my mentoring from indirect sources. From books authored by luminaries like Grady Booch, Tom DeMarco, Meilir Page-Jones, Erich Gamma, Martin Fowler, Bertrand Meyer, Kent Beck, and many others. I found this instruction so valuable that I instinctively tried to emulate it. I started writing. At first I wrote articles in newsgroups on the internet. Then articles for magazines. Then books. And now the cleancoders.com videos. I started speaking at conferences, and found I had a talent for standing on stage and delivering a message. The transformation you have asked me about was slow. It didn't begin until I had 20 years of experience, and has taken another 20 to reach this point. That transformation was never my plan, nor my goal; but it has certainly been a joy.

iTuring: We have heard stories about some renowned coders, most of them seem to be genius in this field even when they were so young, and they work overtime for pleasure. However, there are still plenty of people who may not so passionate about programming, but also choose to be coder as a profession. Can common coders become “clean” and awesome one day? Do you believe that great programmers are natural to some extent?

Uncle Bob: A dog will be a dog. A cat is destined to be a cat. But a human being can be whatever that human wants to be. That is the overriding characteristic of humanity. We humans strive to choose our outcomes and manage our destinies.

You have asked me if "common coders" can become clean. Of course! But only if that is their desire. The greatest challenge facing our industry is to find people who have that desire and can inculcate that desire into others.

We should learn from Medical Doctors. We must learn to be as ruthless as they are about choosing who joins our ranks. Earning the title of Programmer should be as desperately difficult as earning the title of Doctor. Because we are, in fact, the Doctors of information technology. And that it is upon that technology that the lifeblood of our civilization depends. It is our code that underlies every economic transaction, every factory operation, every elevator, every automobile, every alarm clock and microwave oven. Our code runs it all. Our civilization depends upon us. We need to rise to that responsibility by ensuring that the title of Programmer is very hard to get.

iTuring: Today, programming language is a tool to improve programmers’ productivities and efficiency. Java is a lasting language, but Java seems to have failed to provide the extra help to programmers. Do you think Java is somewhat outdated and is left behind by some new programming language, such as Go?

Uncle Bob: Langauges come and languages go. In my career I've seen languages like Fortran, Cobol, PL/1, Pascal, C, C++, Java, C#, and Ruby all follow the same pattern. They gain in popularity for a while, and then they recede into the backwaters of progress. We can draw this as a set of waves rising and falling over time. The trick to maintaining a career in programming is to learn how to surf those waves.

The language you are using today is not the language you will be using five years from now. So you'd better be learning that new language NOW! All programmers who are successful in the long term learn how to hop from one wave to the next. They smell a new language coming, and start to learn it early. Then they hop on board that language as it begins to rise in popularity. While they ride the crest of that language, they are constantly on the lookout for the next language that will take its place.

Nothing is quite so tragic as a programmer who has failed to make that jump. Riding the wave of a language down into obscurity is depressing and demeaning.
Java and C# crested long ago. Python and Ruby are beginning to crest right now. The languages that are on the horizon are languages like Javascript and Clojure.

iTuring: Agile is a large concept nowadays, Turing Book Company has published many books in this area, such as Refactoring, Continuous Delivery, Specification by Example, and also Pomodoro Technique Illustrated. Since ‘agile’ is becoming larger and larger, some people—e.g. Martin Fowler—has accused that there are some pseudo agile methods, have you encountered any of those? Do you mind sharing some of your experience with us?

Uncle Bob: Agile is a very simple concept. Four basic statements. People over process, working software over documentation, collaboration over negotiation, and embracing change over embracing plans. Where these concepts are applied, they succeed. Unfortunately I have seen many places where people use the word "agile" without applying those principles.

Look at that first principle. People over process. Agile is not a process. Agile is people. Scrum is a process. Scrum is not agile. Scrum can be agile if the people make it so. Extreme Programming is a set of disciplines, it is not Agile. XP will be agile only if the people make it so.

Here's the thing about people. People want to do a good job. People want to take pride in their work. Any process that makes it hard for people to feel proud of their daily work is not agile, because that process does not choose people over process. This is the reason for the craftsmanship movement. This is why we've put so much emphasis on writing code well. This is why we say the only way to go fast is to go well. The only way a process can be agile, is if that process allows you to take pride in your work.

iTuring: Last time Martin Fowler came to visit China, an audience has mistaken him for you, and call him Uncle Bob, awkward^_^. Anyway, there are some readers who reflect that Kent Beck, Martin Fowler and Uncle Bob are their favorite authors. Do you know these great authors personally? How do you identify yourself and your works among so many great books in this field?

Uncle Bob: I know Martin Fowler quite well. He and I have collaborated from time to time. In fact, it was he and I who called the meeting that created the Agile Manifesto back in 2001. Kent Beck and I have worked closely too. In 1999 we collaborated on a series of mini-conferences and courses called "Extreme Programming Immersion". These men are my peers and my teachers. I hold them all in very high regard.

iTuring: In the Clean Coder you have used many of your own experience as examples. And the book Agile Principles, Patterns, and Practices in C#, was authored by you and your son Micah Martin, do you mind sharing some of your advice that you have given to your son in the first place?

Uncle Bob: I've taught my son so well that I now work for him. Several years ago he started his own company, 8th Light Inc. It is a company of craftsmen, and it is growing very rapidly and very successfully. Last year I became the Master Craftsman of 8th Light. It's a position I hold with some pride. At this point I think my Son is in a better position to give me advice, than I him.

One thing I taught my son that was not in the "Clean Coder" book is this: The best way to learn is to teach.

iTuring: In your book, you mentioned there should be at least 20 hours a week for a professional programmer to learn for him/herself, are there any inevitable books you would like to recommend to someone who want to hone their skills? What do you usually do to keep yourself updated with new tech trends?

Uncle Bob: I keep up with new trends by reading a lot. I follow people on twitter and Facebook. I read blogs and articles. I find good books and read them whenever I can.

The one book I think everyone should read is "The Structure and Interpretation of Computer Programming" by Abelson and Sussman. It's free on the internet nowadays. You can also get the videos of their lectures from MIT. If you haven't read that book, it'll rock your world.

iTuring: As readers, we are eager to know what’s your plan for writing your next book? Is there any topic that you would like to cover in your next book? And will you consider about some avant garde publishing methods, such as e-publishing or self-publishing?

Uncle Bob: I think I'll stick to dead tree publishing. My publisher has been good to me and I feel I should honor that relationship. The next book I'm writing will be called "Clean Architecture". It's a book about the technical challenge of being an architect. It tries to explain the goals of a good architecture and the underlying techniques used by good architects.


更多精彩,加入圖靈訪談微信!

相關文章