CodeExcellence's Code Quality Governance Blog

8 Must-Have Characteristics for Writing Quality Code

Posted by on May 18th, 2012 at 6:42am

Have you ever asked yourself what makes code great? It is not an easy question to answer as every programmer seems to have a different answer. I always like to take a step back when answering a question like this and consider what code characteristics that I think are great to work with. Consider these 8 must-have characteristics when evaluating the ‘quality’ of your code, no matter the language:

  1. Efficiency
    Obviously, clean code is fast code. Code that is clearly written is easier to maintain and tends to be faster because it indicates that the code was correctly developed and refactored to its core purpose.
  2. Maintainability
    The characteristic of truly maintainable code is to write it for other people to read. This means a combination of keeping it short, simple and consistent or ‘KISS’; good comments, consistent coding standards, good naming conventions of variables, functions… and clean logic. Above all, always think of those who come after you.
  3. Well Structured
    Well-structured code is basically about how the various objects in a software code base collaborate with each other. This is important to an organization because the structure of software largely determines how long it takes and how expensive it is to develop, test, extend, and maintain a software system.
  4. Regarded by your peers
    Good programmers know good code. You know you are doing a good programming job when your peers have good things to say about your code and prefer to copy and paste from your programs. That’s what it means to be regarded by our peers. It is a testimony to you doing a good job in the profession.
  5. Readable
    Another important characteristic is how easy is to read and understand the code and its purpose. Good readability means that when a new developer touches the code, it will take less time to understand what the code is doing.
  6. Reliability
    Code that is stable will not cause short dumps. This means more reliable applications and less downtime to the business.
  7. Follows Standards
    This characteristic means that the code follows a set of guidelines, rules and regulations that are set by the organization. It will help programmers more easily understand and maintain source code when it conforms to standards. Adhering to coding standards result in greater consistency and uniformity of delivered code regardless of programmer style.
  8. Extensibility
    This characteristic means how easily code can adapt to changing conditions or how easy is it to add new functionality. High extensibility translates into less time for a developer to adapt the code to new functionality.

What other characteristics do you think are must-haves for quality code?

One thought on “8 Must-Have Characteristics for Writing Quality Code

  1. Pingback: Creating Objects of Beauty with Unique Program Management ToolsBest Programmer Tools

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>