Lalitha A R

Start with the test suite or benchmark instead of main function file

It forces you to clarify

  1. the constraints
  2. what success looks like in concrete terms instead of something vague
  3. what are the edge cases / failure modes you want to prevent

This is not a linear, let alone finished process at this stage. You will write (3) and realise it’s due to a constraint you didn’t formulate yet in (1). You will write the main functionality, then come across a weird edge case to add to or find out a criteria (2) was a bit too loose making it buggy. But overall seems like a better place to start than retrofitting everything post writing the function, esp when it’s an AI writing it.

Some examples of where it worked:

Footnotes

  1. and classy.