loading...
Cover image for #RoastMySetup

#RoastMySetup

awwsmm profile image Andrew (he/him) ・8 min read

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 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, 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 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. I use the Dashlane Chrome Extension 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 -- great for quickly sharing links without them being a million characters long
  • AdBlock -- no complaints with this one since I've started using it
  • TunnelBear -- for occasionally watching shows on U.S. Netflix while I'm living in Ireland
  • Just Read -- 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 -- a really powerful calculator built in to your Chrome omnibox ("search bar")
  • Momentum -- nice landscapes to help you forget that you're in an office staring at a screen for 8 hours a day
  • Wikipedia Search -- just type "wiki ..." and search Wikipedia directly from the omnibox
  • Dashlane -- easily access your Dashlane passwords within Chrome; auto-login, etc.
  • Avast Antivirus -- 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!. (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 to handle that. Before I install jEnv, though, I need to get git. To do that, I first install the command line tools for Xcode:

$ 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:

$ 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:

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

After configuring jEnv for my environment...

$ 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!

$ 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 by setting:

$ 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:

$ 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:

$ 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:

$ 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:

$ 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:

$ 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, 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

$ brew install R

Then, I get RStudio from their download page 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.

Other Software

  • Adobe Acrobat 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 -- 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 -- 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 -- 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 -- 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 -- 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 -- I get free Office products through portal.office.com from the university at which I teach. Word, Excel, Outlook, and Powerpoint are must-haves.
  • Opera -- Another browser that I download for debugging and checking how any frontend stuff I do looks across multiple browsers
  • Paintbrush -- Think MS Paint, but for Mac. This app is great if you just want to quickly crop or resize something.
  • Skype -- Necessary for talking to my friends and relatives around the world. Also useful for making long-distance calls without paying ridiculous rates.
  • Spotify -- I'm a leech on my brother's family premium account.
  • Stellarium -- This is a really cool night sky app. I use it for the online Intro Astronomy class I teach.
  • Virtualbox -- 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 -- 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.

Posted on by:

awwsmm profile

Andrew (he/him)

@awwsmm

Got a Ph.D. looking for dark matter, but not finding any. Now I code full-time. Je parle un peu français. dogs > cats

Discussion

markdown guide
 

Don't use AdBlock. The unobtrusive ads program is pay-for-play. Use uBlock Origin instead; it's available for Chrome, and it ships with an anti-anti-adblock list by default.

 

I would also consider testing latest Firefox. Firefox is not driven by data-collection as google (the entities that is), so they are more on the "anti-ad" side.
Latest versions even include a by-default adblocker and ghostery-like functionality.
Also, firefox have a small in-browser IDE which is (maybe not that useful for all of us) a cool thing! ;)

 

Thanks for the heads-up! I'll check out uBlock Origin!

 

Or even better to use Brave browser it is secure and includes adblocker out of the box.

 
 

Quick tips -

  1. Don't use Chrome.
  2. Use FireFox and install Facebook Container if you use Facebook. 3.Set DuckDuckGo as your default search engine in all your devices.

It's okay to lose your data. But losing your privacy is a whole different story.

 

"Don't use Chrome" is an interesting suggestion. If you are a front-end dev you may be doing yourself and your users a disservice to not test on Chrome. Dev tools are also amazing.

Solution could be developing on Chrome and using Firefox for everything else? Just some personal thoughts as we all grapple with privacy/convenience trade offs.

 

I personally like the dev tools in FireFox Developer Edition better. Chrome's dev tools are more powerful when it comes to profiling and performance optimization but FireFox dev tools are amazing for layouts and piecing things together. I use them both at times based on what I'm building but tend to align towards FF dev tools more. Nevertheless, whenever I use Chrome, I make sure I'm not logged in and quit the browser immediately after use.

Also, I'm usually least bothered about making sure things work fine in Chrome. Chrome is way ahead of the curve and nothing ever breaks in Chrome. Google is investing so much money to build the perfect, future-proof browser and giving it away for free. Things like this scare me the most.

 

"Don't log into any Google services if you're using Chrome."

FTFY

 
 

I wouldn't recommend Avast as AV, especially since the 3 or 4 latest versions, as it's been reportedly recognized that Avast's doing lots of bad shit, e.g. force-slowing down the computer before proposing its "speeder".

The default Windows antivirus (if you're on windows) is technically way enough (if it isn't, your behaviour on Internet's the root problem).

 

When it comes to browser testing there are a whole lot of possible ways to go. One is to use a SaaS way, like browserstack or similar, to test in a multitude of browsers, another could be to use a couple of virtual machines on which you install different versions of browsers.
Microsoft (for example) provide virtual machine images for new and old versions of windows including different versions of browsers (IE/edge mainly I think), so that could be worth checking out!

 

Why use SDKMAN and jenv? The whole idea of both is to simplify management, and SDKMAN's functionality is (mostly?) a superset of jenv's, so... why complicate things by using both?

 

Maybe one exists, but I haven't yet found a way to quickly and easily switch between Java versions with SDKMAN. With jenv, it's as easy as:

$ 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)

$ jenv global 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)
 
 
 

Looks like I've found a new adblocker:

Thanks, Rémi!

remusao image
 

Don't use Chrome, use Brave Browser or even better Firefox.

 

You should check out kodi for your media player needs as far as I know it can handle all the file formats and comes with much more ootb with a gorgeous ui