Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I expect programming teams to follow a strict coding standard? [closed]

I am personally a very big fan of following internal coding standards when working with a group of developers. I feel like it brings continuity to the code and allows people to more easily expand the code base, switch off work, and assist each other with difficult tasks. On the other hand I am aware that a large set of people are of the belief that as long as the coding gets done on time and it works that we should embrace the differences in the individual coder’s style.

Seeing both sides of the coin I find it hard to decide if somewhat stifling a programmers style is worth the (sometimes marginal and sometimes grand) benefit gained by having a fairly standards compliant code base. Especially when working within the Agile development framework where speed is important I think it becomes an even more important question.

To exacerbate the situation I am a PHP programmer, so you are very rarely going to meet two coders with the same style since it is largely a self-taught discipline.

Is it better to have a loose set of standards as suggestions and only mandate the very important items (Like restricting Hungarian notation in variable names) or is it better to be iron fisted and require indents be tabs and not spaces and that brackets always be on a line of their own.

Edit:

Should have seen my mistake in the question--I guess I am interested in how strict the standard should be--should they have a lot of latitude or should I lock it down tight?

like image 571
Shane Avatar asked Feb 16 '10 19:02

Shane


People also ask

Why a coding standard is important in team?

The reason why coding standards are important is that they help to ensure safety, security, and reliability. Every development team should use one. Even the most experienced developer could introduce a coding defect — without realizing it. And that one defect could lead to a minor glitch.

Why do companies like their programmers to follow standard coding conventions?

A coding standard makes sure that all the developers working on the project are following certain specified guidelines. The code can be easily understood and proper consistency is maintained. Consistency has a positive impact on the quality of the program and one should maintain it while coding.

How do you enforce good coding standards?

Code standards enforced by automated rule checks improve the readability and maintainability of code—as well as reduce the number of bugs. Set standards help programmers and teams establish self-improvement routines and healthy habits to follow.


1 Answers

In practice, I've found that it's far more important to be strict when it comes to naming than to be strict about formatting.

Luckily, it's far easier to put together a set of standards for naming.

As long as someone's code isn't way off the beaten path as far as readability goes, I don't see why it would be necessary to restrict their own personal style.

like image 123
Jon Seigel Avatar answered Oct 11 '22 13:10

Jon Seigel