I recently added some big, beautiful and detailed doc strings to the code in one of my python projects. The files are now 2-3x in line count and my token usage is off the charts.
Please dont stop documenting code because of tokens used.
comments are meant to be read by developers, not machines.
Simply dont feed the comments to the machine if you worry about tokens.
I found that too, so I updated to putting limited comments at the beginning of core files that:
- Describe what the file contains (e.g. endpoints for x with their route names)
- Links to docs that are also in the repo (e.g. bruno files for those endpoints)
The core agent files links out to architectural and product decisions as well (i have a /docs folder for them)
This works better for me and I can get a good result when asking to make sure docs are updated whenever changes are made
I recently added some big, beautiful and detailed doc strings to the code in one of my python projects. The files are now 2-3x in line count and my token usage is off the charts.
We might need new ways to document code.
Please dont stop documenting code because of tokens used. comments are meant to be read by developers, not machines. Simply dont feed the comments to the machine if you worry about tokens.
trust me, the future you will thank you
I found that too, so I updated to putting limited comments at the beginning of core files that: - Describe what the file contains (e.g. endpoints for x with their route names) - Links to docs that are also in the repo (e.g. bruno files for those endpoints)
The core agent files links out to architectural and product decisions as well (i have a /docs folder for them)
This works better for me and I can get a good result when asking to make sure docs are updated whenever changes are made
if the machine doesn't need the comments, dont feed them to the machine. simple
I hope so.