You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Jürgen Schmidt <jo...@googlemail.com> on 2012/07/20 12:14:33 UTC

Coding guideline or common rules

Hi,

I just stumbled over a commit message for the new UOF filter.

I think we should agree on a common guideline for our code and how we
contribute changes and bring them in the code.

SCM's manage the change sets and the information who made the change,
that means we don't need further comments like this

///Begin Added by wangyumin for uof2-filter from cs2c
...
/// End Added by wangyumin on 2012-2-22 14:32:18

It is somewhat redundant and makes the code not really better readable.
Can we agree on the common understanding that we don't need such
comments and that we don't want them in the code. We should remove such
comments wherever we see or find them.

Don't get me wrong, my intention is to keep the code better readable ;-)

Any opinions?

Juergen


See for example:
--- incubator/ooo/trunk/main/scp2/source/ooo/directory_ooo.scp (original)
+++ incubator/ooo/trunk/main/scp2/source/ooo/directory_ooo.scp Fri Jul
20 08:24:50 2012
@@ -420,6 +420,16 @@ Directory gid_Dir_Share_Xslt_Import_uof
     ParentID = gid_Dir_Share_Xslt_Import;
     DosName = "uof";
 End
+///Begin Added by wangyumin for uof2-filter from cs2c
yumin.wang@cs2c.com.cn on 2012-2-22 14:32:18
+Directory gid_Dir_Share_Xslt_Export_uof2
+    ParentID = gid_Dir_Share_Xslt_Export;
+    DosName = "uof2";
+End
+Directory gid_Dir_Share_Xslt_Import_uof2
+    ParentID = gid_Dir_Share_Xslt_Import;
+    DosName = "uof2";
+End
+/// End Added by wangyumin on 2012-2-22 14:32:18
 Directory gid_Dir_Share_Xslt_Export_Wordml
     ParentID = gid_Dir_Share_Xslt_Export;
     DosName = "wordml";

Re: warning while playing with UOF

Posted by Jürgen Schmidt <jo...@googlemail.com>.
On 7/26/12 10:56 PM, Pedro Giffuni wrote:
> Hello;
> I started playing (writing and then re-reading a "hello world" document)with UOF and I noticed this warning:
> openoffice-r1356713-swriterWarning: at xsl:variable on line 14352 column 36 of odf2uof.xsl:  SXWN9001: A variable with no following sibling instructions has no effect
> cheers,
> Pedro.
> 
you should have started a new thread for this ;-)

Juergen

Re: warning while playing with UOF

Posted by "hongyun.an" <ho...@cs2c.com.cn>.


>Hello;
>I started playing (writing and then re-reading a "hello world" document)with UOF and I noticed this warning:
>openoffice-r1356713-swriterWarning: at xsl:variable on line 14352 column 36 of odf2uof.xsl:? SXWN9001: A variable with no following sibling instructions has no effect cheers,

It is a warning message. It means the variable on line 14352 is not used.It should be deleted.
This warning message could not influence the UOF v2.0 convertion result.

>Pedro.

warning while playing with UOF

Posted by Pedro Giffuni <pf...@apache.org>.
Hello;
I started playing (writing and then re-reading a "hello world" document)with UOF and I noticed this warning:
openoffice-r1356713-swriterWarning: at xsl:variable on line 14352 column 36 of odf2uof.xsl:  SXWN9001: A variable with no following sibling instructions has no effect
cheers,
Pedro.

Re: Re: Coding guideline or common rules

Posted by "hongyun.an" <ho...@cs2c.com.cn>.
Sorry for the puzzling.I beg your pardon for my inexperience about it.

I have cleaned the redundant comments about UOF v2.0 source code on version 1364477.

In addition:
I submitted the UOF v2.0 source code on 20th July,on the version 1363673.
But I forgot adding the comments on the log message.Then I added the explain on the version 1363677.
--------------
hongyun.an

