[wp-forums] Thread layout borked

Chip Bennett chip at chipbennett.net
Thu Apr 5 13:01:07 UTC 2012


Re: 10 lines of code, specifically:

One thing that would especially help volunteers who are attempting to
answer questions would be to *exclude inline comments from that 10-line rule
*. I know that I sometimes tend to be verbose, but even still, I often find
it helpful to document several (if not all) lines of code, to clarify the
solution being suggested.

With the 10-line rule, that generally means that I have to keep my code
blocks within a limit of no more than 5-7 lines. (Usually, that just means
more creative separation of the code into two or more blocks, but that's
not always ideal.) But in my experience, providing the inline comments for
the solution code tends to lead to fewer repeat questions, and a
more-quickly-resolved topic.

Chip

On Thu, Apr 5, 2012 at 5:38 AM, esmi at quirm dot net <esmi at quirm.net>wrote:

> on 05/04/2012 11:02 Francisco de Azevedo said the following:
>
>
>  What are the reasons behind the "no more than 10 lines of code" rule?
>> *a.* Security (i.e., to discourage code injection tactics, etc.);
>> *b.* Resource limitations (code takes space and therefore increases thread
>> size);
>> *c.* Thread readability;
>> *d.* None of the above or another reason.
>>
>
> All of the above, I think.
>
> a) Don't know how many times I've removed hack code (ie code that has been
> injected into hacked sites) that was setting off AV software from topics.
>
> b) Pasted code can get into thousands of lines. Whole style.css files or
> plugin files. i think the most I've seen was a little over 4,000 lines. We
> did have a problem where, around the 2,500 lines of code line, you could
> not edit the post. You just got a blank textarea. Re-assembling the
> non-code part of the post manually was *real* fun. Not seen that in a
> while, so Otto may have been able to fix it.
>
> c) Obvious one really. Plus, I've noticed that posts with great chunks of
> code have a significantly reduced change of being answered (presumably
> because people don't want to read through screen after screen of badly
> formatted code). Using a pastebin really could increase the response rate.
>
> d) I've seen code totally wreck the back end of the forums too - which
> just makes life more difficult for mods.
>
> The specific "10 lines of code" was never initially intended. When the
> Forum Welcome was put together, I recall that we originally said something
> like "a reasonable amount of code" (or words to that effect) - which meant
> that mods could use their own judgement. But posters complained that they
> needed the code limits clearly defined, so someone chose 10 lines and, lo,
> it became the law. I think posters really stabbed themselves in the foot
> with that one, personally.
>
> Regarding the problem of pastebin.com being blocked by some work
> networks, does this kind of ban extend to all pastebin sites? There's a
> whole list of pastebins at <http://en.wikipedia.org/wiki/**
> Comparison_of_pastebins<http://en.wikipedia.org/wiki/Comparison_of_pastebins>>.
> Perhaps we could pick a few and incorporate them into the Forum Welcome to
> help circumvent bans?
>
> Mel
> --
> http://quirm.net
> http://blackwidows.co.uk
>
> ______________________________**_________________
> wp-forums mailing list
> wp-forums at lists.automattic.com
> http://lists.automattic.com/**mailman/listinfo/wp-forums<http://lists.automattic.com/mailman/listinfo/wp-forums>
>


More information about the wp-forums mailing list