How I Set Up My Mac Development Machine

Originally published at: http://www.sitepoint.com/set-mac-development-machine/

Two recent articles here on SitePoint talked about how people set up their development environments. Zack Wallace talked about setting up a Windows development environment, and Shaumik Daityari talked about his experience working with Ubuntu Linux.

In this article, I want to talk about how I set up a development environment on Mac OS X. But first, a little bit of background.

I’m a freelance software developer and technical writer. Given that, I need a wide variety of tools on a regular basis, whether they’re for software development, research, writing or experimentation.

It definitely is demanding having to cover everything from managing code, accessing remote servers and managing databases to writing and reviewing content. However, the great thing about the Mac is that there are so many tools available for it.

The Basic Tools

New Macs come with the iWork suite, Safari, Preview and The Unarchiver, amongst a range of other GUI tools. On the command line, they come with various open source tools, such as SSH, Wget, and cURL. However, these alone aren’t enough. To do proper web development, and technical writing, we need a number of others. Specifically, I regularly use a combination of the following:

These tools are pretty much indispensable on a day-to-day basis.

Dropbox and Google Drive allow me to share files with clients. I could use the in-browser versions, but installing the apps makes syncing even simpler.

And no web development environment would be complete without all of the modern browsers. As Internet Explorer isn’t supported on the Mac, like Zack, I use a range of tools – such as BrowserStack – for testing sites in IE.

Pixelmator and Skitch make it simple to edit and make annotations to images. Pixelmator isn’t free, but isn’t that expensive either. You could use GIMP instead, but I find its interface leaves a lot to be desired.

For making and storing notes, I use Evernote. It’s definitely got that space nailed. And all I need for project management is Wunderlist. With it, I can stay on top of all the work I have to do for each client, as well as keep notes about conversations we’ve had and what I still have to do.

The Editors

But now let’s get in to the more serious stuff: editing. I do two types of editing – content and code – so my discussion of editors will reflect that. Regardless of which one you’re doing, there are several very good editors available for the Mac.

When I write, I write in Markdown format. It lets you write structured content in any text editor, without the need for special software (such as Microsoft Word) which can leave you at the behest of one vendor or another. Using tools such as Pandoc, you can export your content to nearly any other file format.

Writing Apps

For writing in Markdown, there are several great native apps available, including MacDown, iA Writer and Writer Pro and Mou. Heck, you could even use TextEdit, though it’s not really well suited to the task. In addition, there are various online Markdown editors, including Gingko, Draft and Bruno Škvorc’s favorite, StackEdit.

I’ve tried and can vouch for all of these, though I don’t use them on a regular basis. For me, the best tool to use is Vim, ideally MacVim. It does take a little bit longer to set up and configure. But once done, it’s amazing. What’s more – it’s free. If you’re keen, or struggling, checkout my Vim configuration repository on GitHub.

Continue reading this article on SitePoint

Nice article. Thanks for sharing. I tend to use more open source tools myself, but really enjoy Sublime Text as well.

Thanks for your feedback @jeb_baxley. I do, for the most part myself. But I like a mix of whatever works best for me, or whatever combination I feel most comfortable and productive with. What other tools do you use?

I do more than just dev work. I also do sys admin work. So a lot of the tools that I use are for that as well.

For a VM I like virtualbox - it’s simple enough and does what I need from it

I use VIM on the cli and SublimeText for working on anything that involves text - be it coding or configuring a system.

For version control, git is awesome. I like to use the gui from github on the mac - as it just makes it easier to deal with. I have setup a gitlab repo at work for and on that I use the cmli with the .ssh/config setup to make it easier.

I did like Evernote - but started to worry about what I put in there. So I stopped using it and moved to Zimwiki for my documentation. I don’t really have a notes workflow at the moment. Right now, I’m using a cron job to sync my zimwiki files back to a gitlab installation for backup and version control.

For databases, I usually cli it - but have used workbench from mysql. On my mac, i use Sequel Pro - it’s fantastic.

1 Like

You have a similar set-up to me.

  • PHPStorm
  • TexWrangler
  • Adobe Creative Suite
  • Vagrant
  • MySQL Workbench
  • SourcreTree
  • Hangouts
  • Microsoft Office

Using markdown instead of word sounds interesting but also a pain in the arse. I might explore that some. Also, looking into something better than TextWrangler

I kept my focus primarily to dev work, as that, and technical writing, is what I do the most. But thanks for mentioning the sys admin aspect; which I overlooked. I’d love to code more with VIM, in contrast, I find that for manipulating text, VIM is second to none.

