Skip to content

Training / AVCleared Programming Specialist / Lesson 5 of 7

Code quality, security and documentation

Version control, naming and comments, configuration, credentials, backups and handing over code.

About 12 minutes

Version control

Keep every project in version control (such as git). You can see every change, roll back a bad one, and know which version is on site. Tag the version you deliver.

Readable code

  • Use descriptive names ("boardroomProjectorPower", not "x1").
  • Comment why, especially workarounds for device quirks. Don't comment the obvious.
  • Keep settings like IP addresses, ports and room names in one configuration place, not scattered through the code.

Credentials

Never hard-code a client's passwords into shared source files. Keep credentials in protected configuration, use unique passwords per client, and share them only through secure channels.

Changes on live systems

Before loading new code: back up the running program and configuration, schedule the change with the client, and have a rollback plan. Afterwards, re-test what you changed and anything that depends on it.

Handover

The contract decides who receives the source code and configuration. Either way, your company should archive the final delivered version with its documentation, so the next programmer (who may be you, in three years) can support it.

Create a free account to track which lessons you've finished and take the exam.