Print this page
Published in News

We need to get better code

by on14 January 2020


Faster processors let to bloated software warns Open University bloke

Physical limits on hardware might force developers to start writing less bloated code according to Open University technology professor John Naughton.

Writing in the Guardian, Naughton said that processors led to bloated software, but physical limits may force a return to the concise code of the past.

He said there's been lots of research into ingenious ways of packing more computing power into machines, for example using multi-core architectures in which a CPU has two or more separate processing units called "cores" -- in the hope of postponing the awful day when the silicon chip finally runs out of road.

Naughton said that one of the predictable consequences of Moore's law is that it made programmers lazier.

“Writing software is a craft and some people are better at it than others. They write code that is more elegant and, more importantly, leaner, so that it executes faster. In the early days, when the hardware was primitive, craftsmanship really mattered”, he said.

When Bill Gates was in short trousers he wrote a Basic interpreter for one of the earliest microcomputers, the TRS-80. Because the machine had only a tiny read-only memory, Gates had to fit it into just 16 kilobytes. He wrote it in assembly language to increase efficiency and save space; there's a legend that for years afterwards, he could recite the entire program by heart.

As Moore's law took hold, the need to write lean, parsimonious code gradually disappeared and incentives changed.

It is. In a lecture in 1997, Nathan Myhrvold, who was once Bill Gates’s chief technology officer, set out his Four Laws of Software. 1: software is like a gas – it expands to fill its container. 2: software grows until it is limited by Moore’s law. 3: software growth makes Moore’s law possible – people buy new hardware because the software requires it. And, finally, 4: software is only limited by human ambition and expectation.

“As Moore’s law reaches the end of its dominion, Myhrvold’s laws suggest that we basically have only two options. Either we moderate our ambitions or we go back to writing leaner, more efficient code. In other words, back to the future”, Naughton wrote.

 

Last modified on 14 January 2020
Rate this item
(1 Vote)