News for hackers. Stuff that matters.
Re:Ask HN: Teams using AI – how do you prevent it from break... by anotherpaulg on Tuesday January 14, 2025 @02:44PM (#42702738)
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

[1] https://aider.chat/docs/usage/conventions.html

[2] https://aider.chat/docs/git.html

[3] https://aider.chat/docs/usage/lint-test.html

Re:Ask HN: Teams using AI – how do you prevent it from break... by zith on Wednesday January 15, 2025 @05:04AM (#42709230)
When 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.

Re:Ask HN: Teams using AI – how do you prevent it from break... by anotherpaulg on Wednesday January 15, 2025 @03:49PM (#42716742)
Mostly 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.
Re:Ask HN: Teams using AI – how do you prevent it from break... by alireza94 on Saturday January 25, 2025 @10:23AM (#42822124)
i 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.