OT - Tips for width constrained text
There has been some discussion on a thread about these
parts, as to the difficulty of posting code that is constrained
by width (as the SSCCE document, ..as well as common
sense, might suggest when posting code to usenet).
One suggestion was raised to simply upload the code to
a web site and provide an URL - this is a good solution, in
that it completely removes the need to worry about line-wrap.
Lines do not wrap in code that is downloaded.
GeoCities was suggested as one free place to upload code,
but another poster pointed out that GG users also had the
option to upload 'documents' to their GMail accounts and
link directly to that.
The one reservation I have with linked code though, is that
some people who either "read off-line", or "just don't click
links - ever"*, do not have access to it, and the responses
might be fewer and further between. Also, asking people
to post to the group really puts the pressure on to keep
the code *short*. Code at the end of links often has 40
buttons (etc.) not needed to display the problem.
* And I suspect that is a lot of people.
So.. for those wanting to post code to groups, who have
trouble figuring how wide it is, I suggest this scale.
1 2 3 4 5 6
Paste that comment into Java source code shown in
a fixed width font, and it is easy to judge when later
code will exceed the 'limit'.
What is the limit? I have heard it suggested at 72 chars,
but to be safe, I suggest limiting code lines to no more
than 65 chars.
Message posted via JavaKB.com