构建一个计算器网络应用程序并与Devin一起重构它
Build a calculator web app and refactor it with Devin
一位Scott Logic的开发者与Devin一起构建了一个计算器网络应用程序,然后计划对庞大的代码库进行重构,并将计划分块反馈,从而使项目规模减少了大约60%。
做了什么
James Camilleri gave Devin a carbon-emissions spreadsheet and a connected repo. His first Electron attempt failed, so he restarted with TypeScript/React, starting with the calculation models and then the UI. Devin planned, branched, built and raised PRs for him to review. After a few calculators the code was repetitive, so he had Devin analyse it and write a refactoring plan, which he fed back in chunks.
效果如何
The refactor cut project size by about 60%. The app took just over a week. Camilleri couldn't read all the generated code, so he relied on tests and focused review of key logic.
值得注意
The build used about 155 ACUs, roughly $350, and the account needed several top-ups. Start new sessions regularly to avoid context rot.
试试这个 Prompt
Build a small web app in [framework, e.g. React] that provides [type of calculators, e.g. mortgage, tip, unit conversion], with a clean layout and basic tests. When it works, review the codebase and write a step-by-step refactor plan that removes duplication and unused code, split into small chunks I can approve one at a time. Pause after presenting the plan and wait for my go-ahead before changing any code, then finish when the tests pass and you've reported how much smaller the project got.