Skip to main content

Questions tagged [code-formatting]

focuses on legibility and consistent look of code: lexical-level intelligibility is a basic element of coding-style

Filter by
Sorted by
Tagged with
97 votes
17 answers
22k views

We are considering to impose a single standard code format in our project (auto format with save actions in Eclipse). The reason is that currently there is a big difference in the code formats used by ...
329 votes
36 answers
397k views

Should curly braces be on their own line or not? What do you think about it? if (you.hasAnswer()) { you.postAnswer(); } else { you.doSomething(); } or should it be if (you.hasAnswer()) { ...
31 votes
29 answers
100k views

There has been a few remarks about white space already in discussion about curly braces placements. I myself tend to sprinkle my code with blank lines in an attempt to segregate things that go ...
18 votes
6 answers
13k views

Should I break SQL queries in different lines? For example in the project I am working on, we have a query that is taking 1600 columns! 1600 + tab chars. I wrote queries like this: "SELECT bla , ...
GorillaApe's user avatar
27 votes
5 answers
2k views

I almost always format my code before I commit to make sure it's done properly. Most of my team don't really care and don't always format their code properly (minor things that don't affect the code ...
Allan Wight's user avatar
3 votes
1 answer
477 views

Our team is growing, and with it, discontent with common coding standards being imposed on developers with alternate (strong, bordering on religious) views on what constitutes a good coding style. ...
Steve Lorimer's user avatar