Why a Program Editor
There are almost as many program editors written as there are programmers. All have their adherents, some of whom defend their choices with religious zeal. So, granting everyone their right to their own opinions, I will here suggest that the Atom program editor (atom.io) is an excellent choice for a beginning programmer to install on a Mac.
Why do you even need a program editor? You probably already have Word or Pages, so why not use them? The simple answer is that they embed lots of formatting codes into every file that you write, codes that program compilers or interpreters don’t understand. So you need an editor that simply stores the exact keys that you type into your file — nothing more and nothing less.
You could use TextEdit for this. Apple’s long-time text editor is as simple and straightforward as they come and will indeed produce text files containing nothing but what you type.
More sophisticated program editors, however, add lots of features that help with the programming process, including
- File managers
- Terminal windows
- Syntax highlighting
- Collaboration tools
- Git and GitHub integration
and many more features that can leave your head spinning. Some are free, while others are fairly expensive.
Atom is an open-source editor that offers many if not all of these features through a series of add-ons, So you can start with a fairly simple approach and then, as your level of sophistication increases, it can step up and offer all the features you will likely need.
Installing Atom
Installing it is simple. In your browser, navigate to atom.io. Click the big yellow Download button to get the latest Mac version (1.27.2 at this time). That will download atom-mac.zip to your computer.
Double click that file in Finder (it is probably in Downloads) and wait while your computer unzips the application. Then move the app, Atom, from Downloads to Applications. It is now installed. The atom.io site has lots of information about Atom, including many, many add-ons. The documentation section includes a link to a getting started video that may be of some help.
Run Atom like any other program, i.e., double-click it in Applications in Finder, but make sure you then right-click its icon in Dock and select “Keep in Dock” in Options. You will be using it a lot, so this makes it easier to find.
Now that it is running, take a look at its layout. The sidebar on the left is a file manager. You can focus it on a particular folder (a project) to see only the files for that project. Use a project for a course or for development of a particular program.
The main screen is a tabbed display. You probably have two tabs: Welcome and Welcome Guide. Leave those in place until you are comfortable working with Atom. They have useful shortcuts to some of its features.
Addons
I suggest that you install a few simple add-ons now. In the Welcome Guide, click “Install a Package” then Open Installer. This opens Setup in its own tab. Look down Featured Packages for add-ons to install.
- atom-clock – Click install on the atom-clock entry. This will install a nice little clock in the bottom status bar. You can customize it to display dates, times, 24-hour or AM/PM, etc. That’s just an example of a nice little add-on.
- PlatformIO IDE Terminal – A bigger add-on is the PlatformIO IDE Terminal which lets you run a terminal inside atom. While still in the Install Packages area, copy the text “PlatformIO IDE Terminal” (no quotes) into the package search line and hit Return. Atom will find the package — you should click the install button. After it’s installed, open a terminal window by clicking the plus sign in the left end of the bottom status bar. Now you have a terminal window that is part of your Atom setup.
- Atom wrap in tag – this handy package wraps a tag around selected text. Search for it, install it and you are ready to go. Select some text you want to wrap with, say an H1 tag, the type Opt-Shift-W and H1. Your text is now wrapped in an H1 open and close.
Themes
Something you can play with at your leisure are themes. Do you like light text on a dark grey background? Or dark on white? Or what colors for syntax highlighting? All these are controlled with themes, a few of which come with the basic install, but hundreds of more are available through Atom’s website.
Project Environment
This is about how to organize the files you will generate as you learn Python. My suggestion is that you create a folder named Python inside your Dropbox folder. Then create a folder inside Python for each project you will work on, e.g., one for a python tutorial, another for a python course. As time goes by and you become involved with python development projects, each of them should be given their own folder.
Then, use Atom’s project facility to show these projects and their files in the file manager area in the left sidebar. That will facilitate navigating to where your files are stored.