Inspiration Episode #2: Coding for Humans
Published 3/5/2015
Today, I talk about coding for humans in this special Inspiration episode. Remember, computers are only what you tell them to be!
Transcript (Generated by OpenAI Whisper)
Hey everyone and welcome to Developer Tea. Today is an inspiration episode. My name is Jonathan Cottrell. I'm your host and I'm going to be talking to you about how you are writing code first for humans. Donald Newth, who is very well known as one of the most important or most influential writers in computer science history, he wrote a very large set of books. I'm actually looking at them right now on my desk called The Art of Computer Programming. He has four-ish volumes of this. He was quoted saying that computers are good at following instructions but not at reading your mind. Let that sink in for a second. Computers are good at following instructions but not at reading your mind. What that means is that you as a programmer, you have the job of translating whatever it is that you want to do with a computer into instructions that that computer will follow. Very often we take things for granted when we are coding. We take things for granted that the computer should do. That we think that the computer would do automatically. In fact, computers are only good at following instructions. They don't know what things are obvious. Another similar quote from the book Structure and Interpretation of Computer Programs, another very important book in computer science history by Gerald J. Sussman and Harold Abelson. They said, Programs must be written for people to read. And only incidentally for machines to execute. So it's kind of a similar theme here. Programs must be written for people to read and only incidentally for machines to execute. Because the truth is, machines don't really need to be able to understand your variable naming. You're doing that for a human. Machines don't need to understand what these different words actually stand for in a real human language. In fact, all machines really need is zeros and ones. All of the abstractions that we've created on top of zeros and ones, those are for humans. So remember the next time that you're writing code, that your first job is to write code for humans. And your second job is to write that code in such a way that a machine will execute it and that all of your instructions make sense. So remember, you're not expecting the computer to do something that it doesn't know you want it to do. Because as Donald New said, computers are good at following instructions, but not at reading your mind. Thanks so much for listening to this inspiration episode of Developer Tea. If you'd like to contact me, get in touch with me on Twitter at at Developer Tea, or you can email me at developertea at gmail.com. Make sure you stop by developertea.com for the show notes. And to leave a comment in the comment thread. Until next time, enjoy your tea.