logoalt Hacker News

rtpgtoday at 5:21 AM1 replyview on HN

> It mentions writing down in the notebook before writing code, but I can't test my notes, I can't really send my notes for code review.

I think generally it's more about sketching the high level structure of the code. I will routinely write things like :

  documents = ...
  by_client = documents.group_by(client)
  for client, doc_set in by_client:
     for doc in doc_set: csv.write(doc)

Not at all following the actual APIs I use, but I can fill in the blanks when getting the code in place.

The above is very simple, of course, usually I'm working through something where I just want to play through what pieces of data I might or might be missing


Replies

theshrike79today at 7:21 AM

I've tried that, but my brain is just going "why are you writing about doing the thing instead of, you know, DOING THE THING"?

I vastly prefer just making a working skeleton and filling that with actual code as I progress.