Jump to content
Posted 27 September 2012 - 11:27 AM
Posted 27 September 2012 - 12:01 PM
if user_door == 1 and x == 3 and x != 2:
Posted 27 September 2012 - 12:18 PM
Posted 27 September 2012 - 02:08 PM
Posted 27 September 2012 - 02:35 PM
Posted 27 September 2012 - 04:42 PM
P.S.: Use comments. Even a little bit really helps.
Posted 27 September 2012 - 04:48 PM
I comment almost every single line in my code, and then filter out useless stuff later. I find it works well. I just don't get the hero coder attitude where people would write cryptic uncommented code that "just works". If you don't understand your own code, you probably should try to.
As a beginner: I comment to the point that I feel like I'm over-commenting; but I'm not. I can't count how many times I had to revisit a code file a week or month down the road and had to sit and stare at it wondering what the cob I was thinking when I wrote it. At the time, I probably thought it was a brilliant execution. But it isn't anymore. And my error is probably somewhere in those lines. Things would be a lot easier if I knew what I was thinking at 0300hrs that morning when I typed it... :/
“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”
Posted 27 September 2012 - 06:18 PM
ero coder attitude