coding style - What is the best way to use whitespace while programming? -


I am quite new to programming and learning; I have seen different methods of drafting code, comments, etc.; And it has been recommended on various techniques.

I'm mostly in C #, C ++, and Java programs so I want to know what is the best way to layout code so that other people from where to go, how simple and easy it is Understand, it is affected.

The best rule is to follow: (and possibly only the rules will agree) / Em>

Be consistent!

Choose a style and stick with it always put your braces in one place. Do not use similar naming conventions tabs and spaces, etc. ...

Being told.


Working on a team with people , make sure that you are already trying conventions for any language. All agree on a style and stick with it if you do not, then a developer will again reformat a file with its auto-format, and then you may have hundreds of small conflicts that are just white space. Reasons are there.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -