Style Guide

classic Classic list List threaded Threaded
15 messages Options
c.ledermann c.ledermann
Reply | Threaded
Open this post in threaded view
|

Style Guide

Hi,

I was looking for the code styleguide and only found:

http://docs.plone.org/develop/plone-coredev/style.html

I thought there was a quite extensive styleguide somewhere
with additional information for zpt, zcml, html JS etc ?

Can you point me in the right direction?

--
Best Regards,

Christian Ledermann

London - UK
Mobile : +44 7474997517

https://www.linkedin.com/in/christianledermann
https://github.com/cleder/


<*)))>{

If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.

1) Don’t drive species to extinction

2) Don’t destroy a habitat that species rely on.

3) Don’t change the climate in ways that will result in the above.

}<(((*>

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Jens W. klein-2 Jens W. klein-2
Reply | Threaded
Open this post in threaded view
|

Re: Style Guide

Hi!

On 2015-04-24 12:32, Christian Ledermann wrote:

> Hi,
>
> I was looking for the code styleguide and only found:
>
> http://docs.plone.org/develop/plone-coredev/style.html
>
> I thought there was a quite extensive styleguide somewhere
> with additional information for zpt, zcml, html JS etc ?
>
> Can you point me in the right direction?


Indeed it looks like also this part of the documentation needs some edit.

We follow the plone.api conventions, which are documented here:

http://ploneapi.readthedocs.org/en/latest/contribute/conventions.html

A great helper to check against for plone.api style is
       
plone.recipe.codeananlysis
https://pypi.python.org/pypi/plone.recipe.codeanalysis

hth Jens
--
Klein & Partner KG, member of BlueDynamics Alliance


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Roel Bruggink Roel Bruggink
Reply | Threaded
Open this post in threaded view
|

Re: Style Guide

In light of Raymond Hettinger' talk "Beyond pep8", I'd like to increase the maximum line length to 90-ish. Any objections?

Please watch https://www.youtube.com/watch?v=wf-BqAjZb8M :) He is way better in explaining than I will ever be :)


-Roel

On 24 April 2015 at 15:06, Jens W. Klein <[hidden email]> wrote:
Hi!

On 2015-04-24 12:32, Christian Ledermann wrote:
> Hi,
>
> I was looking for the code styleguide and only found:
>
> http://docs.plone.org/develop/plone-coredev/style.html
>
> I thought there was a quite extensive styleguide somewhere
> with additional information for zpt, zcml, html JS etc ?
>
> Can you point me in the right direction?


Indeed it looks like also this part of the documentation needs some edit.

We follow the plone.api conventions, which are documented here:

http://ploneapi.readthedocs.org/en/latest/contribute/conventions.html

A great helper to check against for plone.api style is

plone.recipe.codeananlysis
https://pypi.python.org/pypi/plone.recipe.codeanalysis

hth Jens
--
Klein & Partner KG, member of BlueDynamics Alliance


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers



--

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Nathan Van Gheem-3 Nathan Van Gheem-3
Reply | Threaded
Open this post in threaded view
|

Re: Style Guide

yes please :)

On Fri, Apr 24, 2015 at 8:19 AM, Roel Bruggink <[hidden email]> wrote:
In light of Raymond Hettinger' talk "Beyond pep8", I'd like to increase the maximum line length to 90-ish. Any objections?

Please watch https://www.youtube.com/watch?v=wf-BqAjZb8M :) He is way better in explaining than I will ever be :)


-Roel

On 24 April 2015 at 15:06, Jens W. Klein <[hidden email]> wrote:
Hi!

On 2015-04-24 12:32, Christian Ledermann wrote:
> Hi,
>
> I was looking for the code styleguide and only found:
>
> http://docs.plone.org/develop/plone-coredev/style.html
>
> I thought there was a quite extensive styleguide somewhere
> with additional information for zpt, zcml, html JS etc ?
>
> Can you point me in the right direction?


Indeed it looks like also this part of the documentation needs some edit.

We follow the plone.api conventions, which are documented here:

http://ploneapi.readthedocs.org/en/latest/contribute/conventions.html

A great helper to check against for plone.api style is

plone.recipe.codeananlysis
https://pypi.python.org/pypi/plone.recipe.codeanalysis

hth Jens
--
Klein & Partner KG, member of BlueDynamics Alliance


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers



--
Roel Bruggink
https://www.fourdigits.nl/over-ons#roel-bruggink

Four Digits BV
https://www.fourdigits.nl tel: <a href="tel:%2B31%2026%204422700" value="+31264422700" target="_blank">+31 26 4422700

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers




--
Nathan Van Gheem
Solutions Architect
Wildcard Corp

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Jens W. klein-2 Jens W. klein-2
Reply | Threaded
Open this post in threaded view
|

Re: Style Guide

In reply to this post by Roel Bruggink
On 2015-04-24 15:19, Roel Bruggink wrote:
> In light of Raymond Hettinger' talk "Beyond pep8", I'd like to increase
> the maximum line length to 90-ish. Any objections?
>
> Please watch https://www.youtube.com/watch?v=wf-BqAjZb8M
> <https://www.youtube..com/watch?v=wf-BqAjZb8M> :) He is way better in
> explaining than I will ever be :)

Very inspiring talk, even if I disagree to introduce a 90ish line size
in Plone. But +100 to make more pythonic apis.

Jens
--
Klein & Partner KG, member of BlueDynamics Alliance


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Gil Forcada Codinachs Gil Forcada Codinachs
Reply | Threaded
Open this post in threaded view
|

Re: Style Guide

For me the 80 is more a way to make it easier to compare code side by side, mostly on three-way merges.

Specially when you are not attached to your big screen but only with your laptop, a 3x80 = 240 characters is already too much to be seen on a regular screen (unless you are fine working at 8 or 9 px font size, which I'm not :D)

Open a pull request on plone.api and see how the fight goes :)

2015-04-24 15:53 GMT+02:00 Jens W. Klein <[hidden email]>:
On 2015-04-24 15:19, Roel Bruggink wrote:
> In light of Raymond Hettinger' talk "Beyond pep8", I'd like to increase
> the maximum line length to 90-ish. Any objections?
>
> Please watch https://www.youtube.com/watch?v=wf-BqAjZb8M
> <https://www.youtube..com/watch?v=wf-BqAjZb8M> :) He is way better in
> explaining than I will ever be :)

