[Tutor] Shortening the code of a finsihed program.
Steven D'Aprano
steve at pearwood.info
Sat Nov 26 01:07:21 CET 2011
Alan Gauld wrote:
> On 24/11/11 16:20, Mic wrote:
>
>> and then try to put these parts togheter into a large program, I decided
>> to post my entire program.
>
> Its usually better to paste long programs into a pastebin web site and
> give us a link.
> This saves cluttering up people mail with long messages, and also the
> pastebin rendering will usually be easier to read with syntax coloring etc.
I'd just like to say that some of us disagree with this advice. Some
people (e.g. me) often read their where getting access to a browser is
less convenient. More importantly, many pastebin sites are short-term
only, after some weeks the bin disappears and the code is lost, which
destroys the archival value of the post.
If your code snippet is short, say, less than two dozen lines, there's
no need to using a pastebin, just include it in your post in-line. More
than that, you should attach it to the post as an attachment, as a .txt
or .py file. Under no circumstances use your mail client's "rich text",
colours or multiple fonts.
Even a 200 line program isn't that big, it's only about 6K. If your code
is so large that syntax highlighting becomes particularly useful, then
chances are it's too long and people won't read it regardless. We're
volunteers doing free support, but there are limits to how much code
we're going to wade through if it doesn't interest us personally.
--
Steven
More information about the Tutor
mailing list