Cleaner code
Developers, in their attempts at slinging code, do not always take the time to consistently space lines of code. Nor do developers always go back and remove unused declarations and variables. Code that is riddled with spelling errors, inconsistent indentations, or unusual placement of curly braces leaves the impression of sloppiness. Thankfully, our tooling provides a few features that help us keep things clean and maintain a professional image.
Code Formatting
Code Formatting and Code Cleanup are a couple of Visual Studio features you should use frequently. While the implementation differs slightly across the various flavors of the Visual Studio IDEs, all offerings have some form of these features that are useful to know and very simple to use.
The following figure depicts a very simple before and after picture of code that demonstrates how Visual Studio Code fixes some indentations and curly brace placement: