My Development Setup On OS X Part 1

I do all of my development work on an Mac OS X machine – currently a MacBook Air with a CalDigit Thunderbolt Station 2 dock and external monitor, keyboard and mouse. Most of this work, however, ends up on a server running linux on Digital Ocean or Amazon EC2 or Lambda. The beauty of OS X is of course that it is *nix based, so we can set up an environment that is pretty close to a typical server setup. Going from development to deployment usually just requires some path and URL changes and other minor tweaks.

I’ve done a fair amount of work in getting my OS X environment to be as close as possible to a linux one. I have my own set of best practices for this, along with a few hacks and tricks necessary to get certain things running, so I am going to describe them in this series of posts.

In the near future I’ll be switching from the setup described in this post to a Docker-based one for all of my web projects. but for now this works great. In addition, I also do some embedded systems and other low-level stuff that this setup is ideal for, so here we go!

Technologies

My work is mostly in Python and Django or in PHP and WordPress. The http server is nginx and uWSGI or PHP-FPM as appropriate. The database layer is MariaDB for both. This is a basically a LEMP stack – Linux, nginx (Engine x), MariaDB and Python or PHP.

The front end is HTML and CSS using the Bootstrap framework and jQuery.

I work in other languages (JavaScript, Java, C, Perl, etc.) as well but I’m going to focus on Python and PHP in these posts.

My development machine is running OS X 10.11 El Capitan – most or all of what I’m doing should translate forward and backwards a few versions, but YMMV.

Tools

Editors & IDEs

vi/vim – for quick editing from the command line.

BBEdit – editing files typically not present in IDE projects, e.g. database configuration files, etc. Useful from the command line as well since you can invoke it with “bbedit filename“.

JetBrains IDEs – PyCharm, PhpStorm, WebStorm, Intellij IDEA and DataGrip. I have the paid package, but there are community and trial versions of them available. In a previous job I worked on large Java projects using Eclipse and it was fine, but my productivity level has improved dramatically since switching.

Version Control

Command line git.

GitHub for public projects, GitLab for private ones. I’ve used Bitbucket as well.

Utilities

MacPorts is my friend – I use it to install almost everything that I don’t build myself.

Mac OS X Console.app – great for reading logs.

Mac OS X Stickies – great for a quick reference to commonly used commands and small pieces of information.

Evernote – I use Evernote to keep detailed notes of all of my installation procedures along with copies of configuration files – they’re then synced to my phone and other computers for quick reference and updates anywhere.

Trello – I use Trello to track to-dos and project progress.

In the next post I’ll describe in detail the actual setup, installation and build process for all of this.

Leave a Reply

Your email address will not be published. Required fields are marked *