>On 20 July 2012 22:22, Dennis E. Hamilton <de...@acm.org> wrote:
>> I've seen the comment about SCMs being sufficient for tracing the provenance of code and the changes that are made.  That puzzles me.
>>
>>  - History doesn't appear in source-code tarballs.
>>  - It requires the original SCM repository or a history-preserving port of the SCN to be available to interested parties.
>>
>> Basically, it is not a durable form of the information.
>
>Indeed, especially since SVN log messages are not versioned.
>
>I think log messages should only be used to inform the reader of the
>commit message why the commit was done.
>They should not be used for comments that are useful / necessary to
>the reader of the code; those should be included as comments in the
>code itself.
>[Though of course such comments can go in the log message as well.]
>
>However, does the end user of the source need to know provenance and history?
>
>> Just sayin' ...
>
>DItto.
>
>>  - Dennis
>>
>> -----Original Message-----
>> From: Pedro Giffuni [mailto:pfg@apache.org]
>> Sent: Friday, July 20, 2012 12:52
>> To: ooo-dev@incubator.apache.org
>> Subject: Re: Coding guideline or common rules
>>
>> FWIW;
>>
>>
>> ----- Original Message -----
>> ...
>>>
>>> Hi,
>>>
>>> I just stumbled over a commit message for the new UOF filter.
>>>
>>> I think we should agree on a common guideline for our code and how we
>>> contribute changes and bring them in the code.
>>>
>>> SCM's manage the change sets and the information who made the change,
>>> that means we don't need further comments like this
>>>
>>> ///Begin Added by wangyumin for uof2-filter from cs2c
>>> ...
>>> /// End Added by wangyumin on 2012-2-22 14:32:18
>>>
>>> It is somewhat redundant and makes the code not really better readable.
>>> Can we agree on the common understanding that we don't need such
>>> comments and that we don't want them in the code. We should remove such
>>> comments wherever we see or find them.
>>>
>>
>> Indeed, I did mention in our local svn tutorial that those comments should be
>> avoided. SVN does a wonderful job maintaining the origin information.
>>
>>> Any opinions?
>>
>>
>> As a side note, I recently found similar prominent begin/end lines in another
>> project and the culprit on that project was the GPLv2 section 2a:
>>
>> "You must cause the modified files to carry prominent notices stating
>> that you changed the files and the date of any change."
>>
>>
>> It's probable that old code from GPLd derivatives still carry such notes.
>>
>> Someone will have to clean them ;).
>>
>> Pedro.
>>

Re: Coding guideline or common rules

Posted by Jürgen Schmidt <jo...@googlemail.com>.
On 7/20/12 11:42 PM, sebb wrote:
> On 20 July 2012 22:22, Dennis E. Hamilton <de...@acm.org> wrote:
>> I've seen the comment about SCMs being sufficient for tracing the provenance of code and the changes that are made.  That puzzles me.
>>
>>  - History doesn't appear in source-code tarballs.
>>  - It requires the original SCM repository or a history-preserving port of the SCN to be available to interested parties.
>>
>> Basically, it is not a durable form of the information.
> 
> Indeed, especially since SVN log messages are not versioned.
> 
> I think log messages should only be used to inform the reader of the
> commit message why the commit was done.
> They should not be used for comments that are useful / necessary to
> the reader of the code; those should be included as comments in the
> code itself.
> [Though of course such comments can go in the log message as well.]

Is it possible that you mix something here. We don't talk about useful
comments that give some further information to specific code section or
explain functions etc.

Juergen

> 
> However, does the end user of the source need to know provenance and history?
> 
>> Just sayin' ...
> 
> DItto.
> 
>>  - Dennis
>>
>> -----Original Message-----
>> From: Pedro Giffuni [mailto:pfg@apache.org]
>> Sent: Friday, July 20, 2012 12:52
>> To: ooo-dev@incubator.apache.org
>> Subject: Re: Coding guideline or common rules
>>
>> FWIW;
>>
>>
>> ----- Original Message -----
>> ...
>>>
>>> Hi,
>>>
>>> I just stumbled over a commit message for the new UOF filter.
>>>
>>> I think we should agree on a common guideline for our code and how we
>>> contribute changes and bring them in the code.
>>>
>>> SCM's manage the change sets and the information who made the change,
>>> that means we don't need further comments like this
>>>
>>> ///Begin Added by wangyumin for uof2-filter from cs2c
>>> ...
>>> /// End Added by wangyumin on 2012-2-22 14:32:18
>>>
>>> It is somewhat redundant and makes the code not really better readable.
>>> Can we agree on the common understanding that we don't need such
>>> comments and that we don't want them in the code. We should remove such
>>> comments wherever we see or find them.
>>>
>>
>> Indeed, I did mention in our local svn tutorial that those comments should be
>> avoided. SVN does a wonderful job maintaining the origin information.
>>
>>> Any opinions?
>>
>>
>> As a side note, I recently found similar prominent begin/end lines in another
>> project and the culprit on that project was the GPLv2 section 2a:
>>
>> "You must cause the modified files to carry prominent notices stating
>> that you changed the files and the date of any change."
>>
>>
>> It's probable that old code from GPLd derivatives still carry such notes.
>>
>> Someone will have to clean them ;).
>>
>> Pedro.
>>


