You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Katherine Marsden <km...@sbcglobal.net> on 2012/08/14 19:08:16 UTC

spaces the final frontier

Hello  derby-dev,

Are we ready to commit to space indentation for Derby as a matter of 
policy? If so I think it would be worthwhile to reformat all the code to 
use space indentation.

I did some experimentation after  the initial network whitespace change 
for DERBY-5896 [1] and I think the reformat can be reasonably 
mitigated.  I think that it would be worthwhile to move to all spaces 
considering all the extra patch round trips  that we have seen over the 
years due to white space errors. All space indentation would help save 
time and confusion in that regard.

I do seem to recall the last time this came up, some people (can't 
remember who) were  somewhat attached to indentation character as a 
matter of personal choice.  I think if we reformat,  we should commit to 
all spaces moving forward.    Does anyone still  feel that they have to 
have tabs or have objections to reformatting all the code to use spaces?

If not I will call a vote and open an issue to reformat everything.

Best

Kathey


[1] 
https://issues.apache.org/jira/browse/DERBY-5896?focusedCommentId=13433270&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13433270



Re: spaces the final frontier

Posted by Katherine Marsden <km...@sbcglobal.net>.
On 8/15/2012 12:41 PM, Rick Hillegas wrote:
> I agree with what Mike said. Before moving ahead on this effort, we 
> should make sure that we understand how to perform the following tasks:
>
> 1) Tell the code archaeology tool "svn blame" to mask out the diffs 
> introduced by this rototill.
>
> 2) Not make backporting more burdensome.
The -x  -b option on both svn blame and merge seem to do a fine job of 
masking out the noise.

The test cases I use were I tried
svn blame -x -b DRDAConnThread.java
and found no trace of change 1370674 and older changes were able to 
shine through.  Please give it a try yourself and see what you think.

For merge I merged a post format change DERBY-1400
Again -x -b  worked fine.

So as far as I can tell, the developer burden for blame and merge would 
be to add -x -b to the command.

I summarized these and other issues I could think of here:
https://issues.apache.org/jira/browse/DERBY-5896?focusedCommentId=13433270&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13433270

Is there anything special that should be considered for Netbeans or 
other concerns?   It might be good to add a tip on running expand to 
ensure changes are detabified before commit. I will make a Wiki page 
soon to make these tips more visible.

>
> I am unclear on what proposition will be put to a vote. Our existing 
> coding conventions, such as they are, are set out by a vote which 
> ended on 2006-08-16 (see 
> http://old.nabble.com/-VOTE---Approve-coding-conventions-for-the-Derby-project-to5771191.html#a5771954). 
> The already approved, existing conventions state that people should 
> indent code using spaces, not tabs.
>
Well, that vote was honestly a mess and  held before I  understood the 
formal vote should be a pure formality #:)     I don't think it was 
approved  actually. DERBY-1363 is still open at least.  The new vote 
would be:
----

"Please vote to  use only 4 space indentation and spaces for white 
space  in Derby  code  moving forward (no tabs),  after  expanding tabs 
in the trunk code base.  Note: Reformat of the code may necessitate 
specifying -x -b options for svn  merge , blame  and diff commands when 
operating on reformatted code.  Please vote:

[  ] +1   Switch to space indentation for derby moving forward after 
expanding tabs for the trunk code base.
[  ] -1   Do not switch to all space indentation at this time. Keep a 
mixed indentation environment moving forward.

"

Then we would change things like the Developers checklist [1]  to be 
more definitive about indentation.
Does this text look ok  and agreeable ? I would like a vote as there has 
been so much debate in the past and so much tab creep in client even 
though it started out as all spaces.

Kathey

[1] http://wiki.apache.org/db-derby/DerbyContributorChecklist





Re: spaces the final frontier

Posted by Rick Hillegas <ri...@oracle.com>.
I agree with what Mike said. Before moving ahead on this effort, we 
should make sure that we understand how to perform the following tasks:

1) Tell the code archaeology tool "svn blame" to mask out the diffs 
introduced by this rototill.

2) Not make backporting more burdensome.

