DEV Community

Cover image for Set up My Computer with Me!

Set up My Computer with Me!

Ali Spittel on October 19, 2018

I just bought my first ever personal Mac, and I thought it was a good opportunity to document my process of setting it up, and all the things I ins...
Collapse
 
ahmadawais profile image
Ahmad Awais ⚡️

Nice article.

I strongly suggest not using brew for Node. I used to use nvm and then n but both had major load time issues with terminal opening up time. Happy with asdf so far.

Collapse
 
aspittel profile image
Ali Spittel

Oh cool -- will look into that. Thanks!

Collapse
 
brittanygrebnova profile image
Brittany

Thank you for your post! As elementary as it seems, where do you access the terminal to install things on a Mac? I also just ordered one myself after only using PC's my whole life. I've read a few of your posts since recently joining Dev.to and they are delightful : )

Collapse
 
rhymes profile image
rhymes • Edited

Hi Brittany, as all the best mensplainers forged by millennia of patriarchy, I insert myself to... give you an explanation Ali could have perfectly given herself:

you can open the default Terminal by going to Applications -> Utilities and in there you'll find the Terminal app.

My preference though is towards iTerm2 which is a better terminal.

This is a rundown that might help to install iTerm or other apps that are not packaged with brew: howtogeek.com/177619/how-to-instal...

Welcome to the Mac world. I'm sure you'll get used to it!

Collapse
 
alephnaught2tog profile image
Max Cerrina

Hi Brittany, as all the best mensplainers forged by millennia of patriarchy, I insert myself to... give you an explanation Ali could have perfectly given herself:

Literal LOL and well played, sir 😁

Thread Thread
 
rhymes profile image
rhymes

:-D

Collapse
 
aspittel profile image
Ali Spittel

haha thanks for answering faster than me! Great explanation!

Collapse
 
aspittel profile image
Ali Spittel

Haha thank you rhymes! Awesome explanation. I also use spotlight search which you can get to with cmd + space. Then you can type in terminal in order to get to it.

Collapse
 
thebouv profile image
Anthony Bouvier

cmd + space is how I launch everything pretty much. And I only started using it this year, though I've used OS X since launch. Love it.

Collapse
 
dotnetcoreblog profile image
Jamie • Edited

Have you ever looked into automating this?

I've built a .NET Core global tool which allows me to install all of the software that I need on a new computer. Once I've installed the .NET Core runtime, I can issue a single command and everything will be installed and set up for me.

The same thing can be done using shell scripts, obviously, but I'm a bit of a .NET Core maniac.

Collapse
 
aspittel profile image
Ali Spittel

The whole set up took around 20 minutes, so I think it might not be time efficient. I did think about writing a shell script, and I may do that. My one issue is that I have switched between Windows/Mac/Linux relatively frequently in my career so I'm not sure if it would be worth writing one.

Definitely a cool idea!

Collapse
 
rhymes profile image
rhymes

I can't argue with automation but is it worth it in this case though?

I have had 3 Macs in 12 years (the last one is at 5/6 years and counting) and I just had to plugin the Time Machine backup disk to have everything ready in a couple of hours from scratch.

Collapse
 
dotnetcoreblog profile image
Jamie

That's a good point for Macs (which also extends to Linux boxes), but for those of us who have to support Windows boxes it's useful to be able to nuke and restore a machine as quickly as possible (without having to use a custom system image).

Collapse
 
equiman profile image
Camilo Martinez

I like .Net Core a lot. Can I see this script?

Collapse
 
dotnetcoreblog profile image
Jamie

It's currently closed source. But essentially it:

  • Uses Nate McMaster's CommandLineUtils as a base
  • Figures out which OS its running on
  • Reads a list of applications from a json file (including any CLI switches for installers)
  • Loops through the applications and installs them

I'll see whether I can produce a limited, open source version over the weekend.

Collapse
 
ssmusoke profile image
Stephen Senkomago Musoke

You can use homebrew to install Chrome and even MS Office if u ever need it...

The charm comes

brew tap homebrew/bundle then brew bundle dump --global

which will store your configuration to easily repurpose a new machine in case of a wipe

Credit from twitter.com/zbeekman/status/104943...

