Quote:
Originally Posted by kerowo
How do you know you're not in a loop or a conditional? Seems like FPS.
I know because I know? Not sure how to answer that, but I'll take a stab. Based on your asking the question, it would seem that if you see indented code of your own you know you are either in a loop or a conditional. When I see indented code of my own I know that I'm in a loop, a conditional, or file I/O.
I don't believe it's FPS at all, and I believe it stems from the fact that, around 25 years ago, I had a teacher that very forcefully ingrained on us students that, when we're dealing with file I/O, we get in, and we get the hell out of the file as soon as is absolutely possible. So the indentation is a reminder that, hey, we're working with a file right now, so every line of indented code here better need to be done while the file is still open, if not, move it up to before the file is open, or down to after the file is closed.