I am unclear on what proposition will be put to a vote. Our existing 
coding conventions, such as they are, are set out by a vote which ended 
on 2006-08-16 (see 
http://old.nabble.com/-VOTE---Approve-coding-conventions-for-the-Derby-project-to5771191.html#a5771954). 
The already approved, existing conventions state that people should 
indent code using spaces, not tabs.

Will we be voting on whether to move ahead with this rototill? I don't 
see a need for a vote. I trust that Kathey will not move ahead until 
issues (1) and (2) have been addressed.

Will we be voting on some as yet undisclosed schedule of indentation 
conventions for specific kinds of Java code blocks? I doubt that we will 
agree on such a schedule.

Thanks,
-Rick

Re: spaces the final frontier

Posted by Bryan Pendleton <bp...@gmail.com>.
On 08/15/2012 11:30 AM, Mike Matrigali wrote:
> use the right
> flags with svn you can avoid the problems.  We should document what
> is needed to backport cleanly and if there are workarounds to gettting
> reasonable info out of svn blame.

This might be a good place to put the documentation:

http://wiki.apache.org/db-derby/MoveAChangeBetweenBranches

thanks,

bryan



Re: spaces the final frontier

Posted by Mike Matrigali <mi...@sbcglobal.net>.
On 8/14/2012 10:08 AM, Katherine Marsden wrote:
> Hello  derby-dev,
>
> Are we ready to commit to space indentation for Derby as a matter of
> policy? If so I think it would be worthwhile to reformat all the code to
> use space indentation.
>
> I did some experimentation after  the initial network whitespace change
> for DERBY-5896 [1] and I think the reformat can be reasonably
> mitigated.  I think that it would be worthwhile to move to all spaces
> considering all the extra patch round trips  that we have seen over the
> years due to white space errors. All space indentation would help save
> time and confusion in that regard.
>
> I do seem to recall the last time this came up, some people (can't
> remember who) were  somewhat attached to indentation character as a
> matter of personal choice.  I think if we reformat,  we should commit to
> all spaces moving forward.    Does anyone still  feel that they have to
> have tabs or have objections to reformatting all the code to use spaces?
>
> If not I will call a vote and open an issue to reformat everything.
>
> Best
>
> Kathey
>
>
> [1]
> https://issues.apache.org/jira/browse/DERBY-5896?focusedCommentId=13433270&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13433270
>
>
>
>
+1 to a vote

My only concern in the past has been if it would cause problems for 
backporting, and I think tests have been done that if you use the right
flags with svn you can avoid the problems.  We should document what
is needed to backport cleanly and if there are workarounds to gettting
reasonable info out of svn blame.

I think the issue is also causes issues to new users both in editing 
files and round trips with patches.  Anything we can do to get more
people working easier on the code the better.

I would like to just go after this single issue, not a code standard in
general.

Re: spaces the final frontier

Posted by "Dag H. Wanvik" <da...@oracle.com>.
Myrna van Lunteren <m....@gmail.com> writes:

> I think it's worthwhile calling a vote on the tab vs. spaces issue,
> and to reformat the code.

+1.1

Dag

Re: spaces the final frontier

Posted by Myrna van Lunteren <m....@gmail.com>.
On Tue, Aug 14, 2012 at 10:08 AM, Katherine Marsden
<km...@sbcglobal.net> wrote:
> Hello  derby-dev,
>
> Are we ready to commit to space indentation for Derby as a matter of policy?
> If so I think it would be worthwhile to reformat all the code to use space
> indentation.
>
> I did some experimentation after  the initial network whitespace change for
> DERBY-5896 [1] and I think the reformat can be reasonably mitigated.  I
> think that it would be worthwhile to move to all spaces considering all the
> extra patch round trips  that we have seen over the years due to white space
> errors. All space indentation would help save time and confusion in that
> regard.
>
> I do seem to recall the last time this came up, some people (can't remember
> who) were  somewhat attached to indentation character as a matter of
> personal choice.  I think if we reformat,  we should commit to all spaces
> moving forward.    Does anyone still  feel that they have to have tabs or
> have objections to reformatting all the code to use spaces?
>
> If not I will call a vote and open an issue to reformat everything.
>
> Best
>
> Kathey
>
>
> [1]
> https://issues.apache.org/jira/browse/DERBY-5896?focusedCommentId=13433270&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13433270
>
>

Hi Kathey,

I couldn't remember anyone in favor of tabs per se, I remembered
mostly concerns about backporting troubles.
I did some searches through old conversations, and you were right, I
did actually find someone putting in an opinion in favor of tabs, but
he was never a committer, and one committer who felt the formatting
should be a matter for each individual, but that committer hasn't been
active for 5 years at least. Most complaints about the official coding
style up for vote was that it left things too vague.

I think it's worthwhile calling a vote on the tab vs. spaces issue,
and to reformat the code.

Myrna