Wednesday, June 12, 2024

What is a Linter in the Python programming language?

 This sort of "Spell check" I can see would be quite useful. Why? Because in the old days (1960s) this sort of thing didn't exist really at all (as far as I could see). they might have had something like this at NASA to filter bad code from good code but most of the time in College we had to figure out what was wrong with our programs all by ourselves. This was why we started to learn Flow charting our programs before we wrote them as a way of being more effective and efficient at writing code that was useful.

One of the main things we learned then was "Garbage In Garbage Out" which meant that if your program isn't any good it isn't going to work or at least it isn't going to do what you intended it to do (one of the two).

begin partial quote from:

https://www.khanacademy.org/computing/intro-to-python-fundamentals/x5279a44ae0ab15d6:computational-thinking-with-variables/x5279a44ae0ab15d6:the-programming-platform/a/using-the-development-environment

Linter

A linter is like Python spell check. If we type something it doesn't recognize as valid Python syntax, it'll underline it and pop up a symbol in the left sidebar. If we hover over that symbol, it'll show a message explaining the issue.
Notice that there are two types of symbols: a red circle means error and a yellow triangle means warning. Errors mean our program is broken or invalid. Warnings help us write programs with good style and clarity, like a writing assistant. They'll warn us of things like, "Hey, this is an odd place to put this," or, "Hey, this line is really long and hard to read."

Autocomplete

No comments: