3 ms·
I use aider to work on the aider code base, which is approaching 30k lines of python. Aider writes about 70% of the new code in each release [0]. So it's doing
by anotherpaulg 2y ago
I use aider to work on the aider code base, which is approaching 30k lines of python. Aider writes about 70% of the new code in each release [0]. So it's doing some fairly heavy lifting in a non-trivial code base.
Some pragmatic tips:
- Work with AI like a junior developer, except with unlimited energy and no problem being corrected repeatedly.
- Provide the AI with guidance about conventions you expect in your code base, overall architecture, etc [1]. You can often use AI tools to help write the first draft of such "conventions" documents.
- Break the work down into self-contained bite sized steps. Don't ask AI to boil the ocean in one iteration. Ask it to make a sequence of changes that each move the code towards the goal.
- Be willing to explore for a few steps with the AI. If it's going sideways, undo/revert. Hopefully your AI tool has good checkpoint/undo/git support [2].
- Lint and test the code after each AI change. Hopefully your AI tool can automatically do that, and fix problems [3].
- If the AI is stuck, just code yourself until you get past the tricky part. Then resume AI coding when the going is easier.
- Build intuition for what AI tools are good at, use them when they're helpful. Code yourself when not.
Some things AI coding is very helpful for:
- Rough first draft of a change or feature. AI can often speed through a bunch of boilerplate. Then you can polish the final touches.
- Writing tests.
- Fixing fairly simple bugs.
- Efficiently solving problems with packages/libraries you may not have known about.
[0] https://aider.chat/HISTORY.html https://aider.chat/HISTORY.html
[1] https://aider.chat/docs/usage/conventions.html https://aider.chat/docs/usage/conventions.html
[2] https://aider.chat/docs/git.html https://aider.chat/docs/git.html
[3] https://aider.chat/docs/usage/lint-test.html https://aider.chat/docs/usage/lint-test.html
- zith 2y agoWhen using aider for development, do you typically review the generated diffs in aider itself or do you use an external tool? Trying to figure out what a good workflow looks like.
- anotherpaulg 2y agoMostly I just review the chat output. But I also use /diff to see actual unified diffs of the last AI change. Or if I have made a sequence of changes, I'll use my normal git tools to diff the entire branch, etc.
- alireza94 2y agoi know it might be too much to ask, but can you record one of your coding session and share it on youtube? like, one hour session using aider to implement some features for aider.