[wp-forums] Thread layout borked
esmi at quirm dot net
esmi at quirm.net
Thu Apr 5 10:38:23 UTC 2012
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>. 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
More information about the wp-forums
mailing list