Very inspiring talk, even if I disagree to introduce a 90ish line size
in Plone. But +100 to make more pythonic apis.

Jens
--
Klein & Partner KG, member of BlueDynamics Alliance


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Roel Bruggink Roel Bruggink
Reply | Threaded
Open this post in threaded view
|

Re: Style Guide

We might as well go for 100 chars, if 80 is already too much ;)

On 24 April 2015 at 16:16, Gil Forcada Codinachs <[hidden email]> wrote:
For me the 80 is more a way to make it easier to compare code side by side, mostly on three-way merges.

Specially when you are not attached to your big screen but only with your laptop, a 3x80 = 240 characters is already too much to be seen on a regular screen (unless you are fine working at 8 or 9 px font size, which I'm not :D)

Open a pull request on plone.api and see how the fight goes :)

2015-04-24 15:53 GMT+02:00 Jens W. Klein <[hidden email]>:
On 2015-04-24 15:19, Roel Bruggink wrote:
> In light of Raymond Hettinger' talk "Beyond pep8", I'd like to increase
> the maximum line length to 90-ish. Any objections?
>
> Please watch https://www.youtube.com/watch?v=wf-BqAjZb8M
> <https://www.youtube..com/watch?v=wf-BqAjZb8M> :) He is way better in
> explaining than I will ever be :)

Very inspiring talk, even if I disagree to introduce a 90ish line size
in Plone. But +100 to make more pythonic apis.

Jens
--
Klein & Partner KG, member of BlueDynamics Alliance


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers




--

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Timo Stollenwerk-2 Timo Stollenwerk-2
Reply | Threaded
Open this post in threaded view
|

Re: Style Guide

In reply to this post by Jens W. klein-2
We should really merge the plone.api styleguide into our main docs. Any
takers?

Timo

