Skip to content

Error-free programming

March 15, 2017

There are diffrent ways of coding. All is related to the programmers. Some prefers a copy and paste of a code found on Internet, others use new code from their conception and some others love frameworks.

There is no rules.

BUT, programming is one of my job (I work on security, architectures and some other fields around the computing science) and I can say, there are two ways of coding: the “error-prone” coding and the “error-free” coding.

The “error-prone” coding is a way to code where other programmers using your code will have bad surprises. The “error-free” coding, on the other hand, is a way that other programmers will be warned if they try to use the code in a bad way.

Basically, the “error-free” coding is just a way to code for others. Including clarity and simplicity. Usually, it is a “KISS” (keep it simple and stupid) approach but sometimes the code can be very tricky, alwas including resilient.

The resilience can be adapted to code. The code should be resilient to issues (I mean bugs). A resilient code will be usable in many cases and will be reused. Usually, coders are reluctant to reuse a code written by pairs due to the understanding fo “what it does”.

How to code in a error-free way?

No secret. You must follow the good practises of programmation. Some of them are: use correct indentation, clean code (in the way it is readable), use explicit variable names, don’t try to optimize your code before it works. Try to separate the operations to be done is smaller  ones. These things.

But error-free coding does better. In the folloing articles about this subject, I will give you some advices about what good code should be. I don’t expect you will follow everything but if you follow some of the points exposed, you will be surprised about the quality of deliveries.

 

 

 

Advertisements

From → Coding

One Comment
  1. Error-free coding is almost impossible. NASA has to do error-free coding whenever they can, and they have a great record as far as that goes. (Just dont give them a ruler that has Inches and Centimeters on it.)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: