aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-02-20 22:26:50 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-02-20 22:26:50 +0000
commit62937fa5cddcd106c26c950ad336d137f50c6b13 (patch)
treeb8b99b46b2a73090ddcb2c81826413134a19fb61 /doc
parent8ba7390e89a4b0282f13c29bd189a1f006e24965 (diff)
downloadenigma2-62937fa5cddcd106c26c950ad336d137f50c6b13.tar.gz
enigma2-62937fa5cddcd106c26c950ad336d137f50c6b13.zip
add note about usage of print
Diffstat (limited to 'doc')
-rw-r--r--doc/RULES20
1 files changed, 19 insertions, 1 deletions
diff --git a/doc/RULES b/doc/RULES
index a6283633..ed75b15e 100644
--- a/doc/RULES
+++ b/doc/RULES
@@ -94,7 +94,25 @@ An ascii file ends with \n, and preferrable not with other empty lines.
That means: make sure the last line doesn't contain any characters, thanks.
-5.-99.) Threads are bad.
+4.) usage of 'print'
+
+While it's great to dump out debug stuff, especially if your code can crash,
+expect your code to be stable at some point.
+
+At that point, others might get annoyed by the debug output created by your
+code. That's no problem, they can remove it, but they have to find them
+first.
+
+Using "print obj" with obj being some object, preferably a complex one, is a
+good way to ensure that nobody is able to remove your debug output - because
+nobody finds it!
+
+Please, always prepend something before which can be grepped. Anything, just
+not nothing. Going trough all prints to find the offending one is definitely
+no fun. Something like "print 'obj', obj" is fine. Something like "print
+'mySpecialPlugin actionmap is', actionMap" is even better.
+
+6.-99.) Threads are bad.
(Unless they are worker threads. And sleep()ing is definitely not working.
So if you every having a thread which sleeps, you did something wrong. There