• Skip to main content
  • Skip to primary sidebar
BMA

BeMyAficionado

Inspire Affection

How To Setup Your MacOS Machine For Any Development

October 6, 2019 by varunshrivastava Leave a Comment

Hey folks, I’ve been wanting to write an article on this topic for a long time but always find myself stuck with something or the other. Mostly because a lot of things have changed lately and it takes time to find the lost balance. So finally, I got some time out to craft this article for you.

It is good that you are putting some time aside to actually read about setting your machine.

Most people directly jump in and make all sorts of mess and end up spending more time into cleaning rather than doing the actual thing. And this is really important because undoing a lot of wrong stuff afterwards takes away your crucial time. So it is better you start on the right path.

Enough chit chat, let’s get to the business.

Table of Contents

  • Setting Up Your Mac Machine
    • Configure The Trackpad: Tap to Click
  • Configure The Trackpad: Enable Dragging
  • Setting Up Mac Machine For Development
    • XCode
    • Setting Up Homebrew
      • Where are the packages installed?
    • Cleaning Up Your Machine
    • Clearing Up Cache and Other Stale Files
    • Increase productivity with keyboard shortcuts
  • Conclusion

Setting Up Your Mac Machine

Let’s start setting up your Mac machine.

Configure The Trackpad: Tap to Click

When I first used Mac, the trackpad behaved differently. I had to physically press the entire trackpad just to record a click. And with every press trackpad life shortens.

It is always good to change the settings of your trackpad to “tap to click”.

To change the settings of your trackpad, follow these steps:

  • Click on the apple icon at the top left side of your screen.
  • Select System Preferences
  • Click on Trackpad
  • Check the boxes that say “Tap to click” and “Secondary Click”. (See Image Below)
Configure Trackpad: Tap to Click

Configure The Trackpad: Enable Dragging

Another thing that felt odd was I was not able to drag the icons around without pressing on the trackpad.

Again this was something that I did not like. I was accustomed to dragging the icon by double-click + hold and move it kind of style.

And also it prevents the hard pressing of the trackpad. Therefore, I recommend you to “Enable Dragging” as well.

To enable dragging, follow these steps:

  • Go to System Preferences.
  • Click on Accessibility.
  • Click on Mouse & Trackpad option from the left.
  • Click on Trackpad Options…
  • Check the Enable Dragging option in the dialog box that pops up (see the image below).
Configure Trackpad: Enable Dragging

This will allow you to double-tap the icon and drag it around the window.

Now let’s talk about setting your Mac Machine for Development.

Setting Up Mac Machine For Development

XCode

First thing first, install the Xcode Command Line Tools by firing below command in your terminal.

xcode-select --install

You will need this tool to enable other tools to work efficiently with your machine. You will be installing those tools next.

Setting Up Homebrew

Homebrew is a package manager that helps you to install software on your machine.

But that is not the only thing it is used for.

Homebrew is a perfect tool to keep your machine clean and free of smells.

As time pass, your machine is filled up with all those software and tools which are no longer in use. And that can lead to slowing down of your machine.

Or sometimes your machine crash, if data is important for you then hopefully you backup all your data in the cloud, but what about the software and apps that are there on your machine. There is no easy way to backup all of that.

Installing every single app one-by-one is a really boring task. So why not automate it, right?

This is where Homebrew comes for the rescue.

Just with one command, you can set up your entire machine right back where you want it.

To do that all you need to do is execute below command:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

This command will download and install the Homebrew on your machine.

Now execute the following command:

brew bundle dump

It will create a file named Brewfile and dump all the packages that are installed on your machine using brew. And you will be able to manage every software by using brew commands.

Following is my Brewfile. Feel free to copy it and edit it.

What you see in the file is the list of software that is currently installed on my machine. If you want to install all the softwares all you need to do is execute the following command:

brew bundle

This small command will look through the Brew file and install all the necessary packages.

Just like your data, now you can also backup all your software on cloud. And whenever you need it, simply install Brew and run brew bundle. Everything will be taken care of by brew itself.

Tip: Make it a habit to install software via Brewfile so that your Brewfile remains updated all the time.

Where are the packages installed?

All the packages are installed under usr/local/Cellar. Here are all the packages that are installed on my machine:

~ ls /usr/local/Cellar
asdf          diff-so-fancy gmp           libyaml       pcre          tomcat@8      xz
autoconf      direnv        icu4c         maven         pcre2         tree
automake      gawk          jenv          mpfr          pkgdiff       unixodbc
binutils      gdbm          libtool       node          python        unzip
coreutils     gettext       libxml2       openssl       readline      watchman
curl          git           libxslt       [email protected]   sqlite        wdiff

Find the Brew Cheatsheet:

  • https://devhints.io/homebrew

