Devs, now that AIs are explaining code better than any documentation, how do we feel about not documenting anything anymore?

Most of the documentation I see are outdated and somewhat useless (just explains the variables names and minor info about the function).

I tend on only document the why's of the code and not the what's and the how's. But let me know your thoughts.

Reply to this note

Please Login to reply.

Discussion

Use AI to write the documentation and make any necessary corrections?

Maybe the AIs are explaining the code now, but what happens when they rise up against us? They will trick us, give us the wrong parameter order.

As a user, I’d rather have clear documentation than rely on AI guessing. Outdated docs suck, but no docs at all is worse. Just explain the important stuff. Why it works, how to use it, and what to watch out for.

Fiatjaf will never be able to use any packages because he refuses to use AI

Sounds like a win-win

Yes, in anticipation I never write comments.. or tests. I knew ai will do it someday.

Except for some todos, so someone (ai?) will fix it in the future. Winning.

I agree a lot of documentation is not as useful as it once was, but we should still try our best to document as much as possible certainly the key points and why’s as you said.

AIs understand the code better if there is documentation, just like humans. thinks like intent and why the function exists and what its used for, etc

Everyone has different standards for documentation but I agree with others that it can be used to generate more beneficial docs in less amount of time. Incorrect/outdated docs are frustrating but can help build a sense of the "what's" and "how's" through context, even if they aren't entirely correct.

The value of good documentation reflects in the AI of the future- so it seems worthwhile to offer it in some regard to attract both devs and AI-assisted devs to your application.

AI can tell us how an app works but it can't diagnose its own training any better than it can assume how an app is "supposed to work".

I'm just surprised that AI has learned to make code comments with the lack of devs that do it.

I do the opposite and just write crappy comments and let the AI write the code instead

As nostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s said, AI works better with code comments, too but be careful. Evil AI will gaslight you with code comments. Read the code, not the comments if you are working on anything where adversaries might be able to use AIs against you.

That said, I add code comments when I notice that they are missing or in other words, when I spent too long understanding my own code, I document it.

Self documenting code is great.

"Programs are meant to be read by humans and only incidentally for computers to execute."

"Documentation is a love letter that you write to your future self."

- Knuth

Was just thinking I'd rather have an llm fine tuned (or just loaded in memory) on the library