Comment by caymanjim

5 years ago

> I know you don't _like_ documenting, but thats not the point.

On the contrary, I like writing documentation. What I can't stand is unnecessary documentation; documentation of obvious things; documentation as a replacement for self-documenting code; documentation for a vague ill-defined future use-case that probably won't exist (YAGNI); and many of the other documentation failures I've already mentioned. It has nothing to do with my professionalism. It has to do with wasting time and energy and using it as a crutch in place of more valuable knowledge transfer mechanisms.

Self-documenting code is a complete fantasy for everything but completely trivial logic.

  • It's not. Good quality codebases do exist, and generally are fairly well self-documented.

    Typings, well-named functions and variables, consistent APIs and once in a while, a comment to summarize rationales and point out edge cases, and a README file to explain the setup and entry points.

    That is generally all you need in terms of documentation. I've dealt with plenty of codebases like these and they're a delight to learn.

    • > they're a delight to learn

      Boto3, its massive. The only reason its tolerable is that its got a large amount of accurate documentation. On the face of it, its an utter arse, because the "client" section of the library is deeply unpythonic (not in the oh its not pretty sense, as it its barely OO and uses capitals for argument names)

      If that was "self documenting" I wouldn't be using it.

      Take flask for example, its usable because its got good documentation and its well thought out.

      but, as I keep on having to tell people. Good function names and tying is not documentation. These tell you what but not why. You don't need documentation if you are working on the same codebase day in day out. But if you have to pick it up again after 6months, you'll wish that you had properly documented it.

      I get that you are proud that you don't need documentation. I don't need documentation, I want it because it makes my life 500% easier.

      1 reply →