The quality of a program depends on 3 main metrics:
Metric 1 is often the most important for beginners but 2 and 3 are always hanging around in the background and need to be considered explicitly. It isn't easy to lay down precise guidelines for 1, 2 or 3 because they often interact -- a program which is easy to read may not be maximally fast to run -- so it is often necessary to strike a balance. Where this balance lies will depend on the demands of the application for which the program is required. The following are a few useful heuristics: