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

learn more… | top users | synonyms

111
votes
37answers
62k views

Should curly braces appear on their own line? [closed]

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()) { ...
10
votes
6answers
4k views

Code formatting SQL queries

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 , ...
28
votes
30answers
7k views

Is it common to print out code on paper? [closed]

I like to keep my lines of code under 80 characters because: I don't have to do any horizontal scrolling; I know the line is probably too complicated if it exceeds this limit; and it prints out ...
65
votes
17answers
6k views

Is imposing the same code format for all developers a good idea?

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 ...