|
|
|
|
| Tutorial |
This is just one example of the misuse of a common concept.What to do? The
solution is to choose a good overall concept and make exceptions at the right places.
When you’re writing an application, you know what’s going on in your code and can
quickly maneuver from one point to another—but other people may not find this so
easy. If you get a source file from someone else on your team and need to add a list of
features to it, you first have to get an overall impression and identify the code’s different
sections. Ideally, this process will take place parallel to reading the source. But
because this is impossible to do without hints and common patterns to help you
structure the source code for reading, it’s very important to pack as much additional
information into the source code as possible, while not obscuring the obvious facts. So how
can you perceive this information and integrate it into your own code?
n Make your code easy to read.
n Add comments wherever possible.
n Choose speaking variable names wherever appropriate.
n Keep clear and consistent function interfaces.
n Structure your code into logical function groups.
n Abstract separate chunks of code.
n Use files to group your functions not only logically but physically.
n Write documentation.
The following sections discuss each of these issues.
|
|
|
|
|
|
| Link Partners: Asia florist, Flowers to India, Hong kong flowers, Site submit, Cheap web hosting, China florist, Japan florist |
|