Collapse
 
acedmynewts profile image
Chanell

Great post. This week was my first time actually using the terminal to install things on my mac

Collapse
 
nickytonline profile image
Nick Taylor

Wasn't aware of Brewfile. Thanks for sharing Michael! I have a script that sets up my Mac and had an array of brew apps that I install, gist.github.com/nickytonline/729fc.... When I get a chance, I'll update it.

Collapse
 
starbist profile image
Silvestar Bistrović • Edited

Here are my 2 cents:

Happy coding!

 
ahmadawais profile image
Ahmad Awais ⚡️

Let me reiterate that. When I said Terminal I said the shell environment that gets loaded via your Terminal app.

I use Zsh, so if you do as well then you can put this at the top of your .zshrc file

# Profiling ZSH performance.
zmodload zsh/zprof

and this at the very bottom of the same file.

# Profiling ZSH performance.
zprof

Now when you reload your shell — Zsh will profile it's startup time.

And you'll end up on issues with hundreds of other developers talking about how slow nvm is and all the suggested solutions are just super hacky.

github.com/creationix/nvm/issues/1277
github.com/creationix/nvm/issues/782

So, it's not about the OS, it's nvm.

Peace! ✌️

Thread Thread
 
ctsstc profile image
Cody Swartz • Edited

I experimented with this a couple months back while I was doing a fresh install.

nvm will slow down zsh if you're using the nvm plugin, this is unfortunately true. . So will many other plugins if you let them run; you can bog down your shell real fast with plugins. You can also choose to still use nvm and drop zsh plugin support by modifying your .zshrc. Disabling the plugin will require you to manually set your node version upon changing directories though. So you will have to choose which convince you prefer. I still recommend using nvm though.

Collapse
 
cyberorgnizm profile image
Adole Samuel

Great set up. Looks like am definitely going to be taking home with me your exact setup because I develop with python, JavaScript and currently planning to add Ruby to my stack as a hobbyist. Thanks for sharing

Collapse
 
aspittel profile image
Ali Spittel

for sure! Awesome!

Collapse
 
ahmadawais profile image
Ahmad Awais ⚡️

I am recommending against using nvm as your terminal startup time becomes 4sec slower with that.

Collapse
 
edwin_r_c profile image
Edwin Ramirez

You ain't missing anything by using SizeUp instead of Spectacle. Spectacle is just a free version of Sizeup with less customization options. Also, Spectacle hasn't been updated for almost 2 years and those Mojave issues are starting to pile up.

I tried to replace Spectacle with Veeer it's newer, shinier, and also free; but lacks features like moving windows between screens.

Collapse
 
engineercoding profile image
Wesley Ameling

I don't have any experience with a Mac, so forgive me if I say something stupid.

You forgot virtualenv and virtualenvwrapper for python to isolate package management for different projects. Installing everything in the global site packages will be annoying when you have two projects with the same dependencies differing in the versions they use.

Virtualenvwrapper allows you to setup a folder containing all your virtual environments including making it easy to manage them.

Collapse
 
aspittel profile image
Ali Spittel

That's built into Python3 now!

Collapse
 
engineercoding profile image
Wesley Ameling

Then I have installed those packages for no reason for way too long! XD

Collapse
 
ben profile image
Ben Halpern

Awesome post! This is a really under-served part of the process.

Collapse
 
shriharshmishra profile image
Shriharsh

Intersting to see that most of the things were installed via brew. I didn’t know we could use brew for slack or VS Code

Collapse
 
stargator profile image
Stargator

Thanks for alerting to the existence of Fantastical.

I just installed it via HomeBrew Fantastical

Collapse
 
defman profile image
Sergey Kislyakov

I didn't know about code --wait (or code-insiders --wait). Thanks for that! I thought it's not possible to edit git messages in VSCode at all.

Collapse
 
eljayadobe profile image
Eljay-Adobe • Edited

Depending on how much you use Git, you may want to incorporate one of the many available git-prompts to make your shell's prompt git savvy.

Also, if you like using a git GUI front-end, I've been liking Cycligent Git Tool (currently at v0.5.2).

I don't use VSCode. Perhaps it already has a pleasant Git front-end either built in, or as an extension / addon.

