In this Lightning Bits episode, William and Sebastian discuss how to get started using Integrated Development Environments (IDEs). Watch the video, or continue reading below.
Interactive/Integrated Developer Environment (IDE)
It’s 2022. There are lots of different tools available that make your life as a programmer, engineer, and researcher more convenient. This episode is focused on PyCharm, which is one of the most widely used IDEs for Python.
What is an IDE? IDE is short for integrated developer environment (sometimes also called “interactive” developer environment as Sebastian mentioned in the video). You can think of it as a text editor that is spring-loaded with lots of extra features that make you more productive. In that sense, it’s both interactive and integrated ;).
PS: While William showcases some of the PyCharm essentials in the video, Sebastian is more of a VSCode user. However, while recording the episode and setting up a new computer, Sebastian realized that PyCharm is actually quite nice and convenient. Here are some of his quick takeaways:
- VSCode is a more versatile code editor that can be customized for Python.
- PyCharm really comes with all batteries, especially in relation to Python.
- VSCode can be very powerful as well, but it takes a lot of customization — finding and installing the right plugins.
- With PyCharm, you get all the benefits out of the box.
Consequently, Sebastian is now toying with the idea of making PyCharm his primary Python coding tool.
(Warm-up) New terminal commands
cat myfile: prints the contents of a file named
myfileto the terminal.
open myfile: Open a file named
myfilein a preferred program.
Which program opens which file when running
open depends on the file type and your setup. If you want to change the default program for a specific file type, you can do the following:
- Navigate to the file (or a file with similar file type) in Finder, and right-click on it.
- Hold down the option key and click on “Show Inspector”
- Now, go to “Open with”, select the program from the dropdown menu, and click on “Change All…”
Installing PyCharm is pretty straightforward. Just go to the official website and follow the download link there. Also, we recommend starting with the community edition, which is free. If you like the community version and want some extra features, consider upgrading to the professional edition.
Selecting a Project Interpreter
Once you opened an existing project, or created a new one, you can select your interpreter from the bottom right corner:
Stay tuned for future episodes of Lightning Bits! Also, if you have any questions, please don’t hesitate to reach out on Slack!