[eclipse-arduino-dev] Re: formatting

  • From: Roberto Lo Giacco <rlogiacco@xxxxxxxxx>
  • To: eclipse-arduino-dev@xxxxxxxxxxxxx
  • Date: Sat, 7 May 2016 01:11:24 +0200

My personal preference is 120 or 160 before word wrapping occurs. I agree
80 is quite old style and was due the 80 columns screens which are long
gone today.

With regards to tabs and similar formatting things I've found quite a lot
of troubles with Jan's code, but I'm not sure it is actually Jan creating
the issue... It's weird because most of the files I open seem not formatted
with tabs, but with a mix of spaces and tabs...

Anyway, whenever I encounter these troubles I simply apply the standard
formatting rules... and since I haven't been kicked in the butt yet....


:-)

Roberto

On Sat, May 7, 2016 at 12:30 AM, Jan Baeyens <jan@xxxxxxxxxx> wrote:

Ok

I give in.

Op 6/05/2016 om 23:11 schreef Wim Jongman:

I think it is bad because:

When you want to read comments you don't want the line to be too long. 200
is too long. [1]

With short lines we can hold two editors side by side.

Also why would you want to have a code line that is over 200? In these
cases it is code style rather than line length.

IMHO shorter is the way to go. Not longer. Same for methods. See also [2]



[1]
https://www.smashingmagazine.com/2014/09/balancing-line-length-font-size-responsive-web-design/

[2]
http://programmers.stackexchange.com/questions/133404/what-is-the-ideal-length-of-a-method-for-you


On Fri, May 6, 2016 at 9:50 PM, Jan Baeyens <jan@xxxxxxxxxx> wrote:

255 may be a bit too long but 80 for comments is way to small.

I understand your multiple project setup problem. You don't want a
workspace per project. However eclipse does support specific settings per
project.

And only changing the linelength to (lets say) 200 for code and comments
is not that bad, is it?

Op 6/05/2016 om 20:49 schreef Wim Jongman:

It all depends where you are working. I work on a macbook pro with a 1440
resolution. 255 line length is too long in that environment.

Changing the defaults will cause many problems with formatting again
unless you setup up formatting on a per project basis and check in these
settings per project. This is hard to maintain.

Cheers,

Wim


On Fri, May 6, 2016 at 8:35 PM, Jan Baeyens < <jan@xxxxxxxxxx>
jan@xxxxxxxxxx> wrote:

Seemed I made a mistake.

Brings me to a remark.

I changed line length for comments and code to 255 in the formatter.

120 and 80 is way to little.



Op 6/05/2016 om 20:24 schreef Jan Baeyens:

Hi

I'm all confused here and I need some help to get my head around it.

I want to check in Const.java and I see nearly all lines will be
replaced.

This because my local version uses tabs where the head seems to use
spaces.

I checked my settings and I use java conventions[build in] and I have
been as far as I can recall.

The latest checkin was done by me and I have format on safe (full file)
on :-s

Can this be explained?

<a href="https://www.freelists.org/list/eclipse-arduino-dev>
<eclipse-arduino-dev@xxxxxxxxxxxxx>eclipse-arduino-dev@xxxxxxxxxxxxx
</a>



<a href="https://www.freelists.org/list/eclipse-arduino-dev>
<eclipse-arduino-dev@xxxxxxxxxxxxx>eclipse-arduino-dev@xxxxxxxxxxxxx</a>






Other related posts: