If you’re new to the world of software development you are probably focused on learning a specific language, framework or tech stack. But another important skill for developers is being a productive developer. This means working with speed and ease.
Fortunately there are a number of shortcuts, tools and techniques on the Mac that you can use to improve your productivity.
There are a few ways to start applications on your computer such as the Dock, Launchpad or Finder, but I’m going to show you the quickest way:
Spotlight Searchwindow pops up
sys, Spotlight has probably already autocompleted
System Preferencesfor you
System Preferenceswindow should open up
This is much faster than using the other methods listed above and we’ll be using this technique moving forward.
If you decide you don’t actually want to start another application just tap the
esc key (twice if you started typing something) and the Spotlight window will go away.
While you can certainly use the Dock to switch applications, there’s a keyboard shortcut we can use to achieve the same thing without having to grab our mouse or locate the pointer.
esckey instead of the
To quickly close the active application (such as the
System Properties we just opened), hold down the Command key (⌘) and tap
Let’s make sure you have the ability to administer your computer. You will need this ability to install certain programs and run certain commands.
Users & Groups
Allow user to administer this computeris checked
If the checkbox is unchecked and grayed out then look at the list of names on the left side and see if anybody has
Admin under their name. You’ll need to ask them to give you Admin rights on your (their?) computer.
While you still have
Users & Groups open (use Spotlight again if you already closed it) lets remove any applications you don’t need to have running every time you start your Mac.
Login Itemstab and
-button underneath the list of applications to prevent the selected application from starting every time you log in
Examples of Applications you likely want to remove are:
Next we want to make sure you have an App Store account. You’ll need this to upgrade macOS and install XCode, which we’ll be doing in a little bit:
View my Account...
It’s time to make sure you have the latest version of macOS installed.
Warning: You should do the usual OS upgrade stuff like making sure you have a backup of your machine first!
Download macOS Sierra from the App Store and upgrade your computer.
If you upgraded macOS then you’ve most definitely restarted your computer. If not, now would be a good time to do that.
Restarting your computer will ensure that all programs are shut down and you’re starting fresh with nothing already running, such as the
Login Items we removed earlier.
Restartbutton in the confirmation dialog
Once the machine restarts you should log in and have nothing running.
XCode is an Integrated Development Environment (IDE) used for building macOS, iOS, watchOS and tvOS apps. Even if you’re not planning to build apps for any of those platforms many other development tools rely on having XCode installed, so we should make sure you have the latest version installed.
Download XCode from the App Store and install it on your computer.
Now we need to agree to XCode License so that we can use the tools it provides:
sudo xcodebuild -license
qto jump to the end of the license
agreeand press return to agree to the license
sudo is a command that lets you run commands as another user. By default that user is
root which has access too all commands, directories and files on your computer. You should only have to use
sudo very infrequently.
While you are developing software you will likely need to install a number of additional packages and you want to be able to do that quickly with a minimum amount of button clicking and question answering - ideally none!
Packages can be:
Homebrew is a Package Manager you can use to install, update and manage packages on a Mac.
To install Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Once that completes you should have access to the
brew command in Termal.
We’ll be using Homebrew in just a little bit to install a few applications and tools.
It’s a good idea to run the following commands occassionally to keep Homebrew healthy and lean:
brew updateto keep Homebrew up to date.
brew doctorto keep Homebrew healthy. This may give you some information to act on, which you probably should.
brew cleanupto keep Homebrew slim by uninstalling old versions of packages.
As you grow as a developer you will likely find yourself using the computer at a lower level than you have previously - you’ll be typing commands in a terminal window instead of clicking on windows, tabs and buttons.
An example of this is when you agreed to the XCode license and installed Homebrew above. This could have been done with XCode but it would’ve take much more clicking and waiting to accomplish.
And while Terminal certainly got the job done, we can do better. iTerm 2 is an arguably improved version of Terminal. At a minimum it looks much nicer than Terminal.
We can install iTerm 2 using Homebrew:
brew cask install iterm2
Wasn’t that easier than:
When iTerm is done installing:
Homebrew uses a number terms inspired by the practice of brewing. In this case Cask is a special command you use specifically to install desktop (GUI) applications as opposed to command-line applications.
ShiftIt is a tool that lets you easily resize the current application’s window using the keyboard instead of the mouse.
For example: you can use it to set up your HTML editor on the left side of the screen and web browser on the right side of the screen without having to fuss with the mouse and trying to line things up perfectly
You can install it using Homebrew:
brew cask install shiftit
Then use Spotlight to start ShiftIt. It will likely inform you that it needs some permissions to control your machine.
ShiftIt needs permission to control your computer. Let’s give it that permission.
Security & Privacypreferences.
Allow the apps below to control your computercheck the box next to
Security & Privacypreferences.
You use ShiftIt by holding down Control, Option and Command at the same time and then pressing:
Mto maximize the current window.
Cto center the current window.
Fto full screen the current application.
To get some more screen real estate for your apps you can set the Dock to automatically hide when your mouse isn’t near it:
This will hide the Dock if it isn’t already hidden. Now when you maximize a window using ShiftIt, it will fill the entire screen.
To get even more screen real estate you can also hide the menubar if you’re running the latest version of macOS.
Automatically hide and show menu bar2
Finally, while we’re on the topic of the screen, there’s a nice menu bar app called f.lux that will adjust the white point of your screen based on the time of day. This results in less harsh light pelting your eyes late in the evening.
$ brew cask install flux
flux using Spotlight. You’ll find f.lux in your menu bar where you can adjust its preferences to your liking.