For beginners, you might want to do brute force:
1. Write a simple function mainin one file.
2. Add some functionality, then compile the test.
3. Refactoring (use this keyword on Google).
Here are a few refactoring recommendations (not all of them can be applied at the same time):
- Duplicate functions must be divided into another function.
- Duplicate functions must be put in a separate source file and a common one.
- The structure of the code and data that a common topic should be placed in a single module.
- ,
,
.
- .
. , -. . Test Driven Development - .