I was recently working when suddenly my Macbook Pro powered off and would not power back on. A trip to the Apple Store and a few hours later I found myself with a new empty Macbook. Here are the steps I took to go from this state to one optimized for software development.
Install XCode and Command Line Tools
Install XCode via the App Store. You will need the command line tools that comes with it to install several other packages we will be using later on.
Nice to Haves
Disable System Sounds
Deactivate the startup sound and interface sounds so you can work during meetings without constant beeping.
Automatically Hide the Dock
To maximize your screen space, I recommend you set your dock to automatically hide.
Install Communication Tools — Slack, WhatsApp, etc
Install a Password Manager — 1Password
I consider it to be of utmost importance to keep your data and those of your clients/employer safe and this means that passwords and other keys need to be kept securely. This is made easier with a password manager such as 1Password which can be downloaded from the App Store.
Organization — Magnet
As a developer you routinely open multiple windows at the same time and it can be a time saver to be able to quickly position them on the Desktop. A useful tool for this is Magnet which can be installed via the App Store.
Improve the Terminal — Oh My Zsh
The MacOS built-in terminal lacks features that speedup usage such as better history search and shared history across multiple terminal instances. This and many other improvements can be provided by installing Oh My Zsh using the command below:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Install a Package Manager — Homebrew
In order to properly manage the many dependencies you will be installing it is useful to have a package manager such as Homebrew which can be installed by running the command below:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
IDEs — Visual Code
We need an IDE in which we will be coding. Personally, I recommend Visual Code.
Furthermore, I recommend adding the following extensions:
- Live Share works as a collaborative coding environment for live coding.
- Gitlens shows useful information from Git inline.
- Prettier helps format your code automatically.
Authenticate to Git — Github
We need to have quick access to our repos in order to code effectively. Given most developers have 2FA enabled (and should do so) we need to install the Github utility
gh in order to authenticate
brew install gh
gh auth login
and follow the on screen instructions to authenticate via the browser.
Once authenticated, remember to set your Github email and username so you can commit:
git config --global user.email "firstname.lastname@example.org"
git config --global user.name "Your Name"
Install Necessary Dev Dependencies — Rbenv, Cocoapods, etc
Depending on what you will be developing for you will need a different set of packages and support programs. See a few below:
For Ruby Development
Install the ruby version manager rbenv by running:
brew install rbenv ruby-build
Add the following code to the bottom of your
~/.zprofile file so rbenv is automatically enabled whenever you open a terminal window:
eval "$(rbenv init -)"
Install the version of ruby you plan on using:
rbenv install 3.0.5
Enable the desired version globally:
rbenv global 3.0.5
Install a Node version manager such as nvm.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
You can then activate your desired Node version by running (in this case 16):
nvm install 16
nvm use 16
npm install --global yarn
For iOS Development
Install the package manager of your choice. I use mostly Cocoapods:
brew install cocoapods
Since we already installed XCode you should be all set.
brew install aws/tap/aws-sam-cli
brew install awscli
Add your AWS credentials to
~/.aws/credentials in the following format:
region = us-west-1
Install Docker if you plan on running containers with the following command:
brew install --cask docker
Hope this helps speed up the setup of your new Mac!
I will add some more instructions here as I setup more packages for different development environments.