I thought I'd shine some light on an example of this issue in programming. There is a never-ending debate in programming circles about the 'proper' way to write code that creates some true/false decision. Stackoverflow has a good example of this.
My personal pet peeve (petty but my teeth grind everytime I see it) is verbosely setting booleans, e.g.
bool isValid;
if (percentage >= 0 && percentage <= 100)
isValid = true;
else
isValid = false;whats wrong with
bool isValid = percentage >= 0 && percentage <= 100;
It's soooooo much more succinct and easier on the eye
Homer's The Illiad and The Oddessy are ancient works dedicated to expressions of speech. They were originally poems that were passed down in an oral tradition and meant to be sung instead of read.
Euclid's Elements is a work dedicated to expressions of logic. It covers objective proofs and unambiguous facts and is the beginning of the mathematical tradition, if you will, of rigorous scientific thinking.
The problem we face in software is code is a form of human expression, with all the imprecision that entails, attempting to communicate with the utterly logical CPU; programmers will be forever trying to translate "An Ode to the Machine" into the Pythagorean Theorem.
Might "programming" be synonymous with "writing"? You can write a poem, but you can also write a logical paper. I believe programming is the same way. It's all in the programmer's intent.
ReplyDeleteA good programmer will keep his "target audience" in mind. Most Developers remember to consider the machine, in that they set out to use memory efficiently, minimize I/O operations, etc. The Support Team who will support and maintain the program needs to be kept in mind as well. Depending on the types of people on the Support Team should have some bearing on the style employed by the programmer.
ReplyDelete