Relative Content

Tag Archive for code-formatting

Are there published guidelines, standards, or references that propose more than 80 chars per line?

Despite increases in screen size and resolution, many sources still suggest that code be limited to 80 characters per line. I realize than there are many different opinions on this subject, but I wonder whether there are any standards bodies or influential firms that use other limits (120 characters is a common alternative). For example, are any standards bodies considering “enlarging” the suggested limit? Are there large scale software projects (e.g. at NASA or ESA) that use larger limits?

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

Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted. We are considering to impose a single standard code format in our project (auto format with save actions in Eclipse). The reason is that […]

Is it a good idea to format the code in eclipse using auto format

I use eclipse for coding, and the language which we use is Java.
Once it was suggested by someone that to properly format the code,
using the auto formatter(CTRL+SHIFT+F)
While this command does format the code, but sometimes I feel that overall
look becomes weird, and it is not actually very readable.

Chosing a parser for a code beautifier

I’m in the planning stage of making a code beautifier (similar to AStyle or Uncrustify) – originally I was going to just contribute to one of those projects,
but reviewing their source led me to the conclusion that I have different design goals and that their source is written in a way that makes it difficult for an outsider to easily contribute. AStyle, for example, instead of building some sort of AST, uses over 100 state variables such as isInComment, foundClassHeader, isLineReady, etc.

Should I write compact code or code with lots of spaces? [duplicate]

This question already has answers here: How important is it to reduce the number of lines in code? (23 answers) Closed 11 years ago. I have two friends that have completely different schools of thought on how to lay out their code. The first says that code should be well-indented and use lots of spaces […]

Code formatting for variable declarations [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for […]

Styling/formatting file for programmers, has it been done?

has there ever been a proposal for establishing a formatting style file for programmers? In web programming, we have CSS files that help separate style from ‘code’, so two people can see the same code while each can see it in his/her preferred way.