In this article, we share with you an interview with a world-famous American programmer in which he talks about creating “torture” tests, “smart” coding, and why we need so many languages. A legendary man, a mystery man. His incomparable charisma attracts many people, and his passion for history, music, art and mathematics makes him an unforgettable companion. Over the years, he developed his own programming philosophy and created several board games that teach coding. His house is built around a two-story organ; he has already written a series of books on computer science and is not going to rest on his laurels.
A man who is ready to forget about the rest of the world for the sake of his IT experiments. Meet Donald Knuth!
Don, why is it so important to find simple solutions when programming?
Many people believe that there is no easy solution to most problems, so they often give up, quitting halfway. It is important to always keep in mind that there is a simple solution, and, therefore, continue to search for and monitor options without dwelling on the first one that comes across.
You say that when programming, it's important to be able to mentally get into the shoes of a tester, don't feed him bread — just let him break the code. Do you think it is easy for the average programmer to transform like this?
Of course, we need a special mindset to create test programs that can accurately identify errors. As for me, I can safely say that I'm not cunning enough to become a computer security expert.
However, in my opinion, I have been quite successful in developing “torture” tests for my own software.
How did I do it? First, I constantly imagined myself as an enemy rather than a friend of the system. Secondly, I wrote code, although acceptable, but rather strange, which was clearly never useful to anyone later. Third, I learned how to skillfully integrate one incredibly complex structure into another that was even more incomprehensible.
Of course, my test programs didn't always reveal the bugs I expected to find. However, in the process, I found completely different bugs that I would not have been able to find if I had used any other known system.
I suppose that even better results can be achieved if such “torture” tests are created by several different people and independently of each other.
Don Knuth in 1958
How do you do research programming and prepare it for publication? Please share the process!
On average, I write about five programs every week and don't settle down until I make them “literate”. Usually, the first two drafts go to the furnace, because algorithms are usually “weird” and don't function as I expect. I always carefully study the code of the applications I use, trying to rethink everything from scratch. At first, I make a lot of mistakes to help readers avoid them later.
What is a programming language for you? Is it a tool for expressing ideas or a tool for expressing goals?
A programming language is a tool for transforming a programmer's mental images into precise operations that a machine can perform. The main thing is that the program should match the user's intuitive actions as much as possible. There are a wide variety of users and applications, which is why we need so many different programming languages.
How do you think you've made an impact on the computer industry, and what can people learn from your experience?
I can't objectively say what impact I had.
But here's what I was trying to achieve: my main goal was to systematize and explain the best ideas I found while coding and studying programming in general. I believe that computer science is a rich body of knowledge and I want this knowledge to be useful instead of gathering dust in a drawer.
But... why pretend! In fact, I had a terrible desire to systematize and explain this knowledge, and perhaps my only motivation was pure intellectual curiosity and a desire to explore exciting new patterns.
What advice would you give to someone who wants to become the world's best programmer?
I would like him to discover the benefits of “smart” programming at all costs!
The material for this article is from an original interview: https://www.red-gate.com/simple-talk/opinion/opinion-pieces/don-knuth-and-the-art-of-computer-programming-the-interview/
Does your child dream of becoming a programmer but doesn't know where to start? Write it down to free trial lesson at Progkids! We know everything about computer technology and we can easily teach him “smart” coding!