Programming Etiquette

Writing software is not a purely technical activity, just as writing an article for a newspaper is not a mere list of facts. It is also an exercise in style, quite similar to what you do when writing a novel.

Giovanni Organtini
The Startup
Published in
5 min readOct 25, 2020

--

image by NeKoKaWaii-chan from Wikimedia Commons

Programming languages are always very rigid in the respect of syntactic rules (much stricter than a proofreader), but they often leave the programmer with certain freedoms that, if badly used, like all freedoms, prove to be harmful and, almost always, backfire on the author.

Through the “style” choices the programmer can convey additional messages to the content of his work. By choosing one form rather than another, to a certain extent, he/she communicate information that, often, helps the reader (often the author him/herself) to decipher the content of a program.

Variable names
The choice of names to be assigned to variables is of great importance when writing a program. Each variable must always be given a meaningful name, which recalls its meaning and how it is used in the program. The type of data contained in the variables can also be suggested by the name, which, however, must never be too long.

--

--

Giovanni Organtini
The Startup

Professor of Physics at Sapienza Università di Roma. Member of the CMS and PADME collaborations. Arduino advocate and phyphox ambassador.