Maybe it’s because when I started coding I typed into editplus which was a glorified text editor with some syntax highlighting; but for whatever reason I have always avoided heavy IDE’s and linters…
Maybe I’m just bad at taking criticism 🙂
What’s a linter anyway
A linter is software that analyzes code and tells you how you are doing it wrong.
Linters reports stylistic errors, suspicious constructs, design flaws, bugs, and even code patterns that are known to be dangerous.
You can see from the image above that I have a variable named visibility that is not being used. Hardly a show stopper but something that I would want to clean up.
The linter this example uses is called pylint. Pylint can be used as a stand-alone program, but also integrates with IDEs such as Visual Studio Code. More on VSC in a minute, but while there are other linters (such as Pychecker and Pyflakes) I like Pylint the best.
Pylint is fully configurable and customizable. PEP 8 is where is all starts, but if I go past the character line limit by a few characters I don’t really want to waste my valuable time to “fix” it. But that’s just me; you probably have your own quirks and can make Pylint work the way you want it to work.
In my world another point in Pylints favor is how seamlessly it integrates in Visual Studio Code…
#VSC ( #VisualStudioCode ) is really good y’all.
I wonder if StackOverflow has noticed the drop in page views since I installed VSC?
As you can see from the image above the context sensitive help IntelliSense is fantastic. I’ve used it more than I have any other interactive help system that I have ever tried. And I’ve tried a few…
Yes, VSC comes from Microsoft but its:
- Built on open source.
- Runs everywhere.
Even if, like me, you are not a fan Microsoft in general you have to admit that they have been doing allot of great Python related stuff. While VSC is not a Python specific IDE Python is well supported in VSC – and obviously the only language we care about.
Visual Studio Code is not Visual Studio IDE. It is much more a streamlined code editor rather than a full blown Integrated Development Environment; but it hits a sweet spot between bare bones editors and IDE’s.
It’s not perfect. It has a couple of design / implementation things that took me a while to get used to, and it has some weird issue with my Anaconda created virtual environments.
If you are really interested in using the best tool for the job of writing Python, regardless of platform, VSC is worth at least a trial run.