So you want to start following examples you’ve found online or in a book to learn more about your chosen language from part 2. Which editors should you consider to start knocking up some super useful scripts? Part 3 looks at three broad categories, giving some suggestions along the way.
Keep it simple
Start with the tools built in to your OS. With Windows, that would be Notepad. With Linux, Vim. Vim comes with syntax highlighting so can make your scripts far more readable. Notepad on Windows is extremely basic and offers only the most basic features (cursor location, find/replace) and so is not really recommended for longer term use. If you like Vim (yes, they do exist), then fair play. Otherwise, time to consider something with more power under the hood.
Text editor on steroids
There are loads of options to consider here. However, the theme of this series is ‘quick start’ so I’ll get straight down to two great options.
Notepad++ is my preferred Windows editor. It offers language syntax highlighting, tabbed windows, various encoding options and host of plugins that can make your life easier e.g. Compare, that lets you see different scripts side by side and highlights any differences.
Sublime Text is another superb editor that I’ve played with and am considering making the switch to. It’s cross platform (Windows, Linux, Mac), has an API and works well with larger projects where you will have multiple files all related to each other.
If the two editors in the previous section leave you wanting more, then firstly good for you! Beyond, you have the option of an IDE, or Integrated Development Environment. In addition to the tools mentioned above, you get additional tools such as debuggers, version control tools (e.g. working directly with Git, SVN, Github), syntax checking and completion (in addition to just highlighting). Once you start getting in to more complex projects beyond single file scripts, you will find an IDE invaluable for managing your workflow.
In addition to syntax highlighting, a good IDE will tell you if your code is PEP8 compliant, the official Python style guide.
The best example for Python I can recommend is Pycharm from Jet Brains. There is a commercial professional edition but also two free editions, community and education. I’ve used both and, having gone through all of the lessons included in the educational version, prefer to use the community edition.
Having an editing tool you feel comfortable with to create and tweak your scripts and larger projects is very important but don’t get bogged down in the wide array of choices. Work your way ‘up’ the options above until you get something that meets your needs. In part 4, we’ll look at additional tools to make your coding experience more enjoyable.
Till the next time.