<?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: PEP8? Or not?</title>
	<link>http://ramblings.timgolden.me.uk/2012/03/27/pep8-or-not/</link>
	<description>The ramblings of Tim Golden</description>
	<pubDate>Tue, 21 May 2013 14:51:28 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2</generator>

	<item>
		<title>By: fox</title>
		<link>http://ramblings.timgolden.me.uk/2012/03/27/pep8-or-not/#comment-1173</link>
		<author>fox</author>
		<pubDate>Wed, 28 Mar 2012 09:00:41 +0000</pubDate>
		<guid>http://ramblings.timgolden.me.uk/2012/03/27/pep8-or-not/#comment-1173</guid>
		<description>I totally agree with Luke

I think that PEP8 is a great guideline for good readability. Almost every piece of software I write is PEP8 compliant and reading non compliant software is quite discouraging for me if I'd like to send a patch or contribute in some way.
I think that having a common style in every python code could increase readibility, remove the need of adapt to different styles and make contributing and patching easier.</description>
		<content:encoded><![CDATA[<p>I totally agree with Luke</p>
<p>I think that PEP8 is a great guideline for good readability. Almost every piece of software I write is PEP8 compliant and reading non compliant software is quite discouraging for me if I&#8217;d like to send a patch or contribute in some way.<br />
I think that having a common style in every python code could increase readibility, remove the need of adapt to different styles and make contributing and patching easier.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tim</title>
		<link>http://ramblings.timgolden.me.uk/2012/03/27/pep8-or-not/#comment-1172</link>
		<author>tim</author>
		<pubDate>Wed, 28 Mar 2012 07:32:14 +0000</pubDate>
		<guid>http://ramblings.timgolden.me.uk/2012/03/27/pep8-or-not/#comment-1172</guid>
		<description>Thanks to everyone for the comments so far. I'd like to emphasise that I'm not bashing PEP8 as such for work on the Python core. Like several of you, for example, I'm not personally mad about a 79-char limit, but it's a reasonable choice. Likewise 4-space tabs, etc. My point is that: that's what the Python core devs want; you don't have to use the same.

@Luke Plant: you make some good points. I'll try to address them in a second post if I can find the time today.</description>
		<content:encoded><![CDATA[<p>Thanks to everyone for the comments so far. I&#8217;d like to emphasise that I&#8217;m not bashing PEP8 as such for work on the Python core. Like several of you, for example, I&#8217;m not personally mad about a 79-char limit, but it&#8217;s a reasonable choice. Likewise 4-space tabs, etc. My point is that: that&#8217;s what the Python core devs want; you don&#8217;t have to use the same.</p>
<p>@Luke Plant: you make some good points. I&#8217;ll try to address them in a second post if I can find the time today.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nik Ridder</title>
		<link>http://ramblings.timgolden.me.uk/2012/03/27/pep8-or-not/#comment-1171</link>
		<author>Nik Ridder</author>
		<pubDate>Tue, 27 Mar 2012 22:55:21 +0000</pubDate>
		<guid>http://ramblings.timgolden.me.uk/2012/03/27/pep8-or-not/#comment-1171</guid>
		<description>I whole heatedly agree, especially with the 80 character limit. The only thing I would like to be enforced more strictly is indenting since it is relevant to the execution of the code.</description>
		<content:encoded><![CDATA[<p>I whole heatedly agree, especially with the 80 character limit. The only thing I would like to be enforced more strictly is indenting since it is relevant to the execution of the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Katie Cunningham</title>
		<link>http://ramblings.timgolden.me.uk/2012/03/27/pep8-or-not/#comment-1170</link>
		<author>Katie Cunningham</author>
		<pubDate>Tue, 27 Mar 2012 18:30:42 +0000</pubDate>
		<guid>http://ramblings.timgolden.me.uk/2012/03/27/pep8-or-not/#comment-1170</guid>
		<description>Yes!

While I love beautiful code, someone waltzing in and dissing something I posted due to it not being PEP8 makes me want to pull out my hair. It's often just distracting from the main issue, like complaining about there not being any cream-filled donuts in the Krispy Kreme box at the meeting.</description>
		<content:encoded><![CDATA[<p>Yes!</p>
<p>While I love beautiful code, someone waltzing in and dissing something I posted due to it not being PEP8 makes me want to pull out my hair. It&#8217;s often just distracting from the main issue, like complaining about there not being any cream-filled donuts in the Krispy Kreme box at the meeting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke Plant</title>
		<link>http://ramblings.timgolden.me.uk/2012/03/27/pep8-or-not/#comment-1169</link>
		<author>Luke Plant</author>
		<pubDate>Tue, 27 Mar 2012 18:23:12 +0000</pubDate>
		<guid>http://ramblings.timgolden.me.uk/2012/03/27/pep8-or-not/#comment-1169</guid>
		<description>The problem with this approach is it basically says to anyone who *might* contribute to your projects that you are not interested.

When there is already overwhelming standardisation on PEP8 for Python projects (at least for new projects), very few people will take the effort to configure their habits and editors to adjust to your style. Some editors often don't make it easy to do anything but 4-spaces for indentations, since this is the default for Python and almost everyone sticks to it.

"Readability counts" is deeply embedded philosophy in the Python community, and sticking to standard conventions is extremely helpful to readability:


If I know that CAPITALS are generally constants, for example, I'm going to be stumped and caught out every time some code violates that. The same is true of matters of whitespace in code - whitespace gives strong hints that help me as I read, and every violation of the normal convention is a speed bump that will trip me up.

So, when you ignore these conventions, most people, myself included, will tend to conclude that 1) you disagree with the Zen of Python and 2) you don't care about other people who might read it. On that basis, I would 1) avoid using your code due to concerns about its general quality and 2) not bother to contribute back, because you don't seem to be a team player (where 'team' includes the rest of the Python world).

If that's what you want, that's fine, but I think you need to be aware of the signal you are sending. A good developer is always ready to sacrifice small personal habits for the benefit of people who will read their code, and this is one of the primary qualities I would look for in developers I want to work with.

For example, I like functional style, and think use of map and filter are often more elegant that list comprehensions, even if you need to create a lambda on the fly to get the function you want. However, in the Python community I'll normally use a list comprehension (unless there is a pre-existing function I can pass to map or filter that does exactly what I want).

In the days of github and bitbucket, when for small projects you will want to be able to fork it in seconds and contribute patches in minutes, do you really think that people want to learn your specific coding style before contributing?

Further, I'd say that the argument that you've used this style with lots of other platforms and languages counts against you - it says that you are going to program the same way no matter what the change in environment, rather than adapt.  This might not be true of course - but it's the impression you are giving.</description>
		<content:encoded><![CDATA[<p>The problem with this approach is it basically says to anyone who *might* contribute to your projects that you are not interested.</p>
<p>When there is already overwhelming standardisation on PEP8 for Python projects (at least for new projects), very few people will take the effort to configure their habits and editors to adjust to your style. Some editors often don&#8217;t make it easy to do anything but 4-spaces for indentations, since this is the default for Python and almost everyone sticks to it.</p>
<p>&#8220;Readability counts&#8221; is deeply embedded philosophy in the Python community, and sticking to standard conventions is extremely helpful to readability:</p>
<p>If I know that CAPITALS are generally constants, for example, I&#8217;m going to be stumped and caught out every time some code violates that. The same is true of matters of whitespace in code - whitespace gives strong hints that help me as I read, and every violation of the normal convention is a speed bump that will trip me up.</p>
<p>So, when you ignore these conventions, most people, myself included, will tend to conclude that 1) you disagree with the Zen of Python and 2) you don&#8217;t care about other people who might read it. On that basis, I would 1) avoid using your code due to concerns about its general quality and 2) not bother to contribute back, because you don&#8217;t seem to be a team player (where &#8216;team&#8217; includes the rest of the Python world).</p>
<p>If that&#8217;s what you want, that&#8217;s fine, but I think you need to be aware of the signal you are sending. A good developer is always ready to sacrifice small personal habits for the benefit of people who will read their code, and this is one of the primary qualities I would look for in developers I want to work with.</p>
<p>For example, I like functional style, and think use of map and filter are often more elegant that list comprehensions, even if you need to create a lambda on the fly to get the function you want. However, in the Python community I&#8217;ll normally use a list comprehension (unless there is a pre-existing function I can pass to map or filter that does exactly what I want).</p>
<p>In the days of github and bitbucket, when for small projects you will want to be able to fork it in seconds and contribute patches in minutes, do you really think that people want to learn your specific coding style before contributing?</p>
<p>Further, I&#8217;d say that the argument that you&#8217;ve used this style with lots of other platforms and languages counts against you - it says that you are going to program the same way no matter what the change in environment, rather than adapt.  This might not be true of course - but it&#8217;s the impression you are giving.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: K Lars</title>
		<link>http://ramblings.timgolden.me.uk/2012/03/27/pep8-or-not/#comment-1168</link>
		<author>K Lars</author>
		<pubDate>Tue, 27 Mar 2012 18:13:01 +0000</pubDate>
		<guid>http://ramblings.timgolden.me.uk/2012/03/27/pep8-or-not/#comment-1168</guid>
		<description>I begrudgingly adopted PEP8 style in my Mozilla work just to quiet the dogmatic gnashing of teeth and rending of garments. 

The hardest thing for me to adopt was the absurdly short line length.  Since I'm no longer writing code on a VT52 terminal, I relished the freedom of typing beyond the 79th character.  

Parallel with the trend of having tube based amplifiers to drive speakers on MP3 players, I suppose that PEP8's line length restriction is to accommodate the return of programming on punch cards.</description>
		<content:encoded><![CDATA[<p>I begrudgingly adopted PEP8 style in my Mozilla work just to quiet the dogmatic gnashing of teeth and rending of garments. </p>
<p>The hardest thing for me to adopt was the absurdly short line length.  Since I&#8217;m no longer writing code on a VT52 terminal, I relished the freedom of typing beyond the 79th character.  </p>
<p>Parallel with the trend of having tube based amplifiers to drive speakers on MP3 players, I suppose that PEP8&#8217;s line length restriction is to accommodate the return of programming on punch cards.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tim</title>
		<link>http://ramblings.timgolden.me.uk/2012/03/27/pep8-or-not/#comment-1167</link>
		<author>tim</author>
		<pubDate>Tue, 27 Mar 2012 17:31:56 +0000</pubDate>
		<guid>http://ramblings.timgolden.me.uk/2012/03/27/pep8-or-not/#comment-1167</guid>
		<description>@Geo: when I work in a team, I stick to whatever coding conventions obtain in that project. If that means having to sit down and agree some, then surely we'd do that. The result might be PEP8 or it might not, depending on where everyone's coming from.</description>
		<content:encoded><![CDATA[<p>@Geo: when I work in a team, I stick to whatever coding conventions obtain in that project. If that means having to sit down and agree some, then surely we&#8217;d do that. The result might be PEP8 or it might not, depending on where everyone&#8217;s coming from.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geo</title>
		<link>http://ramblings.timgolden.me.uk/2012/03/27/pep8-or-not/#comment-1166</link>
		<author>Geo</author>
		<pubDate>Tue, 27 Mar 2012 16:34:39 +0000</pubDate>
		<guid>http://ramblings.timgolden.me.uk/2012/03/27/pep8-or-not/#comment-1166</guid>
		<description>So I assume when you work in a team you stick to pep 8?  Otherwise who decides what the coding conventions and what happens when you can agree?</description>
		<content:encoded><![CDATA[<p>So I assume when you work in a team you stick to pep 8?  Otherwise who decides what the coding conventions and what happens when you can agree?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
