Friday, April 20, 2018

The Value of Planning Before Coding

​​​​In the article from The Atlantic, The Coming Software Apocalypse by James Somers (September 26, 2017), Leslie Lamport, a Turing Award–winning computer scientist is quoted to say, "Architects draw detailed plans before a brick is laid or a nail is hammered. But few programmers write even a rough sketch of what their programs will do before they start coding." 




Somers then goes on, "Programmers are drawn to the nitty-gritty of coding because code is what makes programs go; spending time on anything else can seem like a distraction. And there is a patient joy, a meditative kind of satisfaction, to be had from puzzling out the micro-mechanics of code. 

But code, Lamport argues, was never meant to be a medium for thought. 'It really does constrain your ability to ​​think when you’re thinking in terms of a programming language,' he says. Code makes you miss the forest for the trees: It draws your attention to the working of individual pieces, rather than to the bigger picture of how your program fits together, or what it’s supposed to do—and whether it actually does what you think."​ 




In short, take a few minutes and sketch out your algorithms before writing code. It may save you time in the long run.​

No comments: