My development setup

Since this has been helpful to many colleagues, I thought I would put together my development setup and especially include a small how-to on setting up PyCharm with remote support.

Hardware:

  • SurfaceBook laptop on a stand
  • 2 external 24″ monitors
  • Kinesis Freestyle2 split keyboard
  • wireless mouse
  • external webcam
  • wireless headset
  • SurfaceDock to bring it all together with minimal daily cable management

Software:

PyCharm remote setup

I have found the remote support of PyCharm to be extremely helpful. It is only available in the professional version, but you get it for free if you’re a student.

The pros are extremely appealing: You can run everything on a remote server while the development experience feels as if it were local. PyCharm takes care of uploading changes, running the remote interpreter (even in debug mode), and displaying figures directly in the IDE.

Follow these steps to setup PyCharm in the same way:

  1. open File > Settings, navigate to Project > Python interpreter
  2. On the right side of the “Python Interpreter” line, click the gear icon and click “Add…”
  3. select “SSH Interpreter” and create a new server configuration. Enter the host and your username, click next
  4. Enter your password or private key, click Next
  5. Enter the path to the remote interpreter. I use a local miniconda installation, so for me the path is something like /braintree/home/user/miniconda3/bin/python.
  6. On the same screen, click the Folder icon to the right of “Sync folders” and input where you want your local files synced. Click Finish

That’s it! You can now program as usual in your IDE and files will automatically be transferred to the remote host. When you run/debug things, they will automatically run on the remote host.

Advanced tips

  • Running fig.show() with a matplotlib figure will show it directly in the IDE
  • For multiple attached projects, you can go to Settings > Build, Execution, Deployment > Deployment > (in view) Mappings to setup the local/remote path pairs
  • Make sure to use the integrated Version Control tools. If they don’t show up automatically, check that the directory is recognized under version control in Settings > Version Control
  • Use auto-formatting! PyCharm can automatically reformat your code according to a specific (or default) code style
  • Use hotkeys! They make it much quicker to accept suggestions, auto-format, run, step into etc. (I use the Eclipse keymap out of habit)