Programming and the English language

Tim Miles

Tim is the Editor of the Innovate My School Magazine. Before joining Innovate, he worked for five years in the software industry, occupying every role from tea-making technical support specialist to programmer and project director. He writes about a range of subjects, including education, technology, history and religion.

Follow @timkilometres

Website: Email This email address is being protected from spambots. You need JavaScript enabled to view it.

In a MacTaggart lecture full of sound advice - reduce regulation, listen to the Victorians, ignore Alan Sugar - perhaps the most important suggestion made by Eric Schmidt was that computer science be taught properly in schools.

This means, as the Google Chairman pointed out, teaching children how to make computer programs rather than merely how to use them. 

But in an era when GCSE marks are awarded for linking a picture of a football to the word “le football”, can pupils really cope with the protean rigours of computer programming?

Of course they can. Today’s children grow up surrounded by software. They enjoy using it so much that they are largely self-taught. They eagerly upgrade to the latest mobile phone, even if this means learning to use an entirely new operation system. Such enthusiasm and confidence are the perfect foundations on which to learn to program.

The benefits of learning to program are even more convincing. The sense of pride one gets from writing working code and the triumph of resolving errors are rewarding in themselves. Factor in the colossal role of technology in today’s world – let alone tomorrow’s – and the case for teaching computer science looks as compelling as Google’s credit limit.

But there is a deeper reason for studying the languages of computers - one related to another of Dr Schmidt’s recommendations: that we bring art and science back together.

So long have these two lovers been estranged that the thought of a mathematician writing timeless fairytales, or of a painter inspired by geometric proportions, is inconceivable to the modern schoolchild, who sees specialism as the sole road to success.

On the face of it, maths and languages may seem quite different. But beneath the surface they surge with a common current. Learning to use the mathematical languages of computer programs can reveal how much the two disciplines complement each other, and demonstrates that logic is not limited to science, nor is art the only harbour of elegance. 

To truly know a language, one must master the rules and structures that make it work: its grammar. Learning this advanced logical apparatus propels one from a pool of phrases to a stream of fluency. The more grammatical constructions a person can use, the greater the range of expression available to him (and the greater his ability to understand the expression of others). Moreover, once you have grasped one language’s grammar, learning another’s is easy; even with languages from different families, the logical mindset acquired from studying the one will be of great help with the other.

All this is just as true of computer languages. But there is one key difference. Though it is possible to speak or write a passable piece of English or French with minor grammatical errors, a single mistake in software code can be disastrous. A computer cannot “get the gist” of what you are telling it. The instructions it receives must adhere strictly to the rules of the language they are written in.

Pupils who have learnt to write computer programs are therefore likely to approach both their native language and foreign languages by arming themselves with a thorough and accurate understanding of their grammar. The consequences of illogic and imprecision in their code will give them a keen eye for the same flaws in their writing. 

Thus they will see how logic and accuracy (qualities more often associated with the sciences) can make them better writers and linguists.

But programming isn’t purely about precision. Good code must be graceful as well as accurate. A well-written program – like an elegant piece of English – is one that conveys its meaning clearly and effectively. It avoids tautology and repetition, which increase the capacity for mistakes. It is as concise as possible: the less code there is, the easier it is to spot and rectify any internal illogic - and, in general, the fewer instructions a computer has to execute, the more quickly the program can run. It uses meaningful words rather than abstract ones, in order to make its operations clear.

In other words, good code adheres to the golden guidelines for good English set out by George Orwell, the Fowlers and others. Ugly code might function correctly, but it will be less valuable, more difficult for other programmers to understand, and harder to fix and modify when doing so becomes necessary. It will certainly not gain the admiration of one’s peers.

As pupils become better programmers, they will see that elegance (a quality more often associated with the arts) is as vital as accuracy to writing good, effective code.

Dr Schmidt’s suggestion is ambitious. Programming is no easy skill to master - for teachers or pupils. But it is worth it: for its own sake, and also to dispel the myth that maths and languages are mortal enemies, that logic and style cannot coexist. In doing this, learning to code can help to renew that star-crossed marriage between science and art, which gave the Mona Lisa her smile and took Alice into Wonderland.

Read More

Sign up to our newsletter

Get the best of Innovate My School, straight to your inbox.

What are you interested in?

By signing up you agree to our Terms & Conditions and Privacy Policy.

1,300+ guest writers.
ideas & stories. 
Share yours.

In order to make our website better for you, we use cookies!

Some firefox users may experience missing content, to fix this, click the shield in the top left and "disable tracking protection"