On Mac, I do use Visual Studio (formerly known as Xamarin). Works great for F# development.

JetBrains PyCharm Community Edition IDE for Python is super sweet. I highly recommend.

Collapse
 
computersmiths profile image
ComputerSmiths

Two (and a half?) of my favorites:

BetterSnapTool from the Mac App store lets you drag a window to the {top,sides,corners} of the screen and makes the window resize into {full, half, quarter} size at that position.

CMD- opens the Spotlight tool so you can find anything (or do quick calculations or conversions) without having to mouse to the upper right corner (and in my case risk triggering the Hot Corners action of sleeping the display and locking the computer).

Enjoy your Mac!

Collapse
 
equiman profile image
Camilo Martinez

Spectacle it's amazing. But I reconfigured some keyboard combinations to avoid conflicts with VS Code.

I highly recommend install this apps through brew: Keka, AppCleaner, Cryptomator, CheatSheet and Karabiner.

Take a look into my post about, maybe you can find something helpful:

Collapse
 
marcoramires profile image
R A M I R E S

Thanks for the post!

I would highly recommend you using NVM and RVM to manage different versions of Node and Ruby. Postman (getpostman.com/) is always on the top of my list as well.

Collapse
 
willricketts profile image
Will Ricketts

Node isn't a language.

Collapse
 
tiffany profile image
tiff

I don't think it is useful to be pedantic. I think you know what Ali meant.

Collapse
 
willricketts profile image
Will Ricketts

I think if you're going to write a technical post with the intent of educating people, precision and specificity are important.

I know exactly what Ali means in the article, but people who this content is new to will not, and that's what's important.

Thread Thread
 
tiffany profile image
tiff

Fair point.

Collapse
 
aspittel profile image
Ali Spittel

Okay, runtime then. Just a little easier to group it that way.

Collapse
 
willricketts profile image
Will Ricketts
Collapse
 
thmso_0 profile image
0xTHMS

Hi.

You should:

  • Make use of python's virtualenv so dependency management & versions switching (2 vs 3) is much easier
  • Configure the Time Machine using an external HDD in case you mess up, you literally can go back in time

Apart from that, great article.

Collapse
 
aspittel profile image
Ali Spittel

I do! It's just built into python3 now, so no need to install it separately. I should use time machine though, thanks

Collapse
 
mariordev profile image
Mario

Nice article. Welcome! Once you go Mac, you never go back. :)

Collapse
 
chiangs profile image
Stephen Chiang

Hehe the question is, you never go back because it's awesome... Or because they designed the ecosystem to make it as painful to leave as possible? Just being cheeky..

Collapse
 
nikoheikkila profile image
Niko Heikkilä

Since you are familiar with rbenv I can recommend also pyenv which is a fork of it. Doesn't really need more introduction. 🔥

pyenv / pyenv

Simple Python version management

Simple Python Version Management: pyenv

Join the chat at https://gitter.im/yyuu/pyenv

Build Status

pyenv lets you easily switch between multiple versions of Python. It's simple, unobtrusive, and follows the UNIX tradition of single-purpose tools that do one thing well.

This project was forked from rbenv and ruby-build, and modified for Python.

Terminal output example

pyenv does...

  • Let you change the global Python version on a per-user basis.
  • Provide support for per-project Python versions.
  • Allow you to override the Python version with an environment variable.
  • Search commands from multiple versions of Python at a time This may be helpful to test across Python versions with tox.

In contrast with pythonbrew and pythonz, pyenv does not...

  • Depend on Python itself. pyenv was made from pure shell scripts There is no bootstrap problem of Python.
  • Need to be loaded into your shell. Instead, pyenv's shim approach works by adding a directory to your $PATH.
  • Manage virtualenv. Of course, you…
Collapse
 
aspittel profile image
Ali Spittel

Oh interesting! I always use virtual environments for my projects, which kind of takes care of this for me. Thank you for sharing!

Collapse
 
equiman profile image
Camilo Martinez • Edited

Spectacle it's awesome and Free. That's why I think it's most installed than SizeUp.

Collapse
 
onmyway133 profile image
Khoa Pham

Wow, you write a lot. We have many tools in common hackernoon.com/20-recommended-util...

