I am wondering how much code is appropriate to post into a question/answer. By how much I mean how many lines. Is there a limit? Should I just post what I consider long code in pastebin/co and than just have a link?
If an answer comes up with a full module in one file I think up to 200 lines of code should be OK (not as a hard limit).
If the code is distributed to more than two files or exceeds a few hundred lines I would suggest to upload it to a service like:
In a question it should be enough to point out the parts that cause trouble or about the correct usage of the API (roughly max 50 LoC), a supplementary .blend file (or addon .zip) could be added.