fbpx
Close

10 things to be sensitive to deliver brilliant code

by T Ashok @ash_thiru on TwitterS

Summary
Great code is not result of mere unit/dev testing at the early stage. It is really a mindset that is key to producing brilliant code. This article outlines ten things that a developer should be very sensitive to enable the delivery of brilliant code.


 1.Be focussed
In each code fragment, do one thing well.  Attempting to do many things can become messy! Stay single-minded in what you are solving with this code.

2.Be defensive
Accidents happen, inputs may be tainted. Prepare for eventualities, be defensive in your style of coding. After all, it is your responsibility to stay safe!

3.Be clean
Reduce clutter in code, it is just about somehow getting the code to do work. Organisation, structure matters.

4.Be malleable
Avoid magic numbers, hardcoding. Be soft and pliable so that you can modify, extend easily.

5.Be expansive
Strive to understand the larger context where your code will be used, so that your code delivers value. ‘See the forest for the trees’ too.

6.Be a good citizen
Respect the environment in which the code runs, consume resources only what you need and release them when you need don’t them.

7.Be maintainable 
Code begs changes to be done the minute you execute it. Make it maintenance friendly. Also, remember that it may just be you who will maintain the code. Well with time, one also forgets why some things are, the way it is.

8.Be efficient..
It is not just about the functionality, it is about all other ‘-ities’, like security, reliability, compatibility, performance etc. Be sensitive to these aspects while you are coding.

9.Be testable
The ability to ascertain if the code is behaving correctly is paramount. Putting it hooks to enable testability enables you to write great code.

10.Be beautiful
Finally great code is not just text that when executed, works correctly. Treat it as a work of art that you produce. Let the choice of names, the structure, the organisation have a sense of aesthetic appeal. After all brilliant engineering becomes art.


About SmartQA The theme of SmartQA is to explore various dimensions of smartness to leapfrog into the new age of software development, to accomplish more with less by exploiting our intellect along with technology.  Towards this, we will strive to showcase interesting thoughts, expert industry views through high-quality content as articles, posters, videos, surveys outlined as a SmartQA Digest weekly emailer. SmartBites is “soundbites from smart people”. Ideas, thoughts and views to inspire you to think differently.

Leave a Reply

Your email address will not be published. Required fields are marked *