Axis Software User Manual
Linux Programming Guidelines
Experienced Linux developers tend to follow several programming style guidelines:
- Provide mechanism not policy. Linux programs attempt to provide the means to solve a problem rather than specifing how the problem should be solved. Many Linux programs can be thought of as tools that can be used to create a solution, rather than the solution itself.
- Do one thing and do it well. Generally big programs that attempt to do everything are brittle and complex to use. They tend to accumulate huge numbers of redundant menus and options, which confuse the user and slow the system.
- There is more than one way of doing something. Often Linux provides a choice of mechanisms to solve a specific problem. The programmer/user is allowed the choice of picking the one that suits them best.
- Use Text. Most programs need configuration files and or data files. If these files contain information that can be represented as text then the programmer should attempt to use a text based format. In practice, the extra complexity introduced by using text is outweighed by the ease of use. Text files are easy to check either manually or automatically and text based formats are also instantly portable between different platforms.
© HEBER LTD. 2005. This document and the information contained therein is the intellectual property of Heber Ltd. and must not be disclosed to a third party without consent. Copies may be made only if they are in full and unmodified. The information contained in this documentation is believed to be accurate and reliable. However, Heber Ltd. assumes no responsibility for its use, and reserves the right to revise the documentation without notice.
Document No: 80-17794, Issue 4r1 Release Date: 01.12.05
Email: support@heber.co.uk www.heber.co.uk