Aussie AI
Code Quality
-
Book Excerpt from "Generative AI in C++"
-
by David Spuler, Ph.D.
Code Quality
Everyone has their own opinions on the best way to write software, so I'll choose to simply offer some possible options for you to discuss. Here is my list of some of the more pragmatic and useful ways to ensure code reliability as a professional software developer:
- Lots of unit tests.
- Lots of assertions.
- Lots of bigger regression tests.
- Automated acceptance testing in CI/CD.
- Nightly builds that automatically re-run all the bigger tests that are too slow for CI/CD.
- Warning-free compilation (as a coding policy goal).
- Running Valgrind or other memory checkers in the nightly builds (Linux).
- Run big multi-platform tests in the nightly builds.
- Check return codes (as a coding policy).
- Validate incoming function parameters (as a coding policy).
- Use an error logger.
- Use a debug tracing library.
- Add some debug wrapper functions.
• Next: • Up: Table of Contents |
The new AI programming book by Aussie AI co-founders:
Get your copy from Amazon: Generative AI in C++ |