Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

documentation is for humans.

let the LLMs read code.



Going into AI-assisted development, I thought this would be the winning strategy. I’ve since learned it’s not.

LLMs have a limited context window. It’s can’t hold a full moderately sized project in context, let alone the code of the referenced libraries. Some tools have documentation that exceed the context window.

So I’ve found that adding documentation and adding that to the context helps significantly. I even often let the AI tools generate my documentation where possible (and then manually edit). For me and the tools I use, this has helped significantly.


Code does not contain all the information of a feature.


If code does not have all the information, what processes the features?


There's often a lot of "business" human knowledge required to use a feature properly. That's usually what ends up in documentation.


Sometimes documentation is preferred source of truth, especially when multiple implementations exist. For example when you're writing code for POSIX API, you don't want to tie your code to glibc specific implementation, portable code is the whole point of POSIX.


Actually, programming languages are also for humans.


Think about it, what do you read when integrating APIs, code or documentation?


Code typically describes only the what and how. The why is usually left in people’s heads and, if you are lucky, in documentation.


Isn't code for humans as well then?


01111001 01100101 01110011


when you present this to LLM, it will be confused the same as a human reading this



ChatGPT 4.5:

Ooh, a binary puzzle—fun! Let’s decode it:

01111001 01100101 01110011

In binary, each byte (set of 8 digits) represents an ASCII character. Let's break it down:

01111001 = y

01100101 = e

01110011 = s

So, it spells out "yes"!

Got any more mysteries to solve?


Claude wasn’t confused at all by that




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: