You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@asterixdb.apache.org by Michael Blow <mb...@gmail.com> on 2016/03/15 20:14:22 UTC

standardize indentation for XML files

Hi asterixdb dev,

Currently XML files in asterixdb (including hyracks) have a wide variety of
indentation schemes being used, often times within a single file, which
makes maintenance quite painful.

I would like to propose a convention of *two-spaces* for indentation within
xml files.  Personally, I believe that this convention provides the highest
level of human-readability for XML files.

Please let me know your thoughts / opinions.

Thanks!

-MDB

Re: standardize indentation for XML files

Posted by Mike Carey <dt...@gmail.com>.
+1

On 3/15/16 9:07 PM, Till Westmann wrote:
> Hi Jochen,
>
> On 15 Mar 2016, at 12:20, Jochen Wiedmann wrote:
>
>> On Tue, Mar 15, 2016 at 8:14 PM, Michael Blow 
>> <mb...@gmail.com> wrote:
>>
>>> Currently XML files in asterixdb (including hyracks) have a wide 
>>> variety of
>>> indentation schemes being used, often times within a single file, which
>>> makes maintenance quite painful.
>>>
>>> Please let me know your thoughts / opinions.
>>
>> My opinion (out of experience): *Never* bother with syntax, when XML
>> is the topic. XML is about semantics, not syntax. Trying ti achieve a
>> particular syntax will never work.
>
> If we’d all use tools that represent the XML structure and if git would
> provide a tree diff for XML, I think that I might agree with you.
> However, my current reality is that I use a text editor to edit XML
> files and git’s diff is line oriented.
> So I think that consistent indentation of XML is helpful. And since XML
> processors don’t care about non-significant whitespace it also doesn’t
> hurt them.
>
> I’m in favor of a common indentation scheme.
>
> Cheers,
> Till
>
>


Re: standardize indentation for XML files

Posted by Till Westmann <ti...@apache.org>.
I’m completely open on the 2-vs-4 question - the wiki can be changed 
:)

Also, the ASF’s mode of governance is sometimes called a "do-ocracy" 
[1], so if you do it, it might just stick :)

Cheers,
Till

[1] http://www.apache.org/foundation/how-it-works.html

On 16 Mar 2016, at 3:12, Michael Blow wrote:

> Thanks Preston for pointing out the existing albeit largely ignored
> convention, which I neglected to mention; Till had pointed me to the 
> same.
>
> Id like to amend the existing convention to two-spaces, then work to 
> bring
> existing files into compliance.
>
> Thanks,
>
> -MDB
> On Wed, Mar 16, 2016 at 2:00 AM Preston Carman <pr...@apache.org> 
> wrote:
>
>> On our website [1] we have stated a convention of using 4 spaces. 
>> Although
>> the code base is wildly inconsistent. I think actually using a 
>> convention
>> will support simpler code reviews, since they are line based 
>> comparisons.
>>
>> [1] https://cwiki.apache.org/confluence/display/ASTERIXDB/Formatting
>>
>> On Tue, Mar 15, 2016 at 9:07 PM, Till Westmann <ti...@apache.org> 
>> wrote:
>>
>>> Hi Jochen,
>>>
>>> On 15 Mar 2016, at 12:20, Jochen Wiedmann wrote:
>>>
>>> On Tue, Mar 15, 2016 at 8:14 PM, Michael Blow 
>>> <mb...@gmail.com>
>>>> wrote:
>>>>
>>>> Currently XML files in asterixdb (including hyracks) have a wide 
>>>> variety
>>>>> of
>>>>> indentation schemes being used, often times within a single file, 
>>>>> which
>>>>> makes maintenance quite painful.
>>>>>
>>>>> Please let me know your thoughts / opinions.
>>>>>
>>>>
>>>> My opinion (out of experience): *Never* bother with syntax, when 
>>>> XML
>>>> is the topic. XML is about semantics, not syntax. Trying ti achieve 
>>>> a
>>>> particular syntax will never work.
>>>>
>>>
>>> If we’d all use tools that represent the XML structure and if git 
>>> would
>>> provide a tree diff for XML, I think that I might agree with you.
>>> However, my current reality is that I use a text editor to edit XML
>>> files and git’s diff is line oriented.
>>> So I think that consistent indentation of XML is helpful. And since 
>>> XML
>>> processors don’t care about non-significant whitespace it also 
>>> doesn’t
>>> hurt them.
>>>
>>> I’m in favor of a common indentation scheme.
>>>
>>> Cheers,
>>> Till
>>>
>>>
>>>
>>

Re: standardize indentation for XML files

Posted by Michael Blow <mb...@gmail.com>.
Thanks Preston for pointing out the existing albeit largely ignored
convention, which I neglected to mention; Till had pointed me to the same.

Id like to amend the existing convention to two-spaces, then work to bring
existing files into compliance.

Thanks,

-MDB
On Wed, Mar 16, 2016 at 2:00 AM Preston Carman <pr...@apache.org> wrote:

