
How to prepare your fresh Mac for software development - mtkocak
https://medium.com/@mtkocak/how-to-prepare-your-fresh-mac-for-software-development-b841c05db18#.gzc8lctm7
======
bitwize
Step one is to install Xcode or the Xcode command line tools. These are
necessary for brew to build from source.

Once brew and clang are working it's mostly a matter of installing packages as
on a normal Unix system. Definitely want to install command-line git.

Of course what this guide is missing is how to set up the runtime for whatever
environment/framework you're using. For Rails you'll want rvm/rbenv; for Node,
nvm. You also may wish to test everything in a Linux VM that mirrors prod, in
which case configuring your Mac to transfer or share the code jn your src
directory with the VM is necessary.

Getting the actual dependencies of your code up and running is generally the
most crucial -- and most difficult -- part of prepping any new dev box.

~~~
knicholes
Using Docker, one could have various images made for whichever runtime
environments you require. This way, no dependencies for running/compiling code
need to be installed on a dev machine other than Docker and can be easily used
from any machine with Docker, avoiding the hassle of setting up all of these
dependencies.

------
drinchev
> Let's start with a list of essential things you need.

> ...

> Github — The essential version control system

git is the VCS. GitHub is a service ( website ) that provides git
repositories.

~~~
paradite
I find it interesting that she installed GitHub Desktop but was using `git
clone` later.

OP, If you are looking at this, learn that GitHub Desktop is supposed to
provide a graphical UI for some basic git operations (such as git clone).

You can install and use git without installing GitHub Desktop.

~~~
J0-onas
Isn't git preinstalled in macOS?

~~~
paradite
The one pre-installed is way outdated. Better off install the latest version
using homebrew.

~~~
stephenr
The one shipped by Apple on OS X 10.11.6 is 2.7.4, which was released in March
this year. That's hardly "way outdated".

> Better off install the latest version using homebrew.

The Git project provides package to install binaries for OSX. Homebrew's name
would be more accurate to the reality of the product if it's name was bathtub-
whiskey.

~~~
paradite
They updated it, following this incident:

[http://rachelbythebay.com/w/2016/04/17/unprotected/](http://rachelbythebay.com/w/2016/04/17/unprotected/)

[http://rachelbythebay.com/w/2016/05/05/xcode/](http://rachelbythebay.com/w/2016/05/05/xcode/)

------
pathikrit
Here's mine: [https://github.com/pathikrit/mac-setup-
script/blob/master/se...](https://github.com/pathikrit/mac-setup-
script/blob/master/setup.sh)

------
sciencerobot
I like homebrew-bundle [1]. It lets me list all of the apps I use in a text
file and install them with a single command.

You can also run `brew bundle --cleanup` to purge your system of apps that you
no longer need (as long as you installed them with homebrew/homebrew-bundle in
the first place).

\- [1] [https://github.com/Homebrew/homebrew-
bundle](https://github.com/Homebrew/homebrew-bundle)

------
pfooti
I like laptop from thoughtbot. It is a good starting point.

[https://github.com/thoughtbot/laptop](https://github.com/thoughtbot/laptop)

------
asteinbr
This one is better: [http://sourabhbajaj.com/mac-
setup/](http://sourabhbajaj.com/mac-setup/)

~~~
mhw
Or if you like a fully scripted setup:
[https://github.com/thoughtbot/laptop](https://github.com/thoughtbot/laptop)

~~~
mtkocak
+1

------
MasterScrat
Setup for Homebrew, GitHub Desktop and an IDE? This seems excessively basic...

~~~
J0-onas
Not to nitpick but TextMate and VS Code aren't even 'real' IDEs. They're text
editors. The IDE aspect is added by installing plugins which a) mostly depend
on the the needs of the user, and b) she didn't showed.

------
gaius
For <a very small subset of development>. When I get a new box I install among
other things, OCaml and Forth...

This is a good rant tho' [https://medium.com/my-name-is-midori/software-
development-is...](https://medium.com/my-name-is-midori/software-development-
is-fucked-up-a002b3435be8#.bba2fro3h)

------
nbmh
For setting up a Mac, I can't recommend a .osx file highly enough. Dot files
in general make setting up a new computer really easy, especially when
combined with homebrew's cask. I've been able to setup a familiar dev
environment on a new machine in less than 15 min because I've maintained
dotfiles. It's a relatively small time investment upfront and the payoff can
be massive, especially if anything ever goes wrong on your main machine.

~~~
dspoka
I'm sorry I'm not totally sure I know what you are talking about. Care to
link?

~~~
psylence519
Scripting out your favorite settings, here’s an example:
[https://github.com/mathiasbynens/dotfiles/blob/master/.macos](https://github.com/mathiasbynens/dotfiles/blob/master/.macos)

I use something similar, along with dotbot
([https://github.com/anishathalye/dotbot](https://github.com/anishathalye/dotbot))
to wire up other application’s settings files. There’s lots of good examples
around to steal and tweak.

------
technojunkie
This does seem a little basic but I forked and rewrote another setup guide
specifically for front-end developers using a Mac.

[https://github.com/asuh/front-end-osx](https://github.com/asuh/front-end-osx)

------
teh_klev
Apologies, but I can't help myself:

[http://widgetsandshit.com/teddziuba/2011/03/osx-
unsuitable-w...](http://widgetsandshit.com/teddziuba/2011/03/osx-unsuitable-
web-development.html)

But the problem ranted about above doesn't just apply to Macs. One of the most
common things I see on our support system is the dev team who've built their
app on Windows + XAMPP then wonder why stuff doesn't work the same when they
deploy to their production CentOS box.

If you're writing any server side code you should be developing on a machine
(or VM) that closely matches your production targets. Then there's no
surprises.

~~~
mtkocak
Man up and learn Emacs.

------
lsaferite
Things like this make me die a little inside every time:

> Open a fresh terminal and enter this command: /usr/bin/ruby -e "$(curl -fsSL
> [https://raw.githubusercontent.com/Homebrew/install/master/in...](https://raw.githubusercontent.com/Homebrew/install/master/install\)")

~~~
mtkocak
why?

~~~
psylence519
You’re executing a script directly off of a git repo. There’s a lot of trust
involved there. One sneaky pull-request away from an exploit.

That said, I do it all the time like everyone else. :)

~~~
mtkocak
That's the official installation instruction of homebrew.
[http://brew.sh/](http://brew.sh/)

But anyway I got your point.

~~~
stephenr
That doesn't make it any less terrible, but honestly who expects more from
homebrew, as a project it's hardly the pinnacle of engineering excellence.

