writing code that can be and is Mathematically and Algorithmically proven to be correct and efficient ?
And how about using strong typing, encapsulation, and good error-checking ?
For every function/method/procedure, no matter how small, clearly define what input it will accept, and what output it will give. If anything else is encountered, it should give a clearly written descriptive error message at what went wrong and where.
Code like this may not be the most efficient, but it can get pretty close. (as in it's best to use functions and clearly defined code/module blocks rather than code everything straight through. a la spaghetti code). Even though spaghetti code may run just a tiniest bit faster, as there is no function overhead, using functions will give you a lot more benefits, like clear separation of tasks. Also, document your code !
|