Skip to main content

Good programming practice and software selection

Short answer

Good programming practice includes planning, modular design, structured code, clear naming, defensive programming, and reviews/version control. A reliable software supplier is chosen based on reputation, quality standards, support, documentation, financial stability, compatibility, total cost, and trial.

Explain the approach for good programming practice. What are the basic criteria for selecting a company for purchasing reliable software?

Approach for good programming practice

  1. Plan before coding: understand the requirements and make a design (flowchart, pseudocode, state diagram) first.
  2. Modular, top-down design: divide the program into small functions/modules, each doing one job (high cohesion, low coupling), with clear interfaces.
  3. Structured programming: use sequence, selection and iteration; avoid goto and global variables; one entry and one exit per function.
  4. Meaningful names and consistent style: descriptive names for variables and functions, consistent indentation and a coding standard.
  5. Comments and documentation: a header per module (purpose, inputs, outputs, author, version) and comments explaining why, not what.
  6. Defensive programming: check inputs and return values, handle errors and boundary cases, initialise variables, use watchdog timers in embedded code.
  7. Reuse and portability: use tested library routines; keep hardware-dependent code separate; use constants instead of "magic numbers".
  8. Reviews and testing: code inspection/walkthroughs, unit testing, and version control (Git).
  9. Keep it simple; optimise only after measurement.

Criteria for selecting a software supplier (company)

  1. Reputation and track record: years in business, references, number of similar installations, customer feedback.
  2. Quality of the product: the company follows recognised process standards (ISO 9001, CMMI), has a testing and bug-tracking procedure, and published reliability or defect data.
  3. Support and maintenance: helpdesk, updates and patches, response time, warranty, and long-term support.
  4. Documentation and training: manuals, user training and source-code access/escrow.
  5. Financial stability of the company, so that it will exist to support the product.
  6. Compatibility and security: works with the existing hardware, OS and standards; security practices and licence terms.
  7. Cost: total cost of ownership (licence, installation, training, upgrades), not just the price.
  8. Trial/evaluation: demonstration or trial version and an acceptance test.

✓ Answer checked by Claude Sonnet 5.5

All Instrumentation II chapter 9 questions →