Tech News

How a 70s teacher invented C, the hugely influential coding language

If you thought that C is the kind of language that only 60-year-old white men know, think again. Yeah, it’s the dinosaur among today’s programming languages. But it’s still alive and kicking in more areas than you’d think.

For one, Unix is written in C. Originally written in assembly, the Unix kernel was rewritten in C back in 1973. This made Unix a lot more portable across different machines, and helped make it popular. And without this, we wouldn’t have all the beautiful operating systems of today — think Linux, Mac OS X, Android, iOS, Chrome OS, and whatever your router is running with.

If you’ve ever worked with databases, you’ve definitely used C, too. Even if you weren’t aware about that! Database management systems like Oracle Database, MySQL, and others are written in C. Most of them have since been rewritten in C++, but that’s also a direct descendant of C.

And even if all you do is Python, you’ve probably been using C all the time. Unless you’re opting for Jython, IronPython or PyPy, you’re using CPython. That’s the original implementation of Python: you’re writing Python code, but the interpreter — the thing that translates your human-made code into something the machine understands — is actually written C.

In short, C is everywhere. It’s not just a big fat dinosaur that somehow managed to survive in the modern age. It’s incredibly successful because it’s extremely useful.

That’s why it may come as a surprise that C didn’t originate from success. It came from a decade-long string of failures, and might not be around without a school teacher who liked to code during holidays.

The school teacher who was buddies with Alan Turing

Meet Christopher Stratchey. Born 1916 into an influential British family, he studied at Cambridge University and got to know many a famous scientist there. However, he seemed to have a years-long tendency to neglect his studies, and his performance in the final exams was rather underwhelming.

That might be the reason why he didn’t pursue an academic career like many of his peers. Instead, he spent the war years in industrial radar research. He then became a schoolteacher and remained one until 1951.

That’s when everything changed for him. A friend introduced him to the facilities of Britain’s National Physical Laboratory. Stratchey ended up spending his school holidays and downtime with the lab’s Pilot ACE, the first computer with Alan Turing’s Automatic Computing Engine.

Stratchey aimed at teaching the computer how to play checkers. Tackling such a logical task was remarkable at a time where computers were primarily used to quickly solve equations.

He didn’t succeed in his first attempt because the Pilot ACE didn’t have the storage capacity to do the job. You might be laughing at just how small that memory must have been — that’s legit — but remember that these were the 1950s!

Stratchey managed to wind up a better machine, though, the Ferranti Mark I, through his old buddy Alan Turing. With his friend’s guidance, he finally succeeded.

The word quickly spread about this unusual accomplishment, and soon Stratchey got called to promote the developments in computer science for the British government.