Generate tested code with LLM Assistance
sample of the sequence

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!


Monikaben Lala

Chief Marketing Officer | Product MVP Expert | Cyber Security Enthusiast | @ GITEX DUBAI in October

10 个月

Ken, thanks for sharing!

回复

Thank you for sharing this.

回复

要查看或添加评论,请登录

Ken Judy的更多文章

社区洞察

其他会员也浏览了