this post was submitted on 26 Jul 2023
8 points (68.2% liked)

Programming

16325 readers
475 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
 

I used Trelent, an extension for VS code that didn't require any registration, but their server has been unresponsive for a while. Any alternative you would recommend?
My code is in Python, mostly.

Edit: I wasn't clear on my intention. I was looking for a tool that would lay out a generic description so I would start from something and fine tune the explanation.
I am incredibly bad at documenting, the process is tedious and frustrating. At the end of the day, my explanations are mostly gibberish anyway.
From your general consensus, I should bite the bullet and do it by myself.
I really appreciate your feedback, point taken. Time to psych myself up with some death metal and get it over with.

top 7 comments
sorted by: hot top controversial new old
[–] [email protected] 9 points 11 months ago

Wow, the examples of Trelent are so incredibly useless. If you're going to generate comments like that, just don't. It is a waste of time to go through it as it is obvious from the function signature. And anything that could probably be written to be useful in the comment can't be grasped by LLM. LLMs just add padding to data, they add no content.

[–] [email protected] 9 points 11 months ago

I think the typical approach is in the opposite direction.. Write a comment about what the code should do then have the AI write the code, adjusting for any mistakes it makes.

[–] mo_ztt 7 points 11 months ago (1 children)

Hm... just looking at Trelent briefly, I wouldn't automatically assume that it's privacy-protecting -- it uploads the source to their server so they can do ML on it. That seems like a bigger issue than the registration or not to be honest.

Maybe just run a local Vicuna instance and copy-paste code with requests for Vicuna to comment it? I do that with GPT and it seems to work quite well. Less convenient than what you're saying but maybe serviceable?

[–] [email protected] 2 points 11 months ago

I will give it a try. Thanks for sharing

[–] marsara9 4 points 11 months ago

Not saying a tool like this isn't helpful for you but personally I don't think I'd ever trust a service to analyze my code and provide accurate comments. There's so many little quirks and ultimately nuance in what is written vs what and why it's doing it that I'd never expect anyone but the original author of the code to get it right.

[–] [email protected] 2 points 11 months ago (1 children)

RE your edit: I also support that conclusion and I’m glad you’ll give it a shot yourself. A mindset that helps me is this: commenting is part of the iterative code writing process. When I’m struggling to put a concise and understandable comment above some code, it almost universally means that there’s something about the code itself I should arrange more clearly. This is your chance to do some rubber ducking, it’s valuable to both you and the next person to read your code!

[–] [email protected] 1 points 11 months ago

This is gold advice. Thank you.