MWD02 – Get the MAC workstation ready

Continuing this series about Modern Web Development!
As a non Microsoft Developer working on a Mac, you need to get yourself a few productivity tools which unfortunately are not all available out of the box on your Macbook or iMac.
STEP 1 – Starting with a few Mac OS X enhancements
Total Finder Features
The Finder: Even with the latest OS X 9 Mavericks update, the Finder still has some shortcomings, and in particular still lacks the ability to quickly switch display of hidden system files. My recommended solution for that is to switch to TotalFinder  that is US$15 well invested for your productivity. And it’s more lightweight and stable than the very ambitious Pathfinder (US$39)
Total Terminal
The Terminal: The native Mac terminal is OK, but not always easy to summon in context. To improve usability in that space, I have taken 2 actions: First, I have downloaded the excellent and free TotalTerminal utility from the same BinaryAge company publishing Total Finder. With its Visor feature, you can always summon the Terminal in context using CTRL+~, very handy. And secondly, I am leveraging the new service available in Mavericks which allows to open a “new Terminal tab at Folder”, as per instructions found here. Right-click any folder, select Services>Open Terminal, and here you go. A true game changer.
Textmate 2
Textmate 2A decent Text Editor: Textedit is definitely outdated, and I wonder when will Apple decide to give it a bit of attention span! In the meantime, the modern developer will invest in a Sublime Text or Textmate 2 license. My preference goes to the latter which has a much more comprehensive syntax library.
Other CLI developer tools:
Mac OS X native tools: First we need Mac native tools, which are not installed by default but usually come with Xcode. If you are not planning to develop Mac or iOS apps and do not need Xcode just yet, these tools can simply be installed by using the following command in Terminal: $ xcode-select —install or even simply $ gcc
This will trigger a dependency pop-up indicating that Xcode requires the CLI developer tools and offering to install them: Just click install and wait for 30min.
CLI Developers Tools
Java: Java is an important language, and unfortunately it is not available natively anymore in the latest releases of Mac OS X.
The current Java version recommended by Apple is 1.6 and it can be downloaded here.
If for some reason you need to work on Java 1.7, visit the official Java website, at your own risk:
Ruby and Python: Ruby and Python, two immensely popular object-oriented scripting languages, have been installed as part of OS X for many years now. But their relevance to software development, and especially application development, has assumed an even greater importance since OS X v10.5. And as a modern developer, in particular in the PHP space, you are likely to use Ruby scripts for automation and deploy on, with Composer, Capistrano and Chef for instance.
Ruby with HomebrewHomebrew  s a package manager for Mac and it helps installing additional services and utilities, that Apple didn’t, in an organised manner, managing symlinks into the /usr/local folder. Just like CHEF consumes recipes written in Ruby forserver provisioning, Homebrew consumes Ruby-written formulas to install software packages on your Mac.
To install Homebrew (Note a dependency on XQuartz)
$ brew doctor
To install Ruby with Homebrew:
$ brew install ruby
To manage the different versions of Ruby you may have on your system, use RVM:
$ \curl -sSL https://get.rvm.io | bash -s — –autolibs=read-fail
PHP Storm
STEP 2: Get a good IDE
PHP StormThere are several options on Mac and I can mention here the well know Eclipse (All languages), Coda 2(PHP), Netbeans (Java, PHP, C++) or Aptana Studio (PHP, …)
But my preference now clearly goes for the great and consistent suite of IDEs offered by JetBrains for the different languages:
  • IntelliJ for Java
  • PHPStorm for PHP => That’s the one I am mostly using (US$99 for a personal license)
  • Web Storm for general purpose HTML/CSS development
  • PyCharm for Python
  • Rubymine for Ruby
  • Appcode for iOS development
Atlassian Sourcetree
STEP 3: Source control with GIT
GIT is essential and mandatory, and what you need is the holy trinity: The command line on your workstation, a repository storage service, and a GUI client.
Mac OS X 10.9 comes with GIT 1.8.5 bundled, which is not the most recent version.
To upgrade GIT on Mac, the official GIT site proposes an installer.
Another option is to use Homebrew, with:
$ brew update
$ brew install git
This will get you the latest GIT, version 1.9.2 as I write these lines.
.
Source TreeIn terms of GUI, I enthusiastically recommend Atlassian Sourcetree, which by the way will come with its own version of GIT bundled in, for self-consistency purposes. (GIT 1.8.4 for Sourcetree 1.8.1). The desktop client for Mac proposed by Github is also a decent one.
.
Lastly, make sure you have an account on Github, offering public repositories only for the free account. For this reason, I urge everyone to consider Atlassian Bitbucket, which offers free accounts with illimited private repositories for teams of up to 5 members: It can’t get any better!
.
TransmitSTEP 4: Other essential network utilities
.
For FTP/SFTP and S3 access, I have found nothing better than Transmit 4 from Panic Software (US$34).
If you are after a completely free software though, you’d would fall back to Cyberduck 4. And finally, Filezilla has now enjoyed a decent port for Mac, but unfortunately lacks S3 support.
.
NavicatFor database connectivity, the “ned plus ultra” solution is Navicat  which offers connectivity to MySQL, PostgreSQL, Oracle, MS SQL Server, SQL Lite, MariaDB. Choose the Essential edition for US$16 only, or go pro with Navicat Premium ($239).
If you use exclusively MySQL, then Sequel Pro is the perfect and free solution. Likewise for PostgreSQL, simply use the Postgres.App.
.
.
Charles ProxyAlso, you need a web debugging proxy and the obvious choice here is Charles 3.9 (US$50).
Interesting to note though that Telerik is currently porting the remarkable Fiddler to Linux and Mac (Apha release).
.
STEP 5: Virtualisation software
First and foremost, I would strongly advise against setting up localk xAMP suites, such as MAMP and XAMP for Mac. It may look handy at first glance to run your Apache and MySQL servers locally, but it quickly becomes a pain in the back with compatibility issues, when you start using PHP and Apache extensions. Very messy and inaccurate.
.
Virtual BoxAccording to the idea that there is “nothing like the real stuff”, I urge any serious developer to work with locally virtualised environments replicating LIVE destination environments, whatever the operating system.
The best choice is to use Oracle Virtual Box, free and well supported.
Now you can manually install any of your favourite OS, and set your code folders as shared mount points.
.
VagrantBut the latest delightful trick to do so is to use Vagrant to flick up an environment in 1 command line and no time:
Download Vagrant for your system, and then in the terminal simply VargrantUP! You can select an image on Vagrant Cloud: https://vagrantcloud.com/discover/featured
$ cd /~/my_dev_folder // Putting yourself in the folder you intend to store your web app
$ vagrant init hashicorp/precise64  // Installing a standard Ubuntu 12.04 LTS 64bits box
$ vagrant up
$ vagrant ssh // You are logged in!
In just a few minutes, you are logged into your VM and can start setting up the services you need fort your app, starting with Apache, MySQL, PHP and more.
Advertisements

2 thoughts on “MWD02 – Get the MAC workstation ready

  1. Pingback: MWD01 – Embracing the evolving digital world | Digital Content Manager

  2. Pingback: MWD03 – Provisioning a local development stack | Digital Content Manager

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s