News for hackers. Stuff that matters.
Re:Automatically document an entire codebase using LLMs by hedora on Friday March 24, 2023 @10:27PM (#35298580)
This has far surpassed my dystopian predictions of how people would misuse LLMs.

Self spamming your own code base with comments that are either obvious, misleading or wrong was previously unfathomable to me.

Most people think I’m unrealistically pessimistic.

Well done.

Re:Automatically document an entire codebase using LLMs by armchairhacker on Friday March 24, 2023 @10:41PM (#35298699)
But you see, developers have been self spamming their code with obvious, misleading, and/or wrong comments for decades. Especially with those pesky “everything must have a doc-comment” linters. Think of all the time ChatGPT will save doing it for them!
Re:Automatically document an entire codebase using LLMs by vorticalbox on Saturday March 25, 2023 @10:41AM (#35303090)
I have actually been using chatGPT do write jsdocs for me.

It mostly only need the function and the type definitions (typescript) and it is usually very good at writing them and it does save me time.

Re:Automatically document an entire codebase using LLMs by abhishekbasu on Friday March 24, 2023 @10:42PM (#35298706)
your pessimism is hardly unwarranted. this will lead to rather lousy code documentation, and might be misused by folks. but on the other hand, i look at this as something that will be effective as a "summarizer" of sorts where it describes already written code with lack of/poor documentation.
Re:Automatically document an entire codebase using LLMs by bqmjjx0kac on Friday March 24, 2023 @10:39PM (#35298675)
It would be chef’s kiss perfect if another LLM did the code review.
Re:Automatically document an entire codebase using LLMs by abathur on Saturday March 25, 2023 @02:03AM (#35299937)
maybe a "code formatter" that just asks an LLM if it can rewrite this code, but pretty?
Re:Automatically document an entire codebase using LLMs by ChatPGT on Friday March 24, 2023 @11:11PM (#35298910)
who reads code bases anyway
Re:Automatically document an entire codebase using LLMs by userbinator on Friday March 24, 2023 @11:13PM (#35298921)
People have been doing that for a long time. It's usually a form of malicious compliance to "document everything" policies.

https://www.reddit.com/r/ProgrammerHumor/comments/4ktp12/my_...

Re:Automatically document an entire codebase using LLMs by raincole on Friday March 24, 2023 @11:17PM (#35298939)
Just becasue people are doing that for a long time it doesn't mean we should make it more efficient.
Re:Automatically document an entire codebase using LLMs by hedora on Friday March 24, 2023 @11:45PM (#35299103)
Just because we shouldn’t doesn’t mean people won’t pay for the service.

My “Well done” was not meant sarcastically!

Re:Automatically document an entire codebase using LLMs by userbinator on Friday March 24, 2023 @11:48PM (#35299124)
I doubt an LLM is more efficient than previous documentation generators.
Re:Automatically document an entire codebase using LLMs by hedora on Saturday March 25, 2023 @11:04AM (#35303331)
Wait. This is already an industry?!?
Re:Automatically document an entire codebase using LLMs by jamesrom on Saturday March 25, 2023 @12:14AM (#35299303)
Code is the ultimate reference for understanding a project, while documentation is often neglected, outdated, or incorrect. It can also be difficult to keep up to date.

An LLM may not fully comprehend the code like the original author, but it can offer a different perspective that may be valuable. The only argument I've seen against LLMs is that it may encourage laziness, but this is a flawed argument similar to those made against the printing press, which was said to make people illiterate.

As a reader of the docs: does it require discipline to refer back to the code when needed. Yes, but this is no different from the discipline required to write documentation in the first place. But with a key difference, the discipline is shifted from author to reader.

Re:Automatically document an entire codebase using LLMs by woeirua on Saturday March 25, 2023 @12:23AM (#35299359)
This just begs the question… why not generate the docs when someone reads the code instead? Why bother generating a bunch of half assed docs today when you can wait and interrogate the code in a much more natural and fluid way using the same LLM when it matters?
Re:Automatically document an entire codebase using LLMs by docandrew on Saturday March 25, 2023 @01:12AM (#35299661)
SEO. When you ask an LLM “What’s a good library/tool I can use to accomplish X?” The ones with some documentation already attached will rise to the surface and make it easier for the consuming LLM to generate code samples for.
Re:Automatically document an entire codebase using LLMs by IanCal on Saturday March 25, 2023 @04:20AM (#35300578)
1. It's cheaper

2. Everyone can see the same thing

3. It can be utilized for search

4. You can do both

Perhaps most importantly

5. It can be reviewed

Re:Automatically document an entire codebase using LLMs by ModernMech on Saturday March 25, 2023 @09:32AM (#35302455)
Because not everyone will have access to LLM technology, and even if they do, your project might not always be used in a setting where access is technically feasible.
Re:Automatically document an entire codebase using LLMs by layer8 on Saturday March 25, 2023 @12:26AM (#35299373)
In can help to give an initial overview over a code base, its structure and contained functionality (with the usual risk of inaccuracies and fabulations), but it can’t supply the rationale and contextual information that good documentation provides, which can’t be derived from just the code. It also can’t distinguish between what is an implementation detail and what is part of an implicit interface contract.
Re:Automatically document an entire codebase using LLMs by elromulous on Saturday March 25, 2023 @01:40AM (#35299813)
Re:Automatically document an entire codebase using LLMs by riku_iki on Saturday March 25, 2023 @01:40AM (#35299814)
He now can use gpt to generate code, comments, comments in code reviews, and work on 3 jobs simultaneously.
Re:Automatically document an entire codebase using LLMs by KyeRussell on Saturday March 25, 2023 @03:16AM (#35300284)
Overemployment is ruining America.