Am 24.04.15 um 15:06 schrieb Jens W. Klein:

> Hi!
>
> On 2015-04-24 12:32, Christian Ledermann wrote:
>> Hi,
>>
>> I was looking for the code styleguide and only found:
>>
>> http://docs.plone.org/develop/plone-coredev/style.html
>>
>> I thought there was a quite extensive styleguide somewhere
>> with additional information for zpt, zcml, html JS etc ?
>>
>> Can you point me in the right direction?
>
>
> Indeed it looks like also this part of the documentation needs some edit.
>
> We follow the plone.api conventions, which are documented here:
>
> http://ploneapi.readthedocs.org/en/latest/contribute/conventions.html
>
> A great helper to check against for plone.api style is
>
> plone.recipe.codeananlysis
> https://pypi.python.org/pypi/plone.recipe.codeanalysis
>
> hth Jens
>

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
sven-3 sven-3
Reply | Threaded
Open this post in threaded view
|

Re: Style Guide

Hi,

plone.api docs are already linked in our current docs, they will be
included in our docs for 5 see here:

https://github.com/plone/documentation/issues/198



On 04/25/2015 07:22 AM, Timo Stollenwerk wrote:

> We should really merge the plone.api styleguide into our main docs. Any
> takers?
>
> Timo
>
> Am 24.04.15 um 15:06 schrieb Jens W. Klein:
>> Hi!
>>
>> On 2015-04-24 12:32, Christian Ledermann wrote:
>>> Hi,
>>>
>>> I was looking for the code styleguide and only found:
>>>
>>> http://docs.plone.org/develop/plone-coredev/style.html
>>>
>>> I thought there was a quite extensive styleguide somewhere
>>> with additional information for zpt, zcml, html JS etc ?
>>>
>>> Can you point me in the right direction?
>>
>>
>> Indeed it looks like also this part of the documentation needs some edit.
>>
>> We follow the plone.api conventions, which are documented here:
>>
>> http://ploneapi.readthedocs.org/en/latest/contribute/conventions.html
>>
>> A great helper to check against for plone.api style is
>>
>> plone.recipe.codeananlysis
>> https://pypi.python.org/pypi/plone.recipe.codeanalysis
>>
>> hth Jens
>>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Plone-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/plone-developers
>


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Timo Stollenwerk-2 Timo Stollenwerk-2
Reply | Threaded
Open this post in threaded view
|

Re: Style Guide

In reply to this post by Roel Bruggink
Yes. I have objections. We had a long discussion some time ago and
reached an agreement. Please look up the discussion. I don't want to
repeat everything that has been written back then. Please let's stop
this here and not waste time again and again on such details...

And yes, I watched the talk. And yes, bad things happen if you obey the
80 characters limit and turn off your brain at the same time. The 80
characters limit is a hint for programmers that there MIGHT be a problem
with your code. If you are smart, you solve it in the right way and make
your code more readable. If you are not smart, you do the things
Hettinger describes in his talk.

It is perfecly ok to use "# noqa" for exceptions and ignore the rule if
that makes sense. It is not ok to have two, three, or four different
"standards" (80, 90, 100, 120, ...) within the Python community.

Timo

Am 24.04.15 um 15:19 schrieb Roel Bruggink:

