Re: C++: why 80 charachters??

From: Leor Zolman (leor_at_bdsoft.com)
Date: 04/01/04


Date: Thu, 01 Apr 2004 16:04:42 GMT

On Thu, 01 Apr 2004 09:36:28 -0600, John Doe <johndoe@nowhere.com> wrote:

>I write code as long as 250+ columns sometimes (when the code refers to
>a single concept), and I don't understand why people complain about
>that. Just use the word wrap, right?

I guess if the result of your editor's word-wrapping algorithm is
acceptable to you, party down. Will that also be the case, though, with
everyone who may ever need to view your code?

>
>People who write 80 columns force everybody else in the world to see
>their code in a narrow stripe of screen, when almost every programmer
>nowdays has 1280x1024+ screen resolution. Many have 1600+!

For me, to be able to fit more than about 130 characters on my
(1400-pixel-wide) screen would require reducing the font size to something
my 45-year-old eyes would not enjoy trying to read (I get enough headaches
as it is, thank you very much). Not to mention the fact that I may want to
fit another window next to my editor while editing (or at least be able to
see some portion of it)
 
>
>If the algorithm does not fit into one screen, you are going to make
>mistakes when writing or reading it. Losing 2/3 of the screen to stay
>into 80 charachters seems nonsense to me.

Bah. If the algorithm doesn't fit on one (modern-length) screen, it's too
complicated (or uses trivial constructs like lots of switch cases).

What about printing? Are you pleased with the results of trying to print
your file with the 250+ columns? I guess you can customize some sort of a
print utility (like the ZLPR program I give away on my site) to do
intelligent things with those long lines, but I think sometime, somewhere,
someone is likely to curse you for them.
        -leor

-- 
Leor Zolman --- BD Software --- www.bdsoft.com
On-Site Training in C/C++, Java, Perl and Unix  
C++ users: Download BD Software's free STL Error Message Decryptor at:
   www.bdsoft.com/tools/stlfilt.html


Relevant Pages

  • Re: How much requirement documentation up front?
    ... provide a best fit for a particular product. ... where there is no historical data or products where consumer habits ... fitting analysis again and selects a new algorithm. ... The fact that the software product itself makes it very convenient to ...
    (comp.object)
  • Re: random model
    ... My GA algorithm is in fact searching for coefficients to fit a dataset. ... > thinking of are inherent in the GA itself, whatever you're modeling; ...
    (sci.math)
  • Re: 3-D fit for extrapolation
    ... of equations in as many unknowns as you have nans. ... As for evaluating a polynomial fit over the entire ... with the simplex algorithm, especially since there ...
    (comp.soft-sys.matlab)
  • Re: algorithm to sum run time of simultaenous jobs?
    ... jobs are a match for the size of the objects you're trying to fit into ... the 5 bins? ... then my understanding is that there is no algorithm outside of ...
    (rec.puzzles)
  • Re: Marshal::StringToHGlobalAnsi and System.AccessViolationException
    ... strncpy_s(someStr, 19, str, 19); ... This call tries to copy 19 characters plus null terminator into a buffer with a specified size of 19 bytes, which will not fit. ... It does not allocate additional memory, which it achieves by temporarily pinning the string. ...
    (microsoft.public.dotnet.framework.interop)