DEV Community

Cover image for What We Can Learn From Sir Charles Antony Richard Hoare
MichaelPaulKunz
MichaelPaulKunz

Posted on

What We Can Learn From Sir Charles Antony Richard Hoare

Sir Charles Antony Richard Hoare, inventor of quick sort and the null reference, is a giant in the world of computing and technology. His name, tailor-made for minimum word counts, can be shortened to C.A.R. Hoare or simply Sir Tony Hoare, his knighthood differentiating him from the cyclist.

This is NOT Sir Tony Hoare

Hoare was born in present-day Sri Lanka to British parents and studied philosophy at Oxford. He now teaches computer science there. On his journey from Oxford back to Oxford, he lived in the Soviet Union for some time and became fluent in Russian. He developed the quick sort algorithm and the null reference -- for which he has apologized -- among other algorithmic innovations and models such as the Hoare Triple, and the Dining Philosophers Problem used to describe concurrent processes in multi-threaded languages.

Hoare has received many awards and nominations, including the 1980 A.M. Turing Award recognizing his "contributions to the definition and design of programming languages." Sir Tony received the Faraday Medal in 1985 and the Kyoto Prize in 2000. Also in 2000, he was knighted by Queen Elizabeth II, certainly a rare honor for a coder. In addition to his supreme intellect, Sir Tony is a bastion of humility and grace, in many ways pioneering the "soft skills" that we strive for in order to perfect our culture of code. Here are a couple of values we can learn from Sir Tony's example.

This is Sir Tony Hoare

Simplicity

You have to be highly intelligent to succeed in the field of software engineering. Routinely, concepts like block-chain technology are wheeled out on late-night talk shows as examples of impenetrable puzzles that nobody understands. But intelligence has a dark side. Trying to one-up other coders and position yourself as the smartest person in the room can tempt you to talk over somebody's head when direct communication is more effective. Or to write overly complex code that could invite unexpected consequences down the line. To this impulse, Sir Tony says the following:

"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies."

There are many ways to make your code impenetrable. There's the "spaghetti JavaScript" method of chaining together higher-order functions until it reads like several lines of arrows with no context. Insufficient commenting. Using recursion when a dynamic solution would work just as well. It might feel good to get your code as concise as possible. Solving something complex in just a couple of lines is surely a feat to be proud of. But it's more useful to write code in a way that another developer could look at and instantly understand, even if it doesn't flex the algorithmic muscles you've spent your career developing. Hoare is aware that as one's resources expand, the tendency is to do as many cool things with them as possible. And so he elaborates on the importance of simplicity even in the face of expanding ability:

"The price of reliability is the pursuit of the utmost simplicity. It is a price which the very rich find most hard to pay."

Alt Text

Humility

In spite of all his accolades, Sir Tony can still admit when he's wrong. This can be one of the most difficult things for a successful person to do. He has called the null reference his billion dollar mistake, citing the lost time and money null-related problems have cost developers and technology companies throughout the years. I'm sure Joseph Tartaro would agree with Sir Tony on this point, after getting "NULL" on his license plate caused every parking ticket with an unknown license plate to fall on his shoulders.

This is an important lesson for coders everywhere with impostor syndrome. And for every coder who makes a silly mistake and loses hours to it. Imagine being on the front lines of writing code and developing stuff that gets used for decades. And you mess something up. And watch it go into effect and spiral out into more and more problems every year. That would be devastating, but Hoare takes it in stride, giving speeches and writing volumes on how big of a mistake it was. Definitely makes forgetting that "this" references the outer scope inside an arrow function seem pretty tame in comparison.

Alt Text

And that's Tony Hoare in a nutshell. An immensely important figure in the tech world who is humble and plainspoken despite his looming status. We can all learn a lot from his words and his example.

Cited

Eloquent JavaScript
Antony Hoare Wikipedia
Similarly-named Cyclist
Hoare Triple
Dining Philosophers Problem
Turing Award
Other Acknowledgments
Billion Dollar Mistake
NULL License Plate

Top comments (0)