Re: Coding guideline or common rules

Posted by sebb <se...@gmail.com>.
On 20 July 2012 22:22, Dennis E. Hamilton <de...@acm.org> wrote:
> I've seen the comment about SCMs being sufficient for tracing the provenance of code and the changes that are made.  That puzzles me.
>
>  - History doesn't appear in source-code tarballs.
>  - It requires the original SCM repository or a history-preserving port of the SCN to be available to interested parties.
>
> Basically, it is not a durable form of the information.

Indeed, especially since SVN log messages are not versioned.

I think log messages should only be used to inform the reader of the
commit message why the commit was done.
They should not be used for comments that are useful / necessary to
the reader of the code; those should be included as comments in the
code itself.
[Though of course such comments can go in the log message as well.]

However, does the end user of the source need to know provenance and history?

> Just sayin' ...

DItto.

>  - Dennis
>
> -----Original Message-----
> From: Pedro Giffuni [mailto:pfg@apache.org]
> Sent: Friday, July 20, 2012 12:52
> To: ooo-dev@incubator.apache.org
> Subject: Re: Coding guideline or common rules
>
> FWIW;
>
>
> ----- Original Message -----
> ...
>>
>> Hi,
>>
>> I just stumbled over a commit message for the new UOF filter.
>>
>> I think we should agree on a common guideline for our code and how we
>> contribute changes and bring them in the code.
>>
>> SCM's manage the change sets and the information who made the change,
>> that means we don't need further comments like this
>>
>> ///Begin Added by wangyumin for uof2-filter from cs2c
>> ...
>> /// End Added by wangyumin on 2012-2-22 14:32:18
>>
>> It is somewhat redundant and makes the code not really better readable.
>> Can we agree on the common understanding that we don't need such
>> comments and that we don't want them in the code. We should remove such
>> comments wherever we see or find them.
>>
>
> Indeed, I did mention in our local svn tutorial that those comments should be
> avoided. SVN does a wonderful job maintaining the origin information.
>
>> Any opinions?
>
>
> As a side note, I recently found similar prominent begin/end lines in another
> project and the culprit on that project was the GPLv2 section 2a:
>
> "You must cause the modified files to carry prominent notices stating
> that you changed the files and the date of any change."
>
>
> It's probable that old code from GPLd derivatives still carry such notes.
>
> Someone will have to clean them ;).
>
> Pedro.
>

Re: Coding guideline or common rules

Posted by Jürgen Schmidt <jo...@googlemail.com>.
On 7/20/12 11:22 PM, Dennis E. Hamilton wrote:
> I've seen the comment about SCMs being sufficient for tracing the provenance of code and the changes that are made.  That puzzles me.
> 
>  - History doesn't appear in source-code tarballs.

that's true but a different point and I doubt that users of a source
tarballs are interested in these details

>  - It requires the original SCM repository or a history-preserving port of the SCN to be available to interested parties.
> 
> Basically, it is not a durable form of the information.

I agree that this can be a problem but the SCM is not changed too often
normally. But nevertheless such comments makes the code completely
unreadable over time from my perspective and I would like to avoid them.

Juergen


