This weekend, I read an article about an interview of Bill Gates in 1989. It was great to see his experience and thought on programming.

There are some fantastic ideas that I like to share.

1 - INTERVIEWER: What do you consider the most difficult part of computer programming?

GATES: … It’s difficult to get things down to their simplest forms. You have to simulate in your mind how the program’s going to work, and you have to have a complete grasp of how the various pieces of the program work together. …

My Comment: This is a very efficient way to program. You have to think through the whole program first and then jump into the coding phase. Nowadays, when getting a problem, many people, including myself, just immediately sit in front of the computer and start to code. If the program doesn’t work correctly, then rethink the solution, change the code, and run the program again. This is a very inefficient way to program, because many problems can be considered when you go through the implementation details in your mind.

Take home lesson: Simulate your algorithm in your mind or drafting it in a whiteboard before starting to code.

2 - INTERVIEWER: In a company like Microsoft, where you have 160 programmers, how do you go about creating an environment where you can develop successful programs?

GATES: One way is to have small project teams, typically four or five people, and one of those people has to have the proven ability to really absorb a program. …

Part of our strategy is getting the programmers to think everything through before they go to the coding phase. …

Another important element is code review, making sure that you look through the code and see if senior people can provide hints about how to do something better. And you have to review similar projects that have gone super, super well; programmers can look at how those other people performed previously, and get ideas from the other project about how to improve their own program.

My Comment: I am glad to see that he emphasized the importance of code reviewing in a team. It is a great chance to show your code to the other people and to receive the feedback. You can learn a lot from senior programmers.

Take home lesson: Small team and code review.

3 - INTERVIEWER: Do you think there are any particular rules for creating a good program?

GATES: Some people just jump in and start coding, and others think it all through before they sit down, but I think you’d find that the programmers who sit down and code at the beginning are only using that a scratch pad. It’s what’s going on in their heads that’s most important.

You’ve got to have somebody who’s super smart. A great programmer thinks about the program on a constant basis, whether driving or eating. That method takes an incredible amount of mental energy.

Take home lesson: Think about the program on a constant basis. Train yourself and practice a lot.

4 - INTERVIEWER: How would you describe your style of programming?

GATES: I like to think the whole program through at a design level before I sit down and write any of the code. And once I write the code, I like to go back and rewrite it entirely at once. …

The really great programs I’ve written have all been ones that I have thought about for a huge amount of time before I ever wrote them. …

5 - INTERVIEWER: When you come up with an idea to do the greatest word processor in the world, what do you do? How do you design it? Do you look at all the other word processors that are out there?

GATES: … You build up your feature list at the same time you’re trying to answer the question, “Why will our algorithms be better than anybody else’s?” …

… One sign of very good programs is that even internally they follow that philosophy of simplicity. …

6 - INTERVIEWER: Is studying computer science the best way to prepare to be a programmer?

GATES: No, the best way to prepare is to write programs, and to study great programs that other people have written. …

7 - INTERVIEWER: Microsoft is a broadly based company and the industry as a whole is changing rapidly. How do you keep up with everything?

GATES: … The really smart people here are focused on their areas; they bring me anything they think is of significance, any project that’s going to have real impact.