LLMs are good for coding because your documentation is shit


That's it. That's the post.

Fine! I'll expand a little more.

Large Language Models are a type of Artificial Intelligence. They can read text, parse it, process it using the known rules of English, and then regurgitate parts of it on demand. This means they can read and parse a question like "In Python, how do I add two numbers together?" and then read and parse the Python documentation. It will produce an output like:

Screenshot of ChatGPT giving a brief tutorial in adding numbers.

What happens if you search the official Python documentation for "adding numbers"? Nothing useful.

Now, perhaps you think that's a trivial and unfair example. Python has an excellent tutorial which explains addition and the main documentation isn't really aimed at the casual user.

But how many times have you tried to use a moderately popular library, searched through its documentation, and found yourself lost in a maze of twisty passages, all alike?

Be honest! Reading bad documentation sucks. Sometimes it can be impossible to look up the most inconsequential piece of syntax, and sometimes it's maddening to find an example which does exactly what you're trying to do.

We all know that StackOverflow built its empire on the back of poor documentation. Take a look at the highest ranked questions in your favourite language and see if you could answer them using only the official documentation.

Humans aren't good at doing boring things. And programmers (a sub-type of humans) hate the boring job of writing documentation and tutorials. It seems anathema to them. Even when they can be arsed to write documentation, it is rarely tested with users to see if it is understandable.

We've had over half a century of people writing documentation which is so poor that publishers have made a fortune selling books called "Learn How To Program in ___ the Easy Way!"

Do LLMs occasionally get things wrong? Yes. But official tutorials are also frequently outdated.

Do LLMs burn through hideous amounts of electricity? Yes.

Do LLMs have infinite patience when being asked simple questions? Yes.

Do LLMs win in this arena because humans are lazy? Yes.


Share this post on…

  • Mastodon
  • Facebook
  • LinkedIn
  • BlueSky
  • Threads
  • Reddit
  • HackerNews
  • Lobsters
  • WhatsApp
  • Telegram

2 thoughts on “LLMs are good for coding because your documentation is shit”

  1. If only there was an entire profession of people who know how to write technical documentation and actually enjoy doing it.

    Ah, wait a minute, there is! Technical communicators. More recently called content designers in the UK.

    Instead of burning the planet by getting LLMs to create stochastic attempts at what people need to know, how about getting humans to write decent documentation in the first place?

    Reply

What are your reckons?

All comments are moderated and may not be published immediately. Your email address will not be published.

Allowed HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <p> <pre> <br> <img src="" alt="" title="" srcset="">