Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [triquetrum-dev] code formatting standards

this seems a good approach to agree to disagree ;-)
i.e. each project "owner" defines the prefs for the project, and anyone contributing later on to that project just has to follow the original choices.
is that the goal of storing formatting prefs in each project?

personally (and in the meantime most of us at isencia) I've been working with the 2-spaces and long lines since many years. I think 4 spaces is a waste of screen space. At the moment all Triq code is doing the 2 spaces.

but on the other hand, it's not worth too much discussion, so if most of us prefer something else I could imagine that we reformat everything in line with the majority's desires, before the Science 2016 release.

cheers
erwin

Op 16/06/2016 om 22:00 schreef Jonah Graham:
+1 on storing the settings in the project. I will be doing that for
the AnalysisRPC plug-ins I am working on at the moment.

Jonah
~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com


On 16 June 2016 at 20:03, Torkild U. Resheim <torkildr@xxxxxxxxx> wrote:
I’m not a committer on this project, but I I’m taking the chance to utter my
opinion anyway :) I think what Christopher says is a good idea; use the
default Eclipse coding style with longer lines. Also it’s a good idea to
store these settings per project (can be enabled through "project properties
Java Code Style > Formatter». This way the settings can be versioned
(.settings/org.eclipse.jdt.ui.prefs) and shared between developers. Also the
«Context menu > Source > Format» action and equivalent will use these
settings, so if you’re unsure that you got it right, just format the code
you’ve edited. Or even set a save action to automatically format edited
code.

Best regards,
Torkild


16. jun. 2016 kl. 17.53 skrev Christopher Brooks <cxh@xxxxxxxxxxxxxxxxx>:

I think we should probably follow the Eclipse coding style, which is 4
spaces for indentation.

As part of the release, we should clean the code, see
https://github.com/eclipse/triquetrum/issues/79

I had assumed that part of this would be to use Eclipse to clean the code
using the Eclipse style formatter.

Longer lines are OK with me.

As a matter of personal preference, I prefer CamelCase names over names that
have abbreviations (CmlCs).  However, we need not enforce that.

I also prefer that code be well commented.  A lot of open source code has no
comments and is very difficult to reuse.

_Christopher




On 6/16/16 6:49 AM, Erwin de Ley wrote:

Hi Jonah,

I have attached the exported prefs from the Java/Code Style/Formatter
preferences.

The main things :

- indentations are 2 spaces, no TABs

- longer lines (160 chars)

cheers

erwin

Op 16/06/2016 om 15:35 schreef Jonah Graham:

Hi Erwin,

Are there code formatting standards for Triq?

Thanks
Jonah

~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com
_______________________________________________
triquetrum-dev mailing list
triquetrum-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/triquetrum-dev





_______________________________________________
triquetrum-dev mailing list
triquetrum-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/triquetrum-dev


--
Christopher Brooks, PMP                       University of California
Academic Program Manager & Software Engineer  US Mail: 337 Cory Hall
CHESS/iCyPhy/Ptolemy/TerraSwarm               Berkeley, CA 94720-1774
cxh@xxxxxxxxxxxxxxxxx, 707.332.0670           (Office: 545Q Cory)

_______________________________________________
triquetrum-dev mailing list
triquetrum-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/triquetrum-dev



_______________________________________________
triquetrum-dev mailing list
triquetrum-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/triquetrum-dev

_______________________________________________
triquetrum-dev mailing list
triquetrum-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/triquetrum-dev




Back to the top