Back to the eddyloewen.com homepage

Setting up a new MacBook for development

In December 2017 I had the chance to setup a Mac completely from scratch (for the first time ever & while knowing what I was doing). The MacBook Pro Retina 2016 with TouchBar is only my second Mac altogether. Before that I had a MacBook Air from 2013 which I had arranged and configured over the years. Although it didn’t feel slow it kind of felt that I had peppered it with rubbish over the years while following tutorials and stackoverflow posts when installing tools, apps, libraries etc.

This time it had to be done right. I would have to work with the new machine from the first day with all the necessary tools I had before. In this post I would like to list everything I have installed, everything I use now and everything I referenced while configuring it. Maybe it can help someone else - at least it will be a guide for my next switch.

Preparations

Before booting up the new machine I took some time to go over everything on the old MacBook and make a list of everything I had on it.

  • Apps
  • Tools
  • Important directories (files, media, documents, code, fonts etc.)
  • Plugins
  • Libraries

This would turn into a todo list for the new Mac that I could work off.

Step by step

After booting up the new MacBook for the first time - which is always a great feeling :) I immediately did the following two things:

  1. Update MacOS to the latest version with all software updates
  2. Install homebrew (https://brew.sh/)

Before going any further I did a quick internet search for any guides and tutorials for setting up a new Mac. The best that I found was a really extensive guide by Sourabh Bajaj (http://sourabhbajaj.com/mac-setup/) that had almost everything in it that I would need for my work.

System preferences

Here are some things I changed from the original settings:

  • Enable tapping to click on the trackpad
  • Automatically hiding and showing the dock
  • Remove everything from the dock I don’t need
  • Add percentage to battery icon in the menu bar
  • Create a /code folder and add it to the sidebar in Finder
  • Install Xcode command line tools

App shortcuts

I like to use the same shortcuts across as many apps as possible.

For being able to use shift + command + 7(/) for commenting out lines or blocks I had to disable the “Show help menu” shortcut that was set for all applications. This might only be the case for the german keyboard layout.

I also like to change the “pasting” behaviour for all applications.

  • Paste -> command + V
  • Paste and Match Style -> command + shift + V

Another thing that I would always configure is switching tabs:

  • Show Previous Tab -> option + command + left
  • Show Next Tab -> option + command + right

System tools

The following tools were installed via homebrew:

  • zsh (and configure it as default bash)
  • node, npm and yarn
  • php 7
  • mariadb
  • composer
  • cocoapods
  • vagrant
  • git
  • python
  • ruby && rbenv
  • ruby gems (breakpoint, compass, sass)

Java

Besides the above tools I also checked the Java version and installed the latest. Alongside with that I copied over all settings from the ~/.m2 folder for working with maven projects.

PHP

I mostly use Laraval when working with php. For serving php projects locally I use laravel valet which can be installed via composer globally. For older projects that still use a php version below 7 I have laravel homestead with php version 5.6.

ssh Key

When working with version control or remote servers you will most likely need a ssh key. On my old macbook I had generated the key without a password. This time I went for the password protected version. I’m still not sure if it was the correct choice - it makes you type in your ssh key password every time you use it - which kind of destroys the whole purpose of it. I’ll probably omit the password on my next machine.

System configs

After installing the system tools I could move over some configurations from the old MacBook.

There are a few tools that I can’t live without. Most of them are little helpers that sit in the menu bar and are triggered via shortcuts.

  • Moon Window manager
  • Bartender
  • Little Snitch
  • Flux
  • Caffeine
  • Alfred with Powerpack

Another two that are nice to have:

  • Usage
  • HazeOver

Files

When it comes to organising files - I have a few things worked out to make my life easier and my workflow faster.

Code

I have a /code folder in my user directory that hosts all things related to code. It doesn’t necessarily need to be backup’d because most of the projects are under version control. But it is still nice to have a single folder that you can just copy to an usb drive and move it to a new machine.

Dropbox

I use Dropbox for anything that is not code related. Images, Media, Documents - everything that is work related or private files goes in there. I have never lost any file again since using the service. It syncs between devices and lets me restore everything on a new machine simply by installing the app.

Screenshots

I very often use screenshots to share things or explain things to other people. Dropbox has this incredible (almost hidden) feature to share screenshots using the app. When enabled it will listen for screenshots that are taken on your Mac and move them to the /screenshots folder in your dropbox. Not only will it clean up your desktop automatically - but also generate a link for the image to be shared instantly and copy it to your clipboard. I also drag that screenshot folder into the dock for quickly being able to grab images out of there and share or paste them into other apps.

Fonts

I used to use Fira Code or Source Code Pro as my code editor fonts. Nowadays I switched to Operator Mono and couldn’t be happier with it.

Configs and backups

I have a folder in my dropbox where I store every backup or configuration file for any app or plugin etc. Especially before switching to my new Mac - I exported all settings for every app that had some and used those when setting up the apps on the new machine.

Apps

I really like the AppStore when it comes to installing apps on a new machine. It’s just one click and you’re done! So I try to use apps from there when ever possible. Either way here is a list of mostly all the apps that I currently use:

  • Chrome & Chrome Canary
  • Firefox & Firefox Developer Edition
  • Dropbox
  • 1Password
  • Spark (Mail)
  • Fantastical (Calendar)
  • MoneyMoney (Banking)
  • IntelliJ (IDEA, PHPStorm, WebStorm)
  • Android Studio & Android Studio Preview
  • Sublime Text
  • Tower (GUI for git)
  • AppCleaner
  • Sequel Pro
  • ImageOptim
  • OmniDiskSweeper
  • VirtualBox
  • VagrantManager
  • Transmit
  • Postman
  • Skype
  • Rambox
  • Microsoft Office
  • Bear (for Notes)

Misc

There where two things left on the migration todo list.

For some reason I wanted to migrate my documents from Dropbox to Microsofts OneDrive. I’m not even sure why that was. Maybe because I get a lot more space for free along with the Office 365 subscription. But since the integration between Dropbox and the Office Apps has become very good and I still have enough storage on my free account (around 25GB) I never felt the urge to actually do it.

The other thing was my photos library. On the old MacBook Air I did not have enough space on the ssd to store it so I bought one of these sd card drives and moved the library onto it. The initial plan was to move it into some cloud (maybe also OneDrive) but since the new MacBook got the 1TB ssd I have enough space to store anything so far.

Wrapping Up

After almost one and a half year I’m still completely happy with my initial setup for my new Mac. It doesn’t feel bloated or filled with rubbish at all. I’m probably going to get a new Mac by the end of 2019 - If nothing changes until then, I will be using this post as a reference for setting up the new machine.

Hopefully a MacBook without a TouchBar… ;)