DEV Community

Cover image for 4 must-have VS Code extensions to write better code comments
Alex Omeyer
Alex Omeyer

Posted on • Updated on

4 must-have VS Code extensions to write better code comments

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:

1. GitHub Copilot

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.

Image description

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!

Image description

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.

Image description

4. New Relic CodeStream

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.

Image description

Top comments (0)