Good Code Editors for Scientists
In coding tutorials, you may have heard the term “text editor.” Supposedly, you should write all of your code in one of these “text editors.” This may have led you to ask: “Like Microsoft Word? Google Docs??”
Almost. Text editors are like Word files but simpler and specifically for code.
Why Can’t I Use Word or Google Docs?
When you write in Word or Google Docs, it adds a bunch of formatting data behind the scenes. The Word doc contains weird indents and typefaces and paragraph formatting — all things that would confuse a code interpreter when we try to run our code.
Indents aren’t bad per se, but they should only be there when we intentionally put them there.
# Python code requires indents
def cool_function():
a = 123
b = 456
print("These indents are good!")
What text editors do is make sure only the exact things that we type end up in the code. No underlines or bold characters or Times New Roman. Just code.
As a bonus, they highlight your code with different colors to differentiate variables, strings, classes, and more.