Skip to content

Comment on Ask HN: How do you coax useful code from AI?

Comments

It can’t think for you. It can type for you.

Treat it like an intern and a rubber duck.

It may be able to suggest the names of existing algorithms, but unless they’re absurdly common or simple it’s unlikely to be able to implement them for you.

If you need to come up with your own algorithm, prompt it to ask you questions to clarify your own thinking.

Document in plain English how you want your algorithm to work.

Stub out APIs yourself, and add comments describing what each function/method should do. Have the AI come up with and implement test cases. Then have it implement the methods to pass those test cases. Then debug.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.