in reply to While loops with if

Ok, sorry for the indentation everyone. Yeah, I admit it is easier to read code that's indented but I find writing hard enough the way it is, if I have to worry about how to indent things properly I'd end up getting more confused. I'll start indenting some blocks a little bit to see what happens, thanks for the suggestion.

"Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

sulfericacid

Replies are listed 'Best First'.
Re: Re: While loops with if
by Notromda (Pilgrim) on Jan 03, 2003 at 19:49 UTC
    if I have to worry about how to indent things properly I'd end up getting more confused.

    Not trying to sound belittling or anything, but that's like saying "If I have to worry about using the steering wheel, I'd end up getting more confused". The good monks here know what they are talking about. The indention helps you organize your logic flow. It doesn't matter so much in how you do it, just keep it consistent. Proper indentation steers the eye through the logic flow, making it easier for everyone (including yourself) to follow the logic. Use the force, Luke. :)

indentation and security
by logan (Curate) on Jan 03, 2003 at 22:44 UTC
    Yup, indentation is important. There was a poll about it indentation in April, and the commentary is worth reading.

    I have found that good indentation is hugely valuable, not just when checking someone else's code, but also when revisiting your own code. It really cuts down on the "What the hell was I thinking?" factor. If you're using vim as a text editor, the perl syntax module will make this much easier, just add "use syntax" to your .exrc file. If there are more than two words you didn't understand in that last sentence, don't worry. It's a unix thing.

    On another topic, what are you doing with this code? If you're generating passwords, the code seems to imply that you have a list of passwords in an unencrypted plaintext file. I cannot begin to explain how dangerous that is. Please tell me that this is a class project that will never be used in the real world.

    -Logan
    "What do I want? I'm an American. I want more."