Collapse
 
goku132 profile image
Michael

Really like these post to see what other people are using.

Collapse
 
shriharshmishra profile image
Shriharsh

Okay. I had seen the word ‘cask’ but didn’t know it was for GUI programs. Thank you!

Collapse
 
apstone profile image
Aaron Stone

I recently set up a new macbook for work, pretty much did exactly as you! Great article.

Collapse
 
electrode profile image
Electrode Cathode

Use this too a clipboard history manager

pasteapp.me/

Collapse
 
romanpaprotsky profile image
Roman Paprotsky

Media player
iina.io

Emails
sparkmailapp.com

Code notes and snippets
boostnote.io

Break time reminder app
hovancik.net/stretchly

Collapse
 
captainawesomedi profile image
Di Wu

we have the exactly the same setup... but recently i switch from fira code to monaco..

Collapse
 
arximughal profile image
Muhammad Arslan Aslam

Except Visual Studio Code and Sketch, I have the exact same setup on my office mac 💖

Collapse
 
equiman profile image
Camilo Martinez • Edited

Good, I'll pick some that I don't know.

Maybe my post can help you too.

Collapse
 
bramus profile image
Bramus! • Edited

To automate this for me (including OS settings and other stuff such as SSH keys) I've created freshinstall:

bramus / freshinstall

So you want to set up a new Mac aye?

###############################################################################################################################################
#                                                                                                                                             #
#   :::::::::: :::::::::  ::::::::::  ::::::::  :::    ::: ::::::::::: ::::    :::  ::::::::  :::::::::::     :::     :::        :::          #
#   :+:        :+:    :+: :+:        :+:    :+: :+:    :+:     :+:     :+:+:   :+: :+:    :+:     :+:       :+: :+:   :+:        :+:          #
#   +:+        +:+    +:+ +:+        +:+        +:+    +:+     +:+     :+:+:+  +:+ +:+            +:+      +:+   +:+  +:+        +:+          #
#   :#::+::#   +#++:++#:  +#++:++#   +#++:++#++ +#++:++#++     +#+     +#+ +:+ +#+ +#++:++#++     +#+     +#++:++#++: +#+        +#+          #
#   +#+        +#+    +#+ +#+               +#+ +#+    +#+     +#+     +#+  +#+#+#        +#+     +#+     +#+     +#+ +#+        +#+          #
#   #+#        #+#    #+# #+#        #+#    #+# #+#    #+#     #+#     #+#   #+#+# #+#    #+#     #+#     #+#     #+# #+#        #+#          #
#   ###        ###    ### ##########  ########  ###    ### ########### ###    ####  ########      ###     ###     ### ########## ##########   #
#                                                                                                                                             #
###############################################################################################################################################

So you want to set up a new Mac aye?

Good, ./freshinstall will help you out with that.

 
ahmadawais profile image
Ahmad Awais ⚡️

Oh, I am dead sure. I have profiled my startup times. You can search for that as well so many people have this issue.

Collapse
 
awwsmm profile image
Andrew (he/him)

Is it worth paying the $99/year for the Sketch license if I don't do much design work? What have you used it for? How often do you find yourself using it?

Collapse
 
aspittel profile image
Ali Spittel

So I use it almost every day, but I also do a lot of design stuff and create all my blog and social media graphics with it. I also use it as my SVG editor. Canva is a great free alternative, though it is web based!

Collapse
 
thewoolleyman profile image
Chad Woolley

Thanks for sharing! Here's the instructions I keep up-to-date for my dev box setups:

github.com/thewoolleyman/workstation

-- Chad

Collapse
 
andy profile image
Andy Zhao (he/him)

I also use SizeUp, and honestly I have no reason to change. It works for what I need it for, and I bought it (kind of a long time ago) so I don't get the license pop-up that the free version has.

Collapse
 
jumpalottahigh profile image
Georgi Yanev

Hey, Ali. Nice write up. Thanks for putting it together.
You have a typo/missing word on the first sentence for Homebrew :)

Collapse
 
mathur_anurag profile image
Anurag Mathur 

Thank you for the guide. I am planning to resetup my Mac in a similar way. This will be immensely helpful.