Closed fub-frank closed 11 years ago
I would prefer to stay by an K&R style like the eclipse default one. I like to have more code on one screen. Out of maintenance-perspective i like the 1TBS version but this will be somewhat to specific.
Hope this this topic will not end in a fundamental debate.
I agree with what @flofreud said. We should keep the eclipse default. If everyone uses the eclipse source code tools for correcttion of identations and so on, our code should be clean as well. Therefore, we should close this issue if this is ok for all.
Personally I like the Allman style as well, as it's one of the few logically correct styles (the K&R style is logically broken as it separates the symbols for a block statement's beginning and end) and I consider the few extra lines a cheap price in the age of more than 50 lines of code per screen. Just my opinion, though, whatever gets chosen, I'll abide by it. @dildik I don't think whether people use eclipse or not should be a factor for which style is used, as you can use a template for whatever style you want and @SWP-Comp-Ch3ck3r already provided one for Allman. Also, I won't be using eclipse, but this has no impact on me being able to keep the code clean (which I will, of course, no matter which style gets chosen).
@SWP-Comp-moritz I understand your opinion and integrating a new style into eclipse is given (thanks to the xml file) but my thought was, that most of the members of the course are familiar with eclipse and I think that most of them just use eclipse and the default settings or also uses the K&R style within other IDE's/editors (or maybe I am wrong). And to be honest, I prefer the K&R style, too. But if it is desired, we should open a new wiki page with coding guidlines, guidelines for documentation and eventually for a style.
my thought was, that most of the members of the course are familiar with eclipse and I think that most of them just use eclipse and the default settings or also uses the K&R style within other IDE's/editors
I think you're right in your prediction about the usage behavior and people's preferences, but if those people want a style (be that K&R like you predict, or any other for that matter) they are free to say so here and contribute to making a majority decision; this discussion is (afaik) open to everyone in the course and will likely continue for a couple of days (giving everyone enough time to think about what they would like and post about that at least once), so if they do consider this matter important I would rather them writing their opinion here themselves than us making decisions based on what we think they prefer - even if the assumption of most people desiring K&R is probably accurate.
But if it is desired, we should open a new wiki page with coding guidlines, guidelines for documentation and eventually for a style.
That seems like a good idea to me and I support it, but I'd wait on that until it's clear what style, etc. the majority wants.
I do prefer K&R as well..... but:
I don't think whether people use eclipse or not should be a factor for which style is used,
Well, it should not, but it will. If we force everybody to use a specific style, the process will take some time until everyone uses it. By then, many commits will be changed to correct the style, tickets will be assigned which request to use the style etc. .
Long story short: We should keep the default in my opinion. Even if it's not the perfect one in some aspects, it's the default style of the IDE we've chosen ( anyhow in the javabite-group) and thereby implicit the default style.
I propose: We'll wait until Monday and -- if nobody announces that this style is absolute inacceptable for him/her --, we close this issue and use the default style.
To be honest, i don't think this issue is just not worth it. ( the type of indentation style is not what makes code understandable, readable or maintainable ... as long as there is some common style;) ).
I hope, that is okay for you , @SWP-Comp-moritz and @SWP-Comp-Ch3ck3r ?
I vote for K&R ;-)
"Hope this this topic will not end in a fundamental debate." @flofreud
never change a running system :) (K&R) please.
+1 for Allman Style
If we force everybody to use a specific style, the process will take some time until everyone uses it.
This is true, however, for whichever style gets chosen.
By then, many commits will be changed to correct the style, tickets will be assigned which request to use the style etc. .
Which is why I think it to be important to reach a majority-based decision before next Thursday, as we have only interfaces for now, so the amount of code that has to be made to conform is still rather low and we can use the next Thursday to make sure everyone knows to use the chosen style (whichever that is going to be).
it's the default style of the IDE we've chosen ( anyhow in the javabite-group)
I do understand your point, I'd just like to point out that iirc (I may be wrong here) the repo won't have any IDE-specific project files, so technically that should not be the major deciding factor.
I propose: We'll wait until Monday and -- if nobody announces that this style is absolute inacceptable for him/her --, we close this issue and use the default style.
I counter-propose: We'll wait until Tuesday and then use the style that gets the most votes because which style gets chosen should not be a minority decision. If K&R gets chosen, I have no problem with that as long as it's a decision made by the majority.
Even if it's not the perfect one in some aspects To be honest, i don't think this issue is just not worth it. ( the type of indentation style is not what makes code understandable, readable or maintainable ... as long as there is some common style;) ).
It's not just not perfect, it's logically broken; but you're right, the style itself is not a major factor as long as we all commit to uploading a single one (most complex editors - including eclipse's afaik - can show you a source file in whatever style you choose, let you edit it in that style, and then save the file in the same style that it had when you opened it and not the style that was shown to you, effectively meaning you can code in whatever style you want), which in my opinion is the reason why this is an important issue: If we don't discuss it and reach a valid majority-based decision that can be quoted there may be people continuously using different styles, which will hurt readability, maintainability and make the code uncomfortable to read.
Also, since what we discuss here is only brace style and not also indentation (but the thread title is indentation) I suggest we vote on the matter of indentation as well (again, it's not as important which style we choose, as long as everybody has a chance to state his opinion, so that we can reach a majority-based decision everyone can live with): I propose one indentation level to be one TAB character. In that case we should then use tabs for indentation, space for alignment, see the "Content" part here for an explanation why that is beneficial, especially the example which demonstrates how this keeps things properly aligned for different interpretations of a TAB characters width (allowing variable viewing width for indentations). The alternative would be to be spaces-only, which imho has the severe disadvantage of fixed viewing width for indentations, but rather that then mixing tabs and spaces without the previous mentioned convention.
I'd like to abstain from voting, but if another vote is necessary to obtain a majority i'll be in favor of K&R + Moritz's last-comment-TAB-proposal.
Result of Vote: K&R default eclipse style Result of Vote: Tab for indentation
I think we should all use the same indentation style in this project to make the code look homogenous.
I would suggest Allman Style. You can find a list of indentation styles at Wikipedia.
Since Allman Style is not eclipse's default style i have uploaded a code formatter template for Allman Style here: https://github.com/swp-uebersetzerbau-ss13/fuc/tree/master/tools