Chris Donnan : Programming – Brooklyn Style
software, trading, family, fun
Why coding standards??????
Posted Agile Development, coding on Tuesday, November 8th, 2005.
Posted Agile Development, coding on Tuesday, November 8th, 2005.
From: sun
Why have code conventions? Code conventions are important to programmers for a number of reasons:
- 80% of the lifetime cost of a piece of software goes to maintenance.
- Hardly any software is maintained for its whole life by the original author.
- Code conventions improve the readability of the software, allowing engineers to understand new code more quickly and thoroughly.
From: My fav
- Avoidance of errors/bugs, especially the hard-to-find ones.
- Maintainability, by promoting some proven design principles.
- Maintainability, by requiring or recommending a certain unity of style.
- Performance, by dissuading wasteful practices.
- Rules and recommendations are given that promote reliability and maintainability.
From: ambysoft
Why Coding Standards are Important
Coding standards for Java are important because they lead to greater consistency within your code and the
code of your teammates. Greater consistency leads to code that is easier to understand, which in turn
means it is easier to develop and to maintain. This reduces the overall cost of the applications that you
create.
You have to remember that your Java code will exist for a long time, long after you have moved on to other
projects. An important goal during development is to ensure that you can transition your work to another
developer, or to another team of developers, so that they can continue to maintain and enhance your work
without having to invest an unreasonable effort to understand your code. Code that is difficult to
understand runs the risk of being scrapped and rewritten – I wouldn’t be proud of the fact that my code
needed to be rewritten, would you? If everyone is doing their own thing then it makes it very difficult to
share code between developers, raising the cost of development and maintenance.
Inexperienced developers, and cowboys who do not know any better, will often fight having to follow
standards. They claim they can code faster if they do it their own way. Pure hogwash. They MIGHT be
able to get code out the door faster, but I doubt it. Cowboy programmers get hung up during testing when
several difficult-to-find bugs crop up, and when their code needs to be enhanced it often leads to a major
rewrite by them because they’re the only ones who understand their code. Is this the way that you want to
operate? I certainly do not.
Coding standards for Java are important because they lead to greater consistency within your code and the
code of your teammates. Greater consistency leads to code that is easier to understand, which in turn
means it is easier to develop and to maintain. This reduces the overall cost of the applications that you
create.
You have to remember that your Java code will exist for a long time, long after you have moved on to other
projects. An important goal during development is to ensure that you can transition your work to another
developer, or to another team of developers, so that they can continue to maintain and enhance your work
without having to invest an unreasonable effort to understand your code. Code that is difficult to
understand runs the risk of being scrapped and rewritten – I wouldn’t be proud of the fact that my code
needed to be rewritten, would you? If everyone is doing their own thing then it makes it very difficult to
share code between developers, raising the cost of development and maintenance.
Inexperienced developers, and cowboys who do not know any better, will often fight having to follow
standards. They claim they can code faster if they do it their own way. Pure hogwash. They MIGHT be
able to get code out the door faster, but I doubt it. Cowboy programmers get hung up during testing when
several difficult-to-find bugs crop up, and when their code needs to be enhanced it often leads to a major
rewrite by them because they’re the only ones who understand their code. Is this the way that you want to
operate? I certainly do not.
From: macadamian
At Macadamian we’ve always believed the path to enlightenment starts with a solid set of Coding Conventions.
From: chris-lott
When a project tries to adhere to common standards a few good things happen:
- programmers can go into any code and figure out what’s going on
- new people can get up to speed quickly
- people new to C++ are spared the need to develop a personal style and defend it to the death
- people new to C++ are spared making the same mistakes over and over again
- people make fewer mistakes in consistent environments
- programmers have a common enemy
From: extremeprogramming.org
Code must be formatted to agreed coding standards. Coding standards keep the code consistent and easy for the entire team to read and refactor.
PS – this is an extreme admonition – PROJECTS NEED CODING STANDARDS!!!!!
Comment on this post below
You must be logged in to post a comment.
You can leave a response, or trackback from your own site.
