<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: More on PEP8</title>
	<link>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/</link>
	<description>The ramblings of Tim Golden</description>
	<pubDate>Fri, 24 May 2013 12:25:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2</generator>

	<item>
		<title>By: Perrygeo</title>
		<link>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1195</link>
		<author>Perrygeo</author>
		<pubDate>Mon, 02 Apr 2012 06:15:29 +0000</pubDate>
		<guid>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1195</guid>
		<description>Pep8 makes sense for most code. I try to stick with it as language conventions can foster better communication. 

But some times it does not make sense - my biggest beef is the 80 char per line limit which seems to severely decrease readability if you use descriptive variable names... I have seen 120 char lines broken over 4 lines with unhelpful indentation which obfuscates the flow of the program. IOW breaking a 90 char line into two might make sense if there is a logical breakpoint; otherwise let the flow of the code determine line breaks within the limit of modern monitors.</description>
		<content:encoded><![CDATA[<p>Pep8 makes sense for most code. I try to stick with it as language conventions can foster better communication. </p>
<p>But some times it does not make sense - my biggest beef is the 80 char per line limit which seems to severely decrease readability if you use descriptive variable names&#8230; I have seen 120 char lines broken over 4 lines with unhelpful indentation which obfuscates the flow of the program. IOW breaking a 90 char line into two might make sense if there is a logical breakpoint; otherwise let the flow of the code determine line breaks within the limit of modern monitors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Thiele</title>
		<link>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1193</link>
		<author>James Thiele</author>
		<pubDate>Fri, 30 Mar 2012 20:32:11 +0000</pubDate>
		<guid>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1193</guid>
		<description>As a long time C programmer I've seen heated arguments about where braces should be put. I don't care as long as they are consistent within a given source code file. When I start a new C file I don't know which style I'll use - it depends on my mood.

I once worked on a large Python project with over 200,000 lines of code built over a period of five years with up to 20 programers at any time which had no coding standards. When I had to work on a piece of code I never had a problem with reading the code.

My only coding standard is to write readable code.</description>
		<content:encoded><![CDATA[<p>As a long time C programmer I&#8217;ve seen heated arguments about where braces should be put. I don&#8217;t care as long as they are consistent within a given source code file. When I start a new C file I don&#8217;t know which style I&#8217;ll use - it depends on my mood.</p>
<p>I once worked on a large Python project with over 200,000 lines of code built over a period of five years with up to 20 programers at any time which had no coding standards. When I had to work on a piece of code I never had a problem with reading the code.</p>
<p>My only coding standard is to write readable code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harry</title>
		<link>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1192</link>
		<author>Harry</author>
		<pubDate>Fri, 30 Mar 2012 19:40:00 +0000</pubDate>
		<guid>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1192</guid>
		<description>I am glad to see PEP8, which is a suggestion on style that I try to adhere to at all times, and it shows that Python is from/for experienced programmers in the sense that all areas are covered.

"then I use camelCase method names"
Wouldn't that be half-camelCase (camel case comes from formula notation and so all first letters are caps, NaCl, etc.)?</description>
		<content:encoded><![CDATA[<p>I am glad to see PEP8, which is a suggestion on style that I try to adhere to at all times, and it shows that Python is from/for experienced programmers in the sense that all areas are covered.</p>
<p>&#8220;then I use camelCase method names&#8221;<br />
Wouldn&#8217;t that be half-camelCase (camel case comes from formula notation and so all first letters are caps, NaCl, etc.)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Graham</title>
		<link>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1191</link>
		<author>Chris Graham</author>
		<pubDate>Fri, 30 Mar 2012 16:45:29 +0000</pubDate>
		<guid>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1191</guid>
		<description>I think the main positive of thinking of PEP8 as the overall community wide standard rather than a standard specific to the source of Python itself is that while it doesn't prevent style wars it at least serves as a default way of doing things that you use unless you have a good reason not to.  Absent of that you have things common in other languages like multiple curly brace positioning styles that are all equally popular and constantly lead to fights over which is better even though they are completely arbitrary style decisions.

Now that said, there's no reason to say that absolutely all code has to follow the default style standard.  Obviously coders have their own idiosyncratic style preferences and there's always going to be some difference in how one person writes code versus how another person would.  Personally I'm a fan of pretty printing systems that enforce a particular style and can be used to export code in any arbitrary style, although that generally works better in a setting where one IDE is dominantly used across the whole community.  Overall I think as someone with a quirky coding style it just makes sense to acknowledge that your style might be "wrong" in terms of the standard, but that you like the "wrong" way better.  For example I like viewing code on a big screen with a tiny font, so a width of more than the standard in most languages works better for me personally, but it's understandable that doing that makes it harder for other coders to read and work with my code if I leave it like that.</description>
		<content:encoded><![CDATA[<p>I think the main positive of thinking of PEP8 as the overall community wide standard rather than a standard specific to the source of Python itself is that while it doesn&#8217;t prevent style wars it at least serves as a default way of doing things that you use unless you have a good reason not to.  Absent of that you have things common in other languages like multiple curly brace positioning styles that are all equally popular and constantly lead to fights over which is better even though they are completely arbitrary style decisions.</p>
<p>Now that said, there&#8217;s no reason to say that absolutely all code has to follow the default style standard.  Obviously coders have their own idiosyncratic style preferences and there&#8217;s always going to be some difference in how one person writes code versus how another person would.  Personally I&#8217;m a fan of pretty printing systems that enforce a particular style and can be used to export code in any arbitrary style, although that generally works better in a setting where one IDE is dominantly used across the whole community.  Overall I think as someone with a quirky coding style it just makes sense to acknowledge that your style might be &#8220;wrong&#8221; in terms of the standard, but that you like the &#8220;wrong&#8221; way better.  For example I like viewing code on a big screen with a tiny font, so a width of more than the standard in most languages works better for me personally, but it&#8217;s understandable that doing that makes it harder for other coders to read and work with my code if I leave it like that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Travis Bradshaw</title>
		<link>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1190</link>
		<author>Travis Bradshaw</author>
		<pubDate>Fri, 30 Mar 2012 14:08:19 +0000</pubDate>
		<guid>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1190</guid>
		<description>In your last post, I was mostly on board... until "function ()".

I think there are excellent lexical reasons to "function()" as a representation of the calling mechanism that Python uses, and I think it profoundly affects code readability.

When I saw that you "function ()", I thought, "Yup, I bet this guy gets a lot of backlash for not being PEP8 compliant, he's picked a particularly ugly personal style for Python."

My personal Python style definitely diverges from PEP8, I use 119 columns instead of 79, I wrap expressions before the symbol rather than after the symbol--like in standard math style, the next line starts with + instead of the previous line ending with +.  But I've never gotten more than a shrug or a polite question about it.

I think what you might be getting is the "PEP8 as the first and last factual argument for code style in Python" effect in the Python community when it comes to talking about the merits of code style.  Maybe instead of thinking about those complaints as "I'm a stickler for doctrine", maybe those complaints are actually "I don't like your personal code style."

(Of course, of course, of course, you can code your own projects in any way you'd like.  But maybe it's not a matter of personal freedom, maybe it's just that you've picked an unpopular style. :) )</description>
		<content:encoded><![CDATA[<p>In your last post, I was mostly on board&#8230; until &#8220;function ()&#8221;.</p>
<p>I think there are excellent lexical reasons to &#8220;function()&#8221; as a representation of the calling mechanism that Python uses, and I think it profoundly affects code readability.</p>
<p>When I saw that you &#8220;function ()&#8221;, I thought, &#8220;Yup, I bet this guy gets a lot of backlash for not being PEP8 compliant, he&#8217;s picked a particularly ugly personal style for Python.&#8221;</p>
<p>My personal Python style definitely diverges from PEP8, I use 119 columns instead of 79, I wrap expressions before the symbol rather than after the symbol&#8211;like in standard math style, the next line starts with + instead of the previous line ending with +.  But I&#8217;ve never gotten more than a shrug or a polite question about it.</p>
<p>I think what you might be getting is the &#8220;PEP8 as the first and last factual argument for code style in Python&#8221; effect in the Python community when it comes to talking about the merits of code style.  Maybe instead of thinking about those complaints as &#8220;I&#8217;m a stickler for doctrine&#8221;, maybe those complaints are actually &#8220;I don&#8217;t like your personal code style.&#8221;</p>
<p>(Of course, of course, of course, you can code your own projects in any way you&#8217;d like.  But maybe it&#8217;s not a matter of personal freedom, maybe it&#8217;s just that you&#8217;ve picked an unpopular style. :) )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Davis</title>
		<link>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1189</link>
		<author>Tom Davis</author>
		<pubDate>Fri, 30 Mar 2012 13:23:26 +0000</pubDate>
		<guid>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1189</guid>
		<description>For me, PEP8 informs a couple things:

- Attention to detail
- Familiarity with the Python ecosystem

Basically, it tells me the author has the discipline to follow a style guide (either naturally or enforced via external tools) and that they've been using Python long enough to know about it in the first place.

Now, does the lack of PEP8 inform the inverse? In reality, of course not. Twisted uses CamelCase because it predates PEP8 and Glyph eats puppies, for instance. Maybe your attention to detail is spent on your own personal style guide. I don't know, nor am I arrogant enough to think I do. However, there are only so many hours in the day and countless third-party software projects; I've got to employ stereotypes as a time-saving measure to some extent.

All things being equal, if software violates PEP8 in really flagrant ways (like using two spaces instead of four), that represents a cognitive load to me (however small) and my stereotypes indicate the author may be less experienced in Python than I'd like for a third-party package. This has held true more often than not, so I stick with it. If the author's software provides something I can't find anywhere else, I'll reluctantly give it a more thorough read. If not, I'll just choose another package.</description>
		<content:encoded><![CDATA[<p>For me, PEP8 informs a couple things:</p>
<p>- Attention to detail<br />
- Familiarity with the Python ecosystem</p>
<p>Basically, it tells me the author has the discipline to follow a style guide (either naturally or enforced via external tools) and that they&#8217;ve been using Python long enough to know about it in the first place.</p>
<p>Now, does the lack of PEP8 inform the inverse? In reality, of course not. Twisted uses CamelCase because it predates PEP8 and Glyph eats puppies, for instance. Maybe your attention to detail is spent on your own personal style guide. I don&#8217;t know, nor am I arrogant enough to think I do. However, there are only so many hours in the day and countless third-party software projects; I&#8217;ve got to employ stereotypes as a time-saving measure to some extent.</p>
<p>All things being equal, if software violates PEP8 in really flagrant ways (like using two spaces instead of four), that represents a cognitive load to me (however small) and my stereotypes indicate the author may be less experienced in Python than I&#8217;d like for a third-party package. This has held true more often than not, so I stick with it. If the author&#8217;s software provides something I can&#8217;t find anywhere else, I&#8217;ll reluctantly give it a more thorough read. If not, I&#8217;ll just choose another package.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Enrol</title>
		<link>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1188</link>
		<author>Enrol</author>
		<pubDate>Fri, 30 Mar 2012 13:05:13 +0000</pubDate>
		<guid>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1188</guid>
		<description>I think PEP8 is as good as many other style guidelines. Personally I find it comfortable with my coding habits but this is style, nothing more.
But having a community that tries to use the same style is a plus. When you read code from several projects or contribute to different ones, a common style is very appreciated. And the effort to use it is minimal.</description>
		<content:encoded><![CDATA[<p>I think PEP8 is as good as many other style guidelines. Personally I find it comfortable with my coding habits but this is style, nothing more.<br />
But having a community that tries to use the same style is a plus. When you read code from several projects or contribute to different ones, a common style is very appreciated. And the effort to use it is minimal.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Sizer</title>
		<link>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1187</link>
		<author>Ben Sizer</author>
		<pubDate>Fri, 30 Mar 2012 10:28:33 +0000</pubDate>
		<guid>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1187</guid>
		<description>PEP8 says, "Consistency with this style guide is important. Consistency within a project is more important." And that should be the last word on it. I think that anybody with an extreme view on your code due to PEP8 'compliance' is being rather extreme. I've worked with a variety of languages and a variety of syntactic standards within each language and it really doesn't matter. It takes 2 minutes to work out what sort of standard is in place and maybe 5 minutes to adapt to it.

Personally, I aim for PEP8-like. I follow the arbitrary naming conventions (because you need a convention and PEP8 seems as good as any) but I don't limit line length, I don't make my docstrings so spacious, etc. But anyone who can't work with my code because it doesn't precisely fit some document... the problem lies with their adaptability.</description>
		<content:encoded><![CDATA[<p>PEP8 says, &#8220;Consistency with this style guide is important. Consistency within a project is more important.&#8221; And that should be the last word on it. I think that anybody with an extreme view on your code due to PEP8 &#8216;compliance&#8217; is being rather extreme. I&#8217;ve worked with a variety of languages and a variety of syntactic standards within each language and it really doesn&#8217;t matter. It takes 2 minutes to work out what sort of standard is in place and maybe 5 minutes to adapt to it.</p>
<p>Personally, I aim for PEP8-like. I follow the arbitrary naming conventions (because you need a convention and PEP8 seems as good as any) but I don&#8217;t limit line length, I don&#8217;t make my docstrings so spacious, etc. But anyone who can&#8217;t work with my code because it doesn&#8217;t precisely fit some document&#8230; the problem lies with their adaptability.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1186</link>
		<author>Nick</author>
		<pubDate>Fri, 30 Mar 2012 08:33:23 +0000</pubDate>
		<guid>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1186</guid>
		<description>The PEP itself even says that a good reason to not follow it is if a project already uses another scheme. That said, PEP8 is conveniently already written out and justified, and most people know about it, which makes it much easier to establish a convention in a group project.</description>
		<content:encoded><![CDATA[<p>The PEP itself even says that a good reason to not follow it is if a project already uses another scheme. That said, PEP8 is conveniently already written out and justified, and most people know about it, which makes it much easier to establish a convention in a group project.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gael Varoquaux</title>
		<link>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1185</link>
		<author>Gael Varoquaux</author>
		<pubDate>Fri, 30 Mar 2012 06:19:45 +0000</pubDate>
		<guid>http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/#comment-1185</guid>
		<description>I agree with Luke: having all Python code look the same is a huge benefit. I really appreciate to be ablr to pick up any code and have it feel like I wrote it. It makes me more likely to use it, and potentially to contribute patches.</description>
		<content:encoded><![CDATA[<p>I agree with Luke: having all Python code look the same is a huge benefit. I really appreciate to be ablr to pick up any code and have it feel like I wrote it. It makes me more likely to use it, and potentially to contribute patches.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
