Coding rules explanation and use of Sequential file access
Not what you're looking for?
1. Discuss why naming conventions are important and why programmers should consistently follow them. Include in this discussion problems that could arise in naming variables if one convention is not followed.
2. Why is it important to consistently follow coding rules and techniques? What are the pitfalls of not doing so?
3. Explain what a sequential access file is. What are the advantages and disadvantages of using sequential access data files?
Any addition references will be greatly appreciated.
Purchase this Solution
Solution Summary
Elaborate discussion on various topics including:
Variable Naming Conventions
Coding rules and techniques.
Advantages and Disadvantages of Sequential file access
Solution Preview
1.
It is always good practice to use suggestive variable names that will assist in the documentation of a program. A good convention for variable names can often assist someone in better understanding the operation of a program module or script. For example, a good variable name should indicate its use, like "ErrorMessage" or "InputBuffer". Also, if the variable has several different uses, it can be split up into several different variables.
To illustrate the point of the problems that could arise for not following some convention take a look at the following code snippets
Bad Examples:
a) l = l + 1;
b) This = That + O;
c) const int TWENTY_EIGHT = 28;
d) #define FALSE TRUE
Another worse example would be the use of lower-case L or uppercase o as variable names, especially in combination.
e) int a = l;
if ( O = l )
a = O1;
else
l = 0;
Look for a comprehensive guide to C++ naming conventions
http://www.nbirn.net/Resources/Developers/Conventions/Style/C_Naming.htm
Variable naming and code layout/style in general, can result in some never-ending discussions. In the end, it doesn't really matter what style/standard you use, as long as you stick to it. If you're comfortable with a style, use it. Just don't get religious about it. When you start developing professionally, chances are you'll end up in a place where the coding-standard says something ...
Purchase this Solution
Free BrainMass Quizzes
Word 2010: Table of Contents
Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.
C# variables and classes
This quiz contains questions about C# classes and variables.
Basic Networking Questions
This quiz consists of some basic networking questions.
Javscript Basics
Quiz on basics of javascript programming language.
C++ Operators
This quiz tests a student's knowledge about C++ operators.