This content originally appeared on DEV Community 👩💻👨💻 and was authored by Alex Omeyer
Chances are, you’re not the only person working on your codebase. This means that your code should make sense to both you and your team members. That’s why Engineers need to write good code comments.
However, writing code comments shouldn’t be a drain on your time, it also shouldn’t clog up your code with gibberish comments that no one looks at.
So let’s take a look at the top extensions that can help you transform your code comment game:
Wait what, I thought Copilot wrote code based on public code?
That’s right, but it also autocompletes comments you write by looking at the code you/it wrote. Check out the example below, where Copilot has suggested the rest of my code comment by looking at my code.
Copilot can do this as it’s been trained on billions of lines of public code and comments, we’re just one step away from full Skynet functionality!
2. Stepsize
Stepsize not only makes it easy to write code comments but it also turns them into organised issues that sync with your issue tracker.
The issues are displayed in your codebase through annotations, when you hover or click on them, a detailed view pops up with the author, description and linked code.
You can link several pieces of code to one issue (even from other files!) making it 10x times easier to explain what's going on in your code!
3. GitLens
While Gitlens might not help you write better code comments, it does help you track down who wrote the code you’re struggling with, so that you can ask them to add the comment.
It does this by displaying an annotation at the end of the current line which shows the author name and time stamp.
Then all you have to do is ping the owner and ask them to add a comment.
New Relic CodeStream is a developer collaboration platform for code discussions and reviews.
It allows you to discuss code and request feedback through “comments”. In these comments, code authors are auto-tagged based on git blame info, conversation threads are tied to code locations across branches and it integrates with Slack, Teams and email.
This content originally appeared on DEV Community 👩💻👨💻 and was authored by Alex Omeyer
Alex Omeyer | Sciencx (2022-09-12T15:52:35+00:00) 4 must-have VS Code extensions to write better code comments. Retrieved from https://www.scien.cx/2022/09/12/4-must-have-vs-code-extensions-to-write-better-code-comments/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.