#RoastMySetup
Tags: roastmysetup, beginners, setup, mac
Published: 2019-02-07 22:21:47

Sometimes, rather than trying to clean your computer, it's easier to just burn the whole thing to the ground. I did that recently when I factory reset my MacBook Air. __After making sure to back up all of my files first__, I rebooted in safe mode, [following these instructions](http://www.tomsguide.com/faq/id-3678832/factory-reset-macbook-pro.html) to _safely_ factory reset my Mac. Once I was back up and running, here's the order in which I reinstalled all my junk:

### Password Manager

First things first*: I start by installing [Dashlane](https://www.dashlane.com), my password manager of choice. Dashlane holds all my logins for everything else, so it's not much use installing anything else until Dashlane is up and running.

### Antivirus

Then, I get [Avast](https://www.avast.com/en-eu/index#mac) antivirus for security. It's always a good idea to have an antivirus installed, even if you're one of those people who thinks you can't get a virus because you're not on Windows. I use Dashlane to log in to my Avast account. I turn off Avast SecureLine VPN and Avast Passwords during installation because I don't use either of these features.

### Browser

Of course, no man can survive on Safari alone, so the next necessity is [Google Chrome](https://www.google.com/chrome/). I use the [Dashlane Chrome Extension](https://chrome.google.com/webstore/detail/dashlane-password-manager/fdjamakpfbbddfjaooikfcpapjohcfmg) to get easy access to all my account passwords in the browser. Chrome is great because it syncs my search history, opened tabs, etc. across my phone and all the computers I use regularly. Note that since I've logged in to Chrome, I don't need to install any of my usual browser extensions... Google does it for me automatically. But here are the ones I use:

- [bitly](https://chrome.google.com/webstore/detail/bitly-unleash-the-power-o/iabeihobmhlgpkcgjiloemdbofjbdcic) -- great for quickly sharing links without them being a million characters long
- [AdBlock](https://chrome.google.com/webstore/detail/adblock/gighmmpiobklfepjocnamgkkbiglidom) -- no complaints with this one since I've started using it
- [TunnelBear](https://chrome.google.com/webstore/detail/tunnelbear-vpn/omdakjcmkglenbhjadbccaookpfjihpa) -- for occasionally watching shows on U.S. Netflix while I'm living in Ireland
- [Just Read](https://chrome.google.com/webstore/detail/just-read/dgmanlpmmkibanfdgjocnabmcaclkmod) -- this extension makes webpages easier to read by removing styling, ads, etc. It's also great if you just want to print the _content_ of a page, and not all the extra garbage that comes with it
- [Wolfram|Alpha](https://www.wolframalpha.com/extensions/chrome-extension.html) -- a really powerful calculator built in to your Chrome [omnibox](https://developer.chrome.com/extensions/omnibox) ("search bar")
- [Momentum](https://chrome.google.com/webstore/detail/momentum/laookkfknpbbblfpciffpaejjkokdgca) -- nice landscapes to help you forget that you're in an office staring at a screen for 8 hours a day
- [Wikipedia Search](https://chrome.google.com/webstore/detail/wikipedia-search/lipakennkogpodadpikgipnogamhklmk) -- just type "wiki ..." and search Wikipedia directly from the omnibox
- [Dashlane](https://chrome.google.com/webstore/detail/dashlane-password-manager/fdjamakpfbbddfjaooikfcpapjohcfmg) -- easily access your Dashlane passwords within Chrome; auto-login, etc.
- [Avast Antivirus](https://chrome.google.com/webstore/detail/avast-online-security/gomekmidlodglbbmalcneegieacbdmki) -- Let Avast check whether websites are reputable or not, and report sketchy-looking ones

### JVM Management (&& Git && Homebrew)

Next, let's go over to the Terminal, where the very first thing I do is install [SDKMAN!](https://sdkman.io). (I work with JVM-based languages quite often.) SDKMAN! is great because it manages all your versions of all your JVM-based software and lets you easily install or uninstall multiple versions of the same programs. I use SDKMAN! to manage my...

- Groovy
- Java
- Kotlin
- Maven
- sbt
- Scala, and
- Spark

...versions. Easily switching between different versions of Java is a different ballgame, though, and I use [jEnv](http://www.jenv.be) to handle that. Before I install jEnv, though, I need to get __git__. To do that, I first [install the command line tools](https://www.howtogeek.com/211541/homebrew-for-os-x-easily-installs-desktop-apps-and-terminal-utilities/) for Xcode:

```bash
$ xcode-select --install
```

Note that **you don't need the full Xcode application** (which is about 10GB the last time I checked), but just the command-line tools, which are installed using the command above in **Terminal**. Then I install **Homebrew** with:

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

...and use it to install __git__:

```
$ brew install git
```

Finally, I can get jEnv using either git or Homebrew. Let's use git here:

```bash
$ git clone https://github.com/gcuisinier/jenv.git ~/.jenv
```

After configuring jEnv for my environment...

```bash
$ echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(jenv init -)"' >> ~/.bash_profile
```

I can have it recognise the version of Java I installed earlier with SDKMAN!

```bash
$ source ~/.bash_profile 
$ jenv add ~/.sdkman/candidates/java/11.0.2-open/
openjdk64-11.0.2 added
11.0.2 added
11.0 added
```

Note that your Java version might be different from mine. [I let jEnv manage my `$JAVA_HOME` variable](https://stackoverflow.com/questions/28615671/set-java-home-to-reflect-jenv-java-version) by setting:

```bash
$ jenv enable-plugin export
```

...which requires a Terminal restart. Now, jEnv will show the "system" version of Java, because I haven't set a default version yet:

```bash
$ echo $JAVA_HOME
/Users/andrew/.jenv/versions/system
```

Let's use SDKMAN! and jEnv to install a second Java version and manage which one is the default. Use `sdk list java` to see which installation candidates are available for Java (replace `java` with any other piece of SDKMAN!-managed software to see the versions available for _that_). I'm going to install `8.0.201-oracle` alongside my default `11.0.2-open`:

```bash
$ sdk install java 8.0.201-oracle
$ jenv add ~/.sdkman/candidates/java/8.0.201-oracle/
oracle64-1.8.0.201 added
1.8.0.201 added
1.8 added
```

Now I can see all of my java versions installed with:

```bash
$ jenv versions
* system (set by /Users/andrew/.jenv/version)
  1.8
  1.8.0.201
  11.0
  11.0.2
  openjdk64-11.0.2
  oracle64-1.8.0.201
```

And select the global default with:

```bash
$ jenv global 1.8
$ echo $JAVA_HOME
/Users/andrew/.jenv/versions/1.8
$ java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
```

Changing Java versions is now as easy as running a single `jenv` command:

```bash
$ jenv global 11.0.2
$ echo $JAVA_HOME
/Users/andrew/.jenv/versions/11.0.2
$ java -version
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
```

### Markdown / Plaintext Editors

Next, I install [Simplenote](https://simplenote.com), my markdown editor of choice, so that I can write this blog post. The auto-correcting of spelling and auto-capitalising of words is not great when you're typing code all the time, so I disable these features in Edit > Spelling and Grammar > {Check Spelling While Typing, Correct Spelling Automatically}.

Similarly, I sometimes use Mac's __TextEdit__ for copying and pasting small snippets of code. I open that and change lots of the defaults so it acts more like Windows' Notepad (just a simple, no-frills, plaintext editor):

- Go to TextEdit > Preferences and
	- Switch from "Rich text" to "Plain text"
	- Under "Options" at the bottom, uncheck:
		- "Check spelling as you type"
		- "Check grammar with spelling"
		- "Correct spelling automatically"
		- "Show Ruler"
		- "Smart Quotes"
		- "Smart Dashes"
	- On the "Open and Save" page, uncheck:
		- "Add .txt extension to plain text files"

Close TextEdit and the next time you open it, it will be a much simpler, easy-to-use plaintext editor.

### Non-JVM Programming Languages

macOS comes with __Python__ v2.7.10 installed, but if you want another version, you'll need a version manager. I don't use Python too often, so I'm happy with the default. Ruby is also installed by default (v2.3.7p456 as of this writing), as well as Perl (v5.18.2).

I do code in __R__ quite a bit, so I install R with

```bash
$ brew install R
```

Then, I get __RStudio__ from [their download page](https://www.rstudio.com/products/rstudio/download/#download) as a `*.dmg` file and install.

I'm starting to learn Haskell, so I install the __Haskell Platform__ for Mac by [downloading it from this page](https://www.haskell.org/platform/mac.html).

### Other Software

- [Adobe Acrobat Reader](https://get.adobe.com/reader/) -- I hate reading PDFs in Preview on Mac (or within Chrome) so a good PDF viewer is a must. Reader DC lets you sign and fill in forms as well, which is handy.
- [Dropbox](https://www.dropbox.com/) -- I use Dropbox Basic (the free version), which by default only offers 2GB of space. But I got some promos early on when Dropbox was getting started, so I have 5.2GB. (Ooh I'm fancy.*)
- [Firefox](https://www.mozilla.org/en-US/firefox/new/) -- I download all the major browsers except Edge to have them readily available for testing, debugging of frontend stuff, etc. There must be an easier way to check how a website renders across major browsers, right? (Suggestions, anyone?)
- [Fitbit Connect](https://www.fitbit.com/ie/setup) -- I track my steps, heart rate, and weight with Fitbit, and Fitbit Connect lets me sync my Fitbit via my Mac (when it's not convenient to do it through my phone)
- [Google Drive](https://www.google.com/drive/download/) -- I use Dropbox for my personal files and Google Drive for my work files, because I have an unlimited Google Drive through work. I like to keep my personal and professional cloud-based storage solutions separate
- [Keynote](https://itunes.apple.com/us/app/keynote/id409183694?mt=12) -- Keynote isn't amazing but it's my go-to for making slides on Mac. I generally use Powerpoint on Windows. I'm not really married to either of these and would be happy to receive suggestions for alternatives.
- [Microsoft Office](https://www.microsoft.com/en-us/download/office.aspx) -- I get free Office products through [portal.office.com](https://portal.office.com) from the university at which I teach. Word, Excel, Outlook, and Powerpoint are must-haves.
- [Opera](https://www.opera.com/computer/mac) -- Another browser that I download for debugging and checking how any frontend stuff I do looks across multiple browsers
- [Paintbrush](https://paintbrush.en.softonic.com/mac) -- Think MS Paint, but for Mac. This app is great if you just want to quickly crop or resize something.
- [Skype](https://www.skype.com/en/get-skype/) -- Necessary for talking to my friends and relatives around the world. Also useful for making long-distance calls without paying ridiculous rates.
- [Spotify](https://www.spotify.com/) -- I'm a leech on my brother's family premium account.
- [Stellarium](https://stellarium.org/) -- This is a really cool night sky app. I use it for the online Intro Astronomy class I teach.
- [Virtualbox](https://www.virtualbox.org/wiki/Downloads) -- Virtualbox is my go-to for creating virtual machines. I can run Ubuntu in a VM on my Mac or on Windows without having to `ssh` into a remote server somewhere.
- [VLC](https://www.videolan.org/vlc/download-macosx.html) -- VLS is my media player of choice, for no reason other than it seems to be compatible with the widest variety of media formats.

---

...that's it for my basic setup! In a forthcoming article, I hope to run through my custom `bashrc` script and how I maintain it across all my machines using `git`. Let me know what you think of my setup in the comments below, especially if you have any suggestions for alternative software!

Thanks for reading!

---

\* I'm the realest.