> 
> Just sayin' ...
> 
>  - Dennis
> 
> -----Original Message-----
> From: Pedro Giffuni [mailto:pfg@apache.org] 
> Sent: Friday, July 20, 2012 12:52
> To: ooo-dev@incubator.apache.org
> Subject: Re: Coding guideline or common rules
> 
> FWIW;
> 
> 
> ----- Original Message -----
> ...
>>
>> Hi,
>>
>> I just stumbled over a commit message for the new UOF filter.
>>
>> I think we should agree on a common guideline for our code and how we
>> contribute changes and bring them in the code.
>>
>> SCM's manage the change sets and the information who made the change,
>> that means we don't need further comments like this
>>
>> ///Begin Added by wangyumin for uof2-filter from cs2c
>> ...
>> /// End Added by wangyumin on 2012-2-22 14:32:18
>>
>> It is somewhat redundant and makes the code not really better readable.
>> Can we agree on the common understanding that we don't need such
>> comments and that we don't want them in the code. We should remove such
>> comments wherever we see or find them.
>>
> 
> Indeed, I did mention in our local svn tutorial that those comments should be
> avoided. SVN does a wonderful job maintaining the origin information.
> 
>> Any opinions?
> 
> 
> As a side note, I recently found similar prominent begin/end lines in another
> project and the culprit on that project was the GPLv2 section 2a:
> 
> "You must cause the modified files to carry prominent notices stating
> that you changed the files and the date of any change."
> 
> 
> It's probable that old code from GPLd derivatives still carry such notes.
> 
> Someone will have to clean them ;).
> 
> Pedro.
> 


RE: Coding guideline or common rules

Posted by "Dennis E. Hamilton" <de...@acm.org>.
I've seen the comment about SCMs being sufficient for tracing the provenance of code and the changes that are made.  That puzzles me.

 - History doesn't appear in source-code tarballs.
 - It requires the original SCM repository or a history-preserving port of the SCN to be available to interested parties.

Basically, it is not a durable form of the information.

Just sayin' ...

 - Dennis

-----Original Message-----
From: Pedro Giffuni [mailto:pfg@apache.org] 
Sent: Friday, July 20, 2012 12:52
To: ooo-dev@incubator.apache.org
Subject: Re: Coding guideline or common rules

FWIW;


----- Original Message -----
...
> 
> Hi,
> 
> I just stumbled over a commit message for the new UOF filter.
> 
> I think we should agree on a common guideline for our code and how we
> contribute changes and bring them in the code.
> 
> SCM's manage the change sets and the information who made the change,
> that means we don't need further comments like this
> 
> ///Begin Added by wangyumin for uof2-filter from cs2c
> ...
> /// End Added by wangyumin on 2012-2-22 14:32:18
> 
> It is somewhat redundant and makes the code not really better readable.
> Can we agree on the common understanding that we don't need such
> comments and that we don't want them in the code. We should remove such
> comments wherever we see or find them.
> 

Indeed, I did mention in our local svn tutorial that those comments should be
avoided. SVN does a wonderful job maintaining the origin information.

> Any opinions?


As a side note, I recently found similar prominent begin/end lines in another
project and the culprit on that project was the GPLv2 section 2a:

"You must cause the modified files to carry prominent notices stating
that you changed the files and the date of any change."


It's probable that old code from GPLd derivatives still carry such notes.

Someone will have to clean them ;).

Pedro.


Re: Coding guideline or common rules

Posted by Pedro Giffuni <pf...@apache.org>.
FWIW;


----- Original Message -----
...
> 
> Hi,
> 
> I just stumbled over a commit message for the new UOF filter.
> 
> I think we should agree on a common guideline for our code and how we
> contribute changes and bring them in the code.
> 
> SCM's manage the change sets and the information who made the change,
> that means we don't need further comments like this
> 
> ///Begin Added by wangyumin for uof2-filter from cs2c
> ...
> /// End Added by wangyumin on 2012-2-22 14:32:18
> 
> It is somewhat redundant and makes the code not really better readable.
> Can we agree on the common understanding that we don't need such
> comments and that we don't want them in the code. We should remove such
> comments wherever we see or find them.
> 

Indeed, I did mention in our local svn tutorial that those comments should be
avoided. SVN does a wonderful job maintaining the origin information.

> Any opinions?


As a side note, I recently found similar prominent begin/end lines in another
project and the culprit on that project was the GPLv2 section 2a:

"You must cause the modified files to carry prominent notices stating
that you changed the files and the date of any change."


It's probable that old code from GPLd derivatives still carry such notes.

Someone will have to clean them ;).

Pedro.