Testing code
Testing code is vital.
First, you need to know that it works for you and others. So, you need to have something like a requitements.txt
file where you list all code libraries or “packages” that are needed, and their versions. Yes, this book is very Python-centric.
Always look at the full requirements!
How do you test code?
Here are some options for testing your code. You should do at least the second, third, or fourth option, and always the fifth option.
- Run the code yourself on your machine
- Write and use test rigs to test every module/function and the whole code
- Get ChatGPT/Gemini to write some test rigs for you
- Get a virtual software company such as ChatDev to do it for you
- You’ll ultimately still need humans to test it all, until artificial general intelligence (AGI) is achieved
Note
This is debated, but the general idea of AGI is that AI is at least as intelligent and adaptable as an average human....