The important thing with commenting is to keep it simple but precise. Just in case you don't know what commenting is, it is the insertion of text in your code without affecting it. Any text after and inline with a pair of forward slashes // is considered a comment. Also, any text, no matter what line, between a /* and a */ is a comment. Here's an example: variable = 23if paper = 43 { pen = “Microphones are awesome” } // I'm a comment. Ain't I cool. /* Oh hi there, I am a comment too, but the neat thing about me is that I can do this. Oh yeah, I'm multi-line baby. */ That example didn't represent good commenting practice but it does demonstrate the concept well enough. Comments are a personal thing. I like to write them as if I was jotting down what was going on in my head at the time. This allows me to remember why I wrote the code. When coming back to code or variable reserves, it's sometimes difficult to remember what they were for. You may even find out that when returning to code you wrote a week ago, you made a function or variable that you didn't even need. If there were no comments stating what it was used for, you would end up keeping those lines of code in your program, needlessly taking up precious memory and eating up sacred CPU cycles. Commenting is like the icing on the cake that can make or break the very thing that's at steak. I have no idea, just go with the flow. Sincerely speaking though, few things separate amateurs from professionals more than the presence of comments. |