> On our website [1] we have stated a convention of using 4 spaces. Although
> the code base is wildly inconsistent. I think actually using a convention
> will support simpler code reviews, since they are line based comparisons.
>
> [1] https://cwiki.apache.org/confluence/display/ASTERIXDB/Formatting
>
> On Tue, Mar 15, 2016 at 9:07 PM, Till Westmann <ti...@apache.org> wrote:
>
> > Hi Jochen,
> >
> > On 15 Mar 2016, at 12:20, Jochen Wiedmann wrote:
> >
> > On Tue, Mar 15, 2016 at 8:14 PM, Michael Blow <mb...@gmail.com>
> >> wrote:
> >>
> >> Currently XML files in asterixdb (including hyracks) have a wide variety
> >>> of
> >>> indentation schemes being used, often times within a single file, which
> >>> makes maintenance quite painful.
> >>>
> >>> Please let me know your thoughts / opinions.
> >>>
> >>
> >> My opinion (out of experience): *Never* bother with syntax, when XML
> >> is the topic. XML is about semantics, not syntax. Trying ti achieve a
> >> particular syntax will never work.
> >>
> >
> > If we’d all use tools that represent the XML structure and if git would
> > provide a tree diff for XML, I think that I might agree with you.
> > However, my current reality is that I use a text editor to edit XML
> > files and git’s diff is line oriented.
> > So I think that consistent indentation of XML is helpful. And since XML
> > processors don’t care about non-significant whitespace it also doesn’t
> > hurt them.
> >
> > I’m in favor of a common indentation scheme.
> >
> > Cheers,
> > Till
> >
> >
> >
>

Re: standardize indentation for XML files

Posted by Preston Carman <pr...@apache.org>.
On our website [1] we have stated a convention of using 4 spaces. Although
the code base is wildly inconsistent. I think actually using a convention
will support simpler code reviews, since they are line based comparisons.

[1] https://cwiki.apache.org/confluence/display/ASTERIXDB/Formatting

On Tue, Mar 15, 2016 at 9:07 PM, Till Westmann <ti...@apache.org> wrote:

> Hi Jochen,
>
> On 15 Mar 2016, at 12:20, Jochen Wiedmann wrote:
>
> On Tue, Mar 15, 2016 at 8:14 PM, Michael Blow <mb...@gmail.com>
>> wrote:
>>
>> Currently XML files in asterixdb (including hyracks) have a wide variety
>>> of
>>> indentation schemes being used, often times within a single file, which
>>> makes maintenance quite painful.
>>>
>>> Please let me know your thoughts / opinions.
>>>
>>
>> My opinion (out of experience): *Never* bother with syntax, when XML
>> is the topic. XML is about semantics, not syntax. Trying ti achieve a
>> particular syntax will never work.
>>
>
> If we’d all use tools that represent the XML structure and if git would
> provide a tree diff for XML, I think that I might agree with you.
> However, my current reality is that I use a text editor to edit XML
> files and git’s diff is line oriented.
> So I think that consistent indentation of XML is helpful. And since XML
> processors don’t care about non-significant whitespace it also doesn’t
> hurt them.
>
> I’m in favor of a common indentation scheme.
>
> Cheers,
> Till
>
>
>

Re: standardize indentation for XML files

Posted by Till Westmann <ti...@apache.org>.
Hi Jochen,

On 15 Mar 2016, at 12:20, Jochen Wiedmann wrote:

> On Tue, Mar 15, 2016 at 8:14 PM, Michael Blow <mb...@gmail.com> 
> wrote:
>
>> Currently XML files in asterixdb (including hyracks) have a wide 
>> variety of
>> indentation schemes being used, often times within a single file, 
>> which
>> makes maintenance quite painful.
>>
>> Please let me know your thoughts / opinions.
>
> My opinion (out of experience): *Never* bother with syntax, when XML
> is the topic. XML is about semantics, not syntax. Trying ti achieve a
> particular syntax will never work.

If we’d all use tools that represent the XML structure and if git 
would
provide a tree diff for XML, I think that I might agree with you.
However, my current reality is that I use a text editor to edit XML
files and git’s diff is line oriented.
So I think that consistent indentation of XML is helpful. And since XML
processors don’t care about non-significant whitespace it also 
doesn’t
hurt them.

I’m in favor of a common indentation scheme.

Cheers,
Till



Re: standardize indentation for XML files

Posted by Jochen Wiedmann <jo...@gmail.com>.
On Tue, Mar 15, 2016 at 8:14 PM, Michael Blow <mb...@gmail.com> wrote:

> Currently XML files in asterixdb (including hyracks) have a wide variety of
> indentation schemes being used, often times within a single file, which
> makes maintenance quite painful.
>
> Please let me know your thoughts / opinions.

My opinion (out of experience): *Never* bother with syntax, when XML
is the topic. XML is about semantics, not syntax. Trying ti achieve a
particular syntax will never work.

Jochen



-- 
The next time you hear: "Don't reinvent the wheel!"

http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg