CPS202 Week 6 Break and MiniQuiz Review Homework for chapter 5 ----------------------------- Issues and Concerns? -------------------- Comments and Tips ----------------- Beware unused variables - they take up room in the code, make the code harder to understand, and can waste memory space in the computer. User prompts - be concise, precise, and be grammatically correct. Spacing - spacing is often a matter of personal taste, but here are some places where spacing is more or less standard, and should be adhered to: #include // Add a space before the < # include // Remove the space after the # scanf("%d", & month); // Remove the space after the & Don't double space code, unless each line is a logical unit. Don't be stingy with space either - it can be a delicate balance. Indents - I can't tell when people are not indenting and when the Web form is removing indents during cut and paste ... so I am going to stop noting it in returned homework. But, do be sure to use it, and use it consistently. Pick a personal standard and stick to it. Comments - it can make code easier to read if comments are lined up - have every line with a comment start at a certain point. If using block comments, have all ending comments stop at the same point. Be sure to be adding a comment to the tops of your files that includes your name and the program or problem you are working on. Variable names - names like i and f are good for general purpose variables, but we are writing longer, more involved programs now, so if you're not yet in the habit of using longer names, start now. Hungarian notation ------------------ Code that uses Hungarian notation makes the type of the variable become a part of the name of the variable: char cInput; int iTemp; float fAmount; int *ipValue; int bFlag; // boolean Might be a good choice if you're having trouble naming variables. Coding Standard --------------- Break ----- MiniQuiz --------