On Sat, 7 Nov 2009 07:33:13 -0800 (PST),
wrote:
>On Nov 6, 6:00*pm, Andrew Smallshaw <andr...@sdf.lonestar.org> wrote:
>> I keep getting criticism for ignoring an imagined 80 column limit.
>
>As others have posted, I find the 80 column limit to be a good
>one.
>
>However, in my case, that doesn't come from printer limitations
>and it doesn't come from my imagination either. It comes from
>80 characters being the width of a non-GUI console.
>
>Sometimes I use a GUI and sometimes I don't.
I think that's a point. I do the same thing, mostly because I still
have and use Microsoft's M (or ME) which supports writing your own C
code that can be linked into the editor to extend its features. I've
done that. However, the fact that I can also do a lot of editing with
Windows' editors (IDE or otherwise) means that it isn't quite as much
of an issue for me as it would have been when I was only using that
editor alone.
The printing issue is more important to me partly because straggling
lines that display into the left side margins distract my eye. It's
just enough that I have to _consciously_ ignore them. And that can be
just enough of an annoyance in constructing mental models from reading
that I can be slowed down for a moment. Why have the trouble, at all?
It's also about worrying about others who may read or need to print,
too. Or have their own reasons for preferring an 80 column limit.
(Very few have problems working with 80 or under.) It's not just for
me.
A few days back:
On Thu, 5 Nov 2009 08:57:54 -0000, Paul Carpenter
<> wrote:
> More importantly indent with spces the block of code by the
> same amount. Tabs can be different on systems/IDE/editors
Tabs are a great question for which I don't have a perfect answer. It
was interesting also to see this on the same day (at my longitude):
On Thu, 05 Nov 2009 15:47:47 -0600, Vladimir Vassilevsky
<> wrote:
>Just don't write assembly code in capital letters and do fill tabs
>with spaces.
My own preference is to do space-fill and to use 4 spaces per. With
fixed-pitch fonts, 3 is okay. 2 is too small for my eyes to quickly
recognize in the face of all fonts and characters. So I like at least
3. More than 4 or 5 and it eats up the 80 columns too fast. Which
brackets me, tightly. And using spaces ensures that others see about
what I want them to see -- there is a consistent appearance I can plan
for this way.
Not every program allows for viewing or printing with arbitrarily set
tab stops ... some insist on columns 9, 17, etc. and brook no changes
to that. Use of tabs would wreck some havoc in these cases.
However, there is an argument _for_ tabs when I take into account
others who may also want to read or print my code. Tabs provide the
easy ability for different people to select different preferred
alignments and they work even in the face of proportional fonts, which
some may also prefer for reasons of their own. If I enforce my own
indent requirements by using spaces, I make it more difficult for them
if they really want something other than my own choice.
What nails down the answer to these questions starts with this: I need
and want creative control over the appearance of what I write. There
are times when I need to generate ASCII pictures to help communicate
issues related to the code. I do this often enough that it is very
important. Here's an example of what I mean, which includes a
coroutine diagram, some tables, and examples in order to discuss the
methods I used in writing a fast 8051 float division routine:
http://www.infinitefactors.org/jonk/zips+src/_fsdiv.c
In these cases, and others, using tabs becomes far too much of a
liability in communicating to others. I need to have a lowest common
denominator I can rely upon for communication. Limiting as it is,
this means spaces, not tabs; 80 columns, not more; and fixed-pitch
fonts, not proportional.
Jon