Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Programming Style important? How Important? [closed]

People also ask

Why is style important in programming?

Programming style is a set of rules or guidelines used when writing the source code for a computer program. Following a particular programming style will help programmers read and understand source code conforming to the style, and help to avoid introducing errors.

What is meant by programming style?

A programming style is a set of guidelines used to format programming instructions. It is useful to follow a style as it makes it easier for programmers to understand the code, maintain it, and assists in reducing the likelihood of introducing errors.

What is a secret to a good programming style?

Programming style is a term used to describe the effort a programmer should take to make his or her code easy to read and easy to understand. Good organization of the code and meaningful variable names help readability, and liberal use of comments can help the reader understand what the program does and why.


No programmer is an island. Someone is going to have to read their code one day. It's been repeated here many times before:

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Martin Golding (maybe)

That said, if their style is adequate, there are other much more important things to evaluate when hiring a programmer. But if they utterly refuse to use comments or attempt to make their code readable to others, it is a deal-breaker.


A developer who doesn't care about style is like an artist, a painter, who doesn't care about color.


Code is read by three entities: The computer, the programmer, and ultimately the maintainer.
Style and Formatting is irrelevant to the computer, possibly important to the programmer, but it is certainly important to the maintainer, who has to try and comprehend the program's functionality.
Refusing to accommodate other developers by making code readable is disrespectful.
Creating organized code with meaningful variable names and comments is a form of common courtesy to anyone else who reads it.


There's little excuse for not commenting and none for not indenting. Indentation is handled by most of the best editors and commenting should come as second nature for somebody who MS might like to hire.

They're certainly both disciplines that people get into (either naturally or through schooling) so not showing either, perhaps, shows a lack of discipline, or, at least effort to express it.

Edit: 2 hours for a linked list?! I see he meant now... Fitting in all that formatting in the remaining one hour, fifty minutes would have been pretty tough! (I'm only playing around - I assume there was more to the interview than a linked list!)