Cleaning Up Your Machine

With Brew, you can not only install new software but also keep your software updated.

To upgrade all the packages at once, type following command:

# To upgrade all packages 
brew upgrade

# To upgrade individual package
brew upgrade <package_name>

To remove all the packages that are not present in the Brewfilw, type following command:

# To list packages that will be uninstalled
brew bundle cleanup

# To uninstall all the listed packages
brew bundle cleanup --force

The cleanup feature of the brew is helpful for testers or maintainers who frequently install a lot of software. It becomes difficult for them to keep track of all the unused software and that’s where Brew cleanup is very helpful.

Clearing Up Cache and Other Stale Files

There are many paid software out there that will give you a nice way to clear all your stale cache files. But if you could live without fancy UI and your objective is just to clear cache files then I have a custom cleanup script for you.

Code Link: https://github.com/vslala/SVAG/blob/master/gists/bash/macos-cleanup-script.sh

You can download the file and put in your home directory. The easy way to execute the script is using the following command: sh macos-cleanup-script.sh.

But I would recommend you create an alias to this file, that way you wouldn’t have to remember the name of the file or the location where it is kept. For creating an alias, you can do something like this in your .bash_profile or .zshrc file (profile file):

alias cleanup="sh ~/macos-cleanup-script.sh"

That’s you would just have to call cleanup from your terminal and the script will execute.

Increase productivity with keyboard shortcuts

Keyboard

This will come handy especially for a developer. A developer always has a train of thoughts running in this mind, and reaching out for a mouse could take an eternity.

So, why not leverage the keyboard shortcuts that can actually save you more than 10 minutes in an hour of work.

My colleague has written a short and crisp article on the same. She has talked about the command keyboard shortcuts that could increase your productivity from day one. Here’s the link to the article:

  • Increase Productivity With Keyboard Shortcuts

Conclusion

Go through the list of all the packages that are mentioned in the Brewfile I shared with you above. It contains most of the software and tools used by Java developer.

Let me know what do you think of this article.

Related

Filed Under: Blogging, Programming, Technology Tagged With: automate, brew, macos, setup

Primary Sidebar

Subscribe to Blog via Email

Do you enjoy the content? Feel free to leave your email with me to receive new content straight to your inbox. I'm an engineer, you can trust me :)

Join 874 other subscribers

Latest Podcasts

Recent Posts

  • Is The Cosmos a Vast Computation?
  • Building Semantic Search for E-commerce Using Product Embeddings and OpenSearch
  • Leader Election with ZooKeeper: Simplifying Distributed Systems Management
  • AWS Serverless Event Driven Data Ingestion from Multiple and Diverse Sources
  • A Step-by-Step Guide to Deploy a Static Website with CloudFront and S3 Using CDK Behind A Custom Domain

Recent Comments

  • Varun Shrivastava on Deploy Lambda Function and API Gateway With Terraform
  • Vaibhav Shrivastava on Deploy Lambda Function and API Gateway With Terraform
  • Varun Shrivastava on Should Girls Wear Short Clothes?
  • D on Should Girls Wear Short Clothes?
  • disqus_X5PikVsRAg on Basic Calculator Leetcode Problem Using Object-Oriented Programming In Java

Categories

  • Blogging
  • Cooking
  • Fashion
  • Finance & Money
  • Programming
  • Reviews
  • Software Quality Assurance
  • Technology
  • Travelling
  • Tutorials
  • Web Hosting
  • Wordpress N SEO

Archives

  • November 2024
  • September 2024
  • July 2024
  • April 2024
  • February 2024
  • November 2023
  • June 2023
  • May 2023
  • April 2023
  • August 2022
  • May 2022
  • April 2022
  • February 2022
  • January 2022
  • November 2021
  • September 2021
  • August 2021
  • June 2021
  • May 2021
  • April 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • February 2020
  • December 2019
  • November 2019
  • October 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • January 2019
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016

Tags

Affordable Hosting (4) algorithms (4) amazon (3) aoc-2020 (7) believe in yourself (4) best (4) database (4) earn money blogging (5) education (4) elementary sorting algorithms (4) experience (3) fashion (4) finance (6) Financial Freedom (7) food (7) friends (3) goals (5) google (5) india (10) indian cuisine (5) indian education system (4) java (16) life (16) life changing (4) love (4) make money (3) microservices (9) motivation (4) oops (4) podcast (6) poor education system (4) principles of microservices (5) problem-solving (7) programmer (5) programming (28) python (5) reality (3) seo (6) spring (3) success (10) success factor (4) technology (4) top 5 (7) typescript (3) wordpress (7)

Copyright © 2025 · Be My Aficionado · WordPress · Log in

Go to mobile version