> In light of Raymond Hettinger' talk "Beyond pep8", I'd like to increase
> the maximum line length to 90-ish. Any objections?
>
> Please watch https://www.youtube.com/watch?v=wf-BqAjZb8M :) He is way
> better in explaining than I will ever be :)
>
>
> -Roel
>
> On 24 April 2015 at 15:06, Jens W. Klein <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi!
>
>     On 2015-04-24 12:32, Christian Ledermann wrote:
>      > Hi,
>      >
>      > I was looking for the code styleguide and only found:
>      >
>      > http://docs.plone.org/develop/plone-coredev/style.html
>      >
>      > I thought there was a quite extensive styleguide somewhere
>      > with additional information for zpt, zcml, html JS etc ?
>      >
>      > Can you point me in the right direction?
>
>
>     Indeed it looks like also this part of the documentation needs some
>     edit.
>
>     We follow the plone.api conventions, which are documented here:
>
>     http://ploneapi.readthedocs.org/en/latest/contribute/conventions.html
>
>     A great helper to check against for plone.api style is
>
>     plone.recipe.codeananlysis
>     https://pypi.python.org/pypi/plone.recipe.codeanalysis
>
>     hth Jens
>     --
>     Klein & Partner KG, member of BlueDynamics Alliance
>
>
>     ------------------------------------------------------------------------------
>     One dashboard for servers and applications across Physical-Virtual-Cloud
>     Widest out-of-the-box monitoring support with 50+ applications
>     Performance metrics, stats and reports that give you Actionable Insights
>     Deep dive visibility with transaction tracing using APM Insight.
>     http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>     _______________________________________________
>     Plone-developers mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/plone-developers
>
>
>
>
> --
> Roel Bruggink
> https://www.fourdigits.nl/over-ons#roel-bruggink
> <https://www.fourdigits.nl/over-ons#roel-bruggink>
>
> Four Digits BV
> https://www.fourdigits.nl <https://www.fourdigits.nl/> tel: +31 26 4422700
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>
>
>
> _______________________________________________
> Plone-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/plone-developers
>

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Asko Soukka Asko Soukka
Reply | Threaded
Open this post in threaded view
|

Re: Style Guide

Timo Stollenwerk wrote:
> Yes. I have objections.
...
> It is perfecly ok to use "# noqa" for exceptions and ignore the rule if
> that makes sense. It is not ok to have two, three, or four different
> "standards" (80, 90, 100, 120, ...) within the Python community.

+1

-Asko

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
johannes raggam johannes raggam
Reply | Threaded
Open this post in threaded view
|

Re: Style Guide

In reply to this post by Roel Bruggink
Currently, I'm also -1 on raising the column length limit. For me, Gil's
argument weights a lot - I want to be able to make a two column diff and
see the whole width of both source code documents.

I have no problem with ``# noqa`` and started to use it regulary
especially for lengthy imports like the following to not break the
visual flow::

``from plone.app.contenttypes.testing import
PLONE_APP_CONTENTTYPES_INTEGRATION_TESTING``

I can remember discussions and random opinions on the 80 column limit,
but I don't remember a discussion which led to a decision on that topic,
though.


On Fri, 2015-04-24 at 15:19 +0200, Roel Bruggink wrote:

> In light of Raymond Hettinger' talk "Beyond pep8", I'd like to
> increase the maximum line length to 90-ish. Any objections?
>
>
> Please watch https://www.youtube.com/watch?v=wf-BqAjZb8M :) He is way
> better in explaining than I will ever be :)
>
>
>
>
> -Roel
>
> On 24 April 2015 at 15:06, Jens W. Klein <[hidden email]>
> wrote:
>         Hi!
>        
>         On 2015-04-24 12:32, Christian Ledermann wrote:
>         > Hi,
>         >
>         > I was looking for the code styleguide and only found:
>         >
>         > http://docs.plone.org/develop/plone-coredev/style.html
>         >
>         > I thought there was a quite extensive styleguide somewhere
>         > with additional information for zpt, zcml, html JS etc ?
>         >
>         > Can you point me in the right direction?
>        
>        
>         Indeed it looks like also this part of the documentation needs
>         some edit.
>        
>         We follow the plone.api conventions, which are documented
>         here:
>        
>         http://ploneapi.readthedocs.org/en/latest/contribute/conventions.html
>        
>         A great helper to check against for plone.api style is
>        
>         plone.recipe.codeananlysis
>         https://pypi.python.org/pypi/plone.recipe.codeanalysis
>        
>         hth Jens
>         --
>         Klein & Partner KG, member of BlueDynamics Alliance
>        
>        
>         ------------------------------------------------------------------------------
>         One dashboard for servers and applications across
>         Physical-Virtual-Cloud
>         Widest out-of-the-box monitoring support with 50+ applications
>         Performance metrics, stats and reports that give you
>         Actionable Insights
>         Deep dive visibility with transaction tracing using APM
>         Insight.
>         http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>         _______________________________________________
>         Plone-developers mailing list
>         [hidden email]
>         https://lists.sourceforge.net/lists/listinfo/plone-developers
>
>
>
>
> --
> Roel Bruggink
>
> https://www.fourdigits.nl/over-ons#roel-bruggink
>
> Four Digits BV
> https://www.fourdigits.nl tel: +31 26 4422700
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________ Plone-developers mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/plone-developers

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers

signature.asc (188 bytes) Download Attachment
Timo Stollenwerk-2 Timo Stollenwerk-2
Reply | Threaded
Open this post in threaded view
|

Re: Style Guide

Am 25.04.15 um 09:52 schrieb Johannes Raggam:

> Currently, I'm also -1 on raising the column length limit. For me, Gil's
> argument weights a lot - I want to be able to make a two column diff and
> see the whole width of both source code documents.
>
> I have no problem with ``# noqa`` and started to use it regulary
> especially for lengthy imports like the following to not break the
> visual flow::
>
> ``from plone.app.contenttypes.testing import
> PLONE_APP_CONTENTTYPES_INTEGRATION_TESTING``
>
> I can remember discussions and random opinions on the 80 column limit,
> but I don't remember a discussion which led to a decision on that topic,
> though.

Sorry, I forgot that this did not make it to the mailing list. After our
long discussion on the list, we discussed this face to face at the Plone
conference (I think in Arnhem) and decided to go with 100% PEP8
compliance. We reached an agreement on the testing team and among the
p.r.codeanalysis developers.

There has been no "offical" desicion on that topic, because we do not
have any official coding guidelines. We just have plone.api code
guidelines and p.r.codeanalysis. Both are the result of long discussions
within the Plone community. #lesstalkmorecode

Writing a PLIP for coding best practices, officially documenting our
coding best practices, and running code analysis for Plone core code is
on our todo list (Gil is already working on the core code analysis).

Timo

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
hvelarde hvelarde
Reply | Threaded
Open this post in threaded view
|

Re: Style Guide

In reply to this post by Timo Stollenwerk-2
On 25-04-2015 02:43, Timo Stollenwerk wrote:
> It is perfecly ok to use "# noqa" for exceptions and ignore the rule if
> that makes sense. It is not ok to have two, three, or four different
> "standards" (80, 90, 100, 120, ...) within the Python community.

+1 also

Héctor Velarde



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers

smime.p7s (5K) Download Attachment
hvelarde hvelarde
Reply | Threaded
Open this post in threaded view
|

Re: Style Guide

In reply to this post by Timo Stollenwerk-2
sorry for bringing this back, but... no, is not perfectly good to add "#
noqa" for exceptions all over the place to avoid issues with line lengths.

using "# noqa" disables ALL Flake8 warnings, including those of unused
imports and variables; so, for instance if I have some line like this:

for my.very.long.module.namespace import a_very_long_object_name  # noqa

and later I decide not to use a_very_long_object_name in my module, but
forget to remove it from imports, Flake8 wouldn't care about it.

"# noqa" is harmful and must be used very carefully.

you decide what do you want to have: a bunch of tested code lines longer
than 80 characters, or a bunch of untested code lines longer than 80
characters.

best regards

Héctor Velarde

On 25/04/2015 02:43, Timo Stollenwerk wrote:

> Yes. I have objections. We had a long discussion some time ago and
> reached an agreement. Please look up the discussion. I don't want to
> repeat everything that has been written back then. Please let's stop
> this here and not waste time again and again on such details...
>
> And yes, I watched the talk. And yes, bad things happen if you obey the
> 80 characters limit and turn off your brain at the same time. The 80
> characters limit is a hint for programmers that there MIGHT be a problem
> with your code. If you are smart, you solve it in the right way and make
> your code more readable. If you are not smart, you do the things
> Hettinger describes in his talk.
>
> It is perfecly ok to use "# noqa" for exceptions and ignore the rule if
> that makes sense. It is not ok to have two, three, or four different
> "standards" (80, 90, 100, 120, ...) within the Python community.
>
> Timo

------------------------------------------------------------------------------

_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers

smime.p7s (4K) Download Attachment