My dev environment

I am starting a new job on Monday, and this week I received my new machine.
It's a nice macbook M1 and it's going to be the first time for me on MacOs for work.
I am a long-time Linux user so everything is not really perfect yet.

But enough talking, let's start to setup my dev environment !

CLI tools

Basic setup

First thing first, I need a tool to install cool packages (an apt like).
On MacOs, there is a package manager that is commonly used called homebrew.
So I started by installing it (basically I copy-pasted this command line from their website).

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

I use zsh instead of bash and in particular the oh-my-zsh default configuration:

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

I also like to use tmux on a daily basis. Mainly to get tabs and splitted screens (but it can do more).

brew install tmux

There are some plugins I also like for tmux, but I don't want to manage them manually.
Here comes tpm for Tmux Plugin Manager.

git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
tmux source ~/.tmux.conf

Yep I know, what a lame way to install something.
But the good things is I just copied my tmux.conf file, then ctr + B + I and boom, all my plugins installed and configured.

dev tools

The first package I wanted to install was docker (and docker-compose).
Bad news, there is not really a docker support for MacOs and I need to use Docker Desktop (basically it's running docker inside a VM from what I understood).
Second bad news, they recently changed their terms of service and it's a paying tool now.
So I just skipped this part, and I'll check on Monday if I can get a license or something.

I used to have different tools to manage my development environments like nvm, rvm, ...
But this time I want to try something new.
Let me introduce you to asdf a tool that can manage multiple language environments.

brew install asdf

And I can install all the languages I need by adding plugins:

brew install gpg coreutils # This is needed to install plugins
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf plugin add golang https://github.com/kennyp/asdf-golang.git
asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git

Git configuration

Of course I need the git command line, with a custom configuration

brew install git

and my ~/.gitconfig

[user]
    email = me@company.com
    name = My name
[core]
    default = code -w
[commit]
    verbose = true
[alias]
    pushf = push --force-with-lease

The core section is for using VSCode as my editor for commits, rebases, ...
The commit verbose section will include the diff as comments at the end of the commit template.
It's really useful when I write my commit messages from VSCode.

And finally I added an alias for git push --force-with-lease which I never remember.
You can follow this link for more infos on this great options.

Next: tig.
tig is a wondefull text-mode interface for git, I use it as a git log on steroids.
Easy, just brew install tig

And finally git-mob a node tool to include co-authors in my commit messages

npm i -g git-mob

It always important to give credits to our colleagues when pairing (and I love pairing).
This tool helps me adding "Co-authored-by" lines on my commit messages (and those are tracked by github)

Misc

Some other tools I installed :

  • htop (but the MacOs Activity monitor looks good, maybe I'll stop using it)
  • wget and curl
  • jq (for json manipulation on my beloved terminal)
  • nmap

🎉🎉🎉 tada ! My terminal is now looking great.

screenshot_2021_09_19_at_16.58.48.png

GUI tools

My "IDE"

Like almost every web developer these days, I use VSCode.
I was an Atom fan for a long time, but a coworker convinced me to switch one day, and since I never switched back. To be honest I was also afraid that github will stop Atom support after MS acquisition.
Recently I tested the VSCode integration on github (codespaces) and I also love it.

The install process is pretty simple, I won't cover it but a few customisations make my life better.
First of all, I want to be able to start VSCode from the command line, so let's add an alias for that.

# The if statement is just so I can share my aliases across different machines
if [[ $(echo $OSTYPE) == "darwin"* ]]; then
  export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/bin/app/bin"
fi

All my plugins are synchronized, but there is a tiny thing I need, a cool coding font. The one I use is called FiraCode

brew tap homebrew/cask-fonts
brew install --cask font-fira-code

A little bit of VSCode configuration and voila:

screenshot_2021_09_19_at_17.04.36.png

Have you noticed the difference?
It transforms symbols like =>, ===, ->, ...
Better code reading experience but I must admit, it's a personal opinion.

Other tools

A list of the other tools I installed for now, not much to say:

  • Chrome
  • Postman
  • Wireshark

A few things I don't like about this machine

Installing stuffs on MacOs is not as pleasing as it is on Linux.
During this setup I used at least 3 different install processes (homebrew, installers, and copying files from a dmg image).

I'm not a huge fan of the default terminal.
It does the job but that's it, maybe I'll try to find a better one later.

M1 machines don't support more than one external display and I'm used to code with two displays + the laptop one.

Spaces, the virtual desktop feature is not customizable enough.
For example, I can't have spaces arranged vertically.

There are also some apps that I need to find.
A good markdown editor, but VSCode can be used for that, and a native app for Google meet (which is used by my new company).

Conclusion

I really like this machine.
The machine itself is one of the best I worked on.
The build is great, the screen is awesome and the keyboard is really nice for a laptop.

I'm not a huge fan of the operating system tho.
I already used it for music, but when it comes to developement, not as great as a Linux distrib.
Also my external pheripherals are not supported like I want them to be (external soundcards, mechanical keyboard, webcam,...).
And as strange as it may sound, there were more supported on Linux.

And finally I don't know the ecosystem enough and I'm still looking for some applications.
If you have some tips, I will be pleased to ear them :)

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center