I know what you mean about Evernote. I think they’re ok, but the question sits at the back of your mind, whether you can really trust all of your data to one location. Have you tried Paperwork?

I used to use the GitHub gui, but didn’t use it for long. Gitlab, though I’ve not used it much, is pretty damn good. Thanks again for sharing. Always helpful to know how other people work, and about other tools

Hi @oddz, thanks for your feedback. I’m not much of a designer, so don’t use the Adobe suite much. I can’t recommend VIM enough for manipulating any kind of text. But I must say, it definitely has an initially steep learning curve. There’s a range of Markdown editors, each with varying pros and cons. If you get hooked on the format, there’s no going back. It, along with Pandoc, is just so flexible.

Quite similar to my setup, I just want to give a thumbs up for Coda. As you, I use PhpStorm, but for HTML and CSS, Coda is where I go. Also, Sequel Pro is on my list. If there are someone out there dabbling in MySQL, seriously give Sequel Pro a try. Awesome program.

That’s… that’s so much work. Why not just run a few scripts? The terminal is your friend!

http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac

Also, if you’re using vim for MarkDown, why not use it for everything? It can do everything and more that any other standalone editor can do.

And since you’re already in the terminal, why bother leaving to use GitK? Just use git right there in the terminal. Hell, install the fugitive vim plugin and use git right from within Vim! And while we’re at it, might as well use the terminal to browse your databases as well. No point in opening up some GUI there, either.

Point is, CLI EVERYTHING FOREVER. Except your browser and photo editors. CLI is rubbish at that.

One reason to use vagrant instead of running php and apache on the same machine is to run multiple versions of php. Another would be installing stuff on a Linux machine is always so much easier. Not to mention you’re not clobbering your host machine with dev software installs that could potentially be destructive to the os. I also work on a variety of projects using different versions of software not just php. It is much easier to manage different projects on dedicated vm than it is on a single host machine because upgrading anything has the potential to affect all projects on the machine. With dedicated vm so long as the project is on a different vm installing and/ or upgrading libraries and extensions will have no impact to projects hosted on a different vm.

For me it’s:

Sublime Text 3 for IDE
SourceTree for Git stuff
Sequel Pro for MySQL
Transmit for FTP
Raindrop for Bookmarking
Slicy for slicing images
imageOptim & imageAlpha & JPEGMini for image optimization

You can just use a php version manger like php-version, phpbrew, or phpenv – just like you would managing ruby versions with rvm. Granted, I’ve been meaning to check out vagrant to see how it could improve my workflow, but I, for one, like having my machine be my server. For one, I have a dedicated IP (or you could just use dyndns) so I can easily SSH into my home dev machine from anywhere, make changes, and see them reflected on the web. I’m not sure if this sort of flexibility is available with a virtual machine solution.

My set-up is pretty similar, by-and-large. But two honourable mentions;

iTerm2 is a really good, drop-in replacement for Terminal; great if you work on the command-line a lot, as I do.

And the app - well, strictly speaking it’s a Chrome packaged app - I find myself using almost as much as my trusty editors is Postman. Perfect for testing API’s, as well as debugging HTTP requests.

Both are free, which is nice.

Lukas, thanks for sharing. iTerm2 and Postman. I don’t know how I overlooked these two. Postman is something, in my current project, I can’t live without. It’s a great app, definitely worth using. I’m not as experienced with iTerm2; but should also give an honourable mention to screen and Terminator; Though I’ve never gotten Terminator working properly on OS X; yet.

Ben, thanks for your input. I used to use Transmit a bit, and definitely found it a well polished application. I’ve not used Raindrop or Slicy, but will definitely check them out. imageOptim I can’t speak of more highly. Great app, does a great job and painless to use.

John, thanks for the link - what a wealth of information. I’m coming up to reinstalling my Mac, to see if it gives me a speed boost and drive space saving. I’ll definitely be checking out those scripts. I’d heard of it a while ago, but never put time in to investigating it fully. I love the CLI, but a good GUI, depending on what it’s meant to do, still has a place. WRT browsers, I believe there’s a vim browser, believe it or not.

I’m still a bit mixed on installing dev tools in OS X versus just using a VirtualBox or Vagrant VM. Sometimes it feels much cleaner, more efficient and organised to keep everything dev-related in a VM. Thanks for the links to php-version, phpbrew etc. rvm is great, so if these tools can do the same for PHP, I’m up for giving them a try.

Nice! You forgot to mention:

Both have become a vital part of my development workflow.

I really like the idea of a single management console for all the different databases, but I can’t find the Navicat Lite download. Do you just sign up for a trial and never upgrade?

Just a little direction would help. Thanks

The trial period is limited. See the online link.