Hacker News new | ask | show | jobs
by RHSeeger 45 days ago
Oddly enough, asking an AI to add docs to a classfile explaining "what it does, why it needs to exist, and what uses it" is a great way to include some of the "why". I know it's not ALL the why, but it does a pretty good job of finding the reasons that someone new to the code wouldn't be aware of.
1 comments

Somewhat by definition, AI-generated docs would only include information that could be obtained elsewhere in the codebase. That can be valuable, but far more valuable is the information you got from debugging all the failed alternative designs that were never committed, etc. Information and context that goes beyond the actual code being read.

My experience is that most people fail to capture this ultra-valuable documentation, but AI never does.