View Single Post
Old 04-11-2007, 10:48 AM   #3 (permalink)
snicka
Crazy
 
snicka's Avatar
 
It is usually better to make your code readable rather than funny. If I saw that "if wanka" it would cause me to have to look up wtf that does. Now if it said "if $debug" that explains what it does and another programmer looking at the code will instantly understand it.

I write code in C and C++ so I tend to use macros which can be compiled away to nothing if PRINT_DEBUG is set to 0. So my code tends to looks like this:


int ape = 1;
int pimp = MakeChimp(ape);
DbgPrint("The value of pimp:%d, ape:%d", pimp, ape);

Last edited by snicka; 04-11-2007 at 10:51 AM..
snicka is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47