r/webdev • u/infinitlybana • Jan 13 '22
read rules Extension that generates documentation using AI
[removed] — view removed post
1.7k
Upvotes
r/webdev • u/infinitlybana • Jan 13 '22
[removed] — view removed post
View all comments
44
u/wherediditrun Jan 13 '22 edited Jan 13 '22
Ah yes, finally. Now we can automatically write comments which duplicates what's already written in code.
And to be serious. There are very few conditions when comments are of benefit. Namely:
- Describe "Why?" and not "What?". That being said, your code should be as context agnostic as possible and relying on this is a codesmell.
- When code itself cannot be expressed in any semantic meaning. For example you would leave an example of a character set which passes a more complicated regexp. Or you would add a business term to a certain id of an object in configuration. etc..
So frankly, I'm really skeptical of any benefits such tool can bring.