Coding style is a bit like any style, everyone has their own style and it's hard to say that a style is wrong, but in coding there are some things that you should do. It's a little like wearing plaid with stripes, you can do it, but do you really want to?
When you are naming variables you want to follow these guidelines:
Variable Comments
1. Each variable should have a comment for it. The comment should describe the use of the variable.
2. The comments don't need to be super long, but should let someone know how the variable is going to be used.
Functions 1. Each function needs a comment before the implementation. The purpose of that comment is to give the name of the function, a short description, and it may list other items, e.g. the parameters, any preconditions or post-conditions. 2. See the example below
Each program will have a main function. The main function should have a comment that describes the overall program. It should list the programmer and the date it was written. This will be slightly modified for programs that are intended to be tested on Web-CAT, since Web-CAT will create the main.
So Web-CAT is a web based testing website that I use for most of my programming assignments. It allows you to submit your code multiple times and get hints if a test doesn't pass. It also allows you to work when it's convenient for you and if you are done at 3AM, great, I'll be asleep, you can tell me all about it later.
There are a few things to know about how I use Web-CAT that will make your life easier.