Generate tested code with LLM Assistance
Here's the flow of prompts I used today to convert a code file from one language to another and provide test coverage.
The specific use case:
Converting a code file, part of a larger codebase, in a language I am unfamiliar with (Elixir) and that has no tests into a code file and unit tests in a language I am familiar with (Node).
Outcome: 50 lines of node.js codes covered by 10 tests (90+% coverage) with documented expectations. 30 min.
Caveat: Whether the file performs all the needed behavior will become more apparent as I convert other dependencies across, i.e., I still have to make sure it works!
Chief Marketing Officer | Product MVP Expert | Cyber Security Enthusiast | @ GITEX DUBAI in October
10 个月Ken, thanks for sharing!
Thank you.
11 个月Thank you for sharing this.