79 chars or more?

Nobody nobody at nowhere.com
Tue Aug 17 17:58:09 EDT 2010


On Mon, 16 Aug 2010 22:35:49 -0400, AK wrote:

> As monitors are getting bigger, is there a general change in opinion on
> the 79 chars limit in source files? I've experimented with 98 characters
> per line and I find it quite a bit more comfortable to work with that
> length, even though sometimes I have to edit files in 80 width
> terminals, it's still easier to adapt to some inconvenience when that
> happens than the other way around, since about 95% of time or more, I do
> use wider editor window or terminal.
> 
> Is going over 79 still a terrible thing to do?  -andrei

If the the limit isn't 79, then what is it? Or are 1000-column lines okay?

Often, simply having a convention is more important than the precise
details. E.g. I don't particularly care how I configure my text editor's
auto-formatting settings, but I do care about not having to change those
settings for each file.

For code which will never be read or edited by anyone other than yourself,
use whatever conventions you want. If you're going to publish the code,
it's a good idea to stick to established standards (80-column lines,
8-column tabs, no gratuitous use of non-ASCII characters, etc).

Apart from "altruistic" reasons, bear in mind that the next time you apply
for a job, the employer may look at your code not just to determine your
programming competence, but also whether you're likely to be a "team
player". Code which doesn't follow normal conventions says "I've only ever
worked on my own, not with other people".

I can't stress enough how big a factor this is. Writing code by yourself
and working as part of a team are almost entirely different skills. Anyone
who regularly hires programmers will be only too aware of the difference.




More information about the Python-list mailing list