Libre Software People's Front

don't confuse it with People's Front of Open Source

80 columns limit in the XXI century

leave a comment »

A couple of weeks ago some colleagues and I were discussing whether to follow the Style Guide for Python Code (PEP8) and its limitation of 80 columns. The origin of that limit is much older than I thought. It comes from the IBM punch cards!.

At first sight it’s nonsense to obly people to write code in 80 columns when most of the screen display resolutions are above 1024×768. On the other hand, it is better to find “standards” to be followed in your collaborative projects.

According to PEP8 these are the main reasons for using the old limitation:

  • there are still many devices around that are limited to 80 character lines
  • limiting windows to 80 characters makes it possible to have several windows side-by-side
  • it is easier to be read

I agree with the second point, but first and third point are at least debatable. What is sure is that the 80 columns limitation will be updated sooner or later. The second argument will be useless when most of the screens displays will be above 1280×800 pixels. The only question is when the 80-column will be part of the past.

Some big projects like webkit also faced the problem of choosing whether following the entire PEP8 or throwing the 80-col out the window. The discussion is available here.

So .. finally we decided to use the PEP8 as far as possible. The new contributions made to bicho and cvsanaly follow it and the legacy code should be updated during the following months.

Advertisements

Written by sanacl

December 17, 2011 at 9:49 pm

Posted in Uncategorized

Tagged with , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: