

Setting up a new dev machine
source link: https://dev.to/babib/setting-up-a-new-machine-al8
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Setting up a new dev machine
As developers we have had to set up our development environment from scratch at least once.
Whether it's after getting a new machine or switching your operating system (as I have done a couple if times 😂) could you share
The first tool/software you setup?
your must-have tools and environment variables?
Discussion (41)
I was so tired to set up dev environment because I was switching computers, changing os, ... that I now use remote workspace solutions.
Pick a server. Something light with 4g of ram and 64g of ssd should do the trick. Install on it docker and docker compose (to create tailored dev environment related to a dev project), portainer (to manage the containers), nginx-swag (to reverse proxy the containers to clean urls), micro (a cool text editor in the command line), fish (to have a better cli with autocompletion and stuff), and then your favorite editors. It could be code-studio, if you are a visual studio user. Or the whole jetbrains suite thanks to jetbrains projector (mind that 4g of ram might not be enough as jetbains IDE are resource black holes).
Now, you have the same dev environment accessible from anywhere, from any device. Laptop, desktop, smartphone, tablet, xbox one x, you name it. As long as it has a wifi connection and a browser.
If you don't want to open source it and handle all of that yourself, you could use external solutions like gitpod.
That's interesting! Never thought of that...remote workspace solutions
It's developping quite quickly recently. Thanks to covid and remote working. You can even build a whole remote workspace (and not only for development) with solutions like kasm. But it's more tailored towards big companies. There you will have a full ubuntu experience directly from the browser
Thread
Thread
Awesome! Thanks for sharing. Would definitely give it a try
Seems like a good solution! The experience is the same as using a local machine? You don't notice any delay or screen resolution issues?
CollapseExpand
I do wsl2 backup ... and then just restore ;)
VOALA :+)
More info :
I am using Windows yes but all development is inside wsl2.
so I just do :
C:> wsl.exe --export Ubuntu c:\data\ubuntu.tar
copy the ubuntu.tar to the other machined and just do
C:> wsl.exe --import UbuntuOrOtherName d:\wsl\UbuntuDataFolder c:\data\ubuntu.tar
thats all :)
CollapseExpand
your must-have tools
Things to clean your keyboard and screen!
Maybe it's not what folks were looking for, but if you're starting fresh, you have a chance to keep this one clean.
😂 not what I was expecting for sure
CollapseExpand
I actually use Vagrant to manage my dev environments. I have a repo for my different dev environments that has my Vagrantfile. So any time I reinstall Windows or reset my Macbook I only need to install Vagrant and VMWare Workstation Pro.
Thanks for sharing. First time hearing about Vagrant.
I have a lot to learn!
CollapseExpand
- The first software I always install is the chrome browser. 🤷🏽 It's usually my default 😊
And honestly speaking I sometimes have to make a list for the rest but still forgot some tools. My must-haves are usually
- node, npm, VS code (with favorite plugins and extensions), git, intelliJ, jdk, xampp, postman
I'm sure I've forgotten some but they come as the need arises 😂
CollapseExpand
CollapseExpand
Just went through it. It's a great write up thanks for sharing.
I couldn't help but notice you use a lot of browsers
Yes I have a lot installed but really i'm only using Brave each day and for testing Firefox, Chrome and Safari usually.
CollapseExpand
I wrote a Runbook to help me remember what I want on my machine, and I have it as part of my dotzshrc repository:
github.com/jeremyf/dotzshrc/
I prefer documentation because I'm not often building a machine and I can share these things with others.
Just checked it out. It's dope! The Readme file is concise and comprehensive. Thanks for sharing!
CollapseExpand
The first tool or software that i setup is ofcourse operating system. There's no better tool than it. Setting it up as per my needs is what I first do. And it also helps knowing it better.
Must have tools
- a terminal
- vscode
- nvim(linux)
- insomnia
- Vivaldi browser
Language specific tools
- poetry(python)
- yarn (node)
- nvm(linux)
Linux specific
- oh my zsh
- powerlevel10k
This is neatly laid out.
I have to ask. You're not a fan of chrome browser or Firefox?
Also why'd you pick out Vivaldi? (first time hearing it 😂)
CollapseExpand
I actually love the process of setting up a new dev computer. It’s the perfect time to dump old apps and try new apps.
CollapseExpand
I use chocolately with a custom script to install everything for my work computer.
Everybody seems to have custom scripts for setting up their workspace 😅
CollapseExpand
The first tool/software you setup?
Probably Homebrew!your must-have tools
Hard to say but VSCode or Chrome!
CollapseExpand
I have an ansible playbook that installs everything I need for my development workflow. I have a single script that will setup ansible and run through the playbook. I keep it in my dotfiles.
curl https://raw.githubusercontent.com/WaylonWalker/devtainer/main/bootstrap | bash
CollapseExpand
git
not only for repository project but also for repository software configuration / setting file such as dotfiles in *nix term.
this is make set up more easier, just store your configuration as a git repository and upload on git hosting like GitHub and just clone on your new system / machine.
stow
stow is symlink farm manager, managing dotfiles symlink folder.
simple yet powerful.
docker
for me docker is like lightweight and fast virtual machine or local VPS, with docker I can make Dockerfile (basically just bunch of command to install dependency and pack it into an image file) and I don't need to worry about missing any dependency.
just need to binding port and project folder and you ready to develop and testing.
pretty much my workflow is using docker.
tmux
tmux is a terminal multiplexer, tmux allow you to create split pane, window, and many more without depend on your terminal.
I also install tmux on docker image.
neovim
my text editor of choice, run on terminal, simple, lot of feature such as plugin and LSP.
I also install neovim and LSP (depending on project stack) on docker image and run from docker container.
lazygit
simple terminal UI for git commands.
work great in tmux by setting shortcut to popup lazygit and I install lazygit in docker too.
alacritty
just a simple terminal emulator, nothing more.
great to combine with tmux.
firefox
my browser of choice, not resource intensive and pretty good for reading (documentation for most of the time) and keep connect with people.
using firefox with difference profile just to make it easy to organize.
pretty much my workflow is on terminal.
Fantastic list! stow is essential for setting up a new machine!
CollapseExpand
I'm not a full time dev, so my machines have to pull double duty for other work. Related to dev I do the following:
First tools to set up:
- VS Code
- Docker
- WSL2 (I use Windows machines)
Then within WSL2:
- Node Version Manager
- Oh-My-Posh
- PNPM (the only globally installed Node package I use)
Pretty much everything else I could install for local development (postgres, redis, etc) I run with Docker containers instead, keeps my local installs list short and clean.
Not required but I freaking love it: Windows Terminal. It's configurable and it just works.
same thing, install everything on docker image
CollapseExpand
I use several computers and all the major operating systems, so my setup can get crazy sometimes, however, I've found this to be rather useful...
VSCode has awesome support for remote development if you have multiple machines and want to use one (or more of them) as a potential dev server: code.visualstudio.com/docs/remote/ssh
Many of the extensions using these tools will run on the remote server, and you can use a low-end machine for VSCode, and it will run your linter and various extensions, on the remote machine.
It comes in really handy for development servers you may want to run in the cloud somewhere (i.e. on DigitialOcean / Vultr), and you can just code right on top of them.
It's also useful if you just want to use another local computer to hack around on some code stored on another computer on your LAN.
After the initial setup, the plugins you have configured to work on the remote dev server will be synced to the client servers on connect, for the duration of that session.
It feels like you're not even using a remote machine, plus it maps the remote ports you use to localhost.
CollapseExpand
I start (on Linux) by updating system packages, then using the package manager to install my essential tools (useful cli tools, browser, notion, telegram, vscode etc.), then I clone my dotfiles repo to get app configs just like they were before moving.
CollapseExpand
The first tool/software you setup?
On a Mac: Homebrew, to install git. All my dotfiles (including a Brewfile) so that's all I really need.
On my Windows machine I would just restore the latest backup of my WSL2 container.
Linux: install git with distro's package manager, restore dotfiles.
CollapseExpand
On my long to-do-list is an item called "Setup dev environment with WSL". I tried it once but was struggling with a super slow React application which hot loading time was terrible. I think that's a problem with Windows / NTFS stuff, didn't had time and desire to have a closer lock to it. Maybe some day I will do it 😄
So for now first stuff I install for a new dev machine is Git for sure, followed by nvm, Docker and VSCode. I love the settings sync feature in VSCode which is fetching my settings and desired plugins from my GitHub account, so I don't need to start configuring everything from the scratch
CollapseExpand
I hear about a company that gives for new devs a batch script that called a Package Manage and install all tools that developer need for work.
You could implement that and when you need to move to other computer is only run the script.
Also some IDE or code editors allow you to save all config on your account and you only need to log in on your new computer.
CollapseExpand
In a brand new machine (almost always linux) first things to install are git and vim then I install my dotfiles github.com/marceloandrader/dotfiles then the password manager (pass), then start working and reviewing what do I need, things that I install during that time are docker, asdf (to install different versions of node, postgresql, mysql, php, elixir) then in each project just docker compose up -d to install dev dependencies.
CollapseExpand
The first thing I install is chezmoi and I apply my dotfiles using:
sh -c "$(curl -fsLS chezmoi.io/get)" -- init --apply $GITHUB_USERNAME
and then I install VSCode.
CollapseExpandCollapseExpand
Definitly homebrew first
CollapseExpand
Try as hard as you can to use gitpod, then fallback to dev, possibly using asdf, on machine if you hit a severe roadblock.
CollapseExpand
Homebrew, and I have a script which I use to install my dotfiles :)
Recommend
-
43
Python has been largely used for numerical and scientific applications in the last years. However, to perform numerical computations in an efficient manner, Python relies on external libraries, sometimes implemented in o...
-
22
Recently I wanted to try how virgil , the OpenGL solution for KVM/Qemu, works with KWin. Virgil (sometimes also referred to as virgl) is a wonderful solution, but so far I hadn’t been ab...
-
11
Setting Defaults for New SQL Compare Projects Recently I wrote about
-
14
Setting file permissions on a remote machine with PowerShell – The Blog of Colin MackaySkip to content Recently I...
-
18
Files Permalink Latest commit message Commit time
-
12
Setting up a local dev mail server August 5, 2018 on Drew DeVault's blog As part of my work on lists.sr.ht, it was necessary for...
-
10
We may earn a commission for purchases using our links. Learn more. Value leader Xiaomi Mi QLED TV 4K 55 review: Setting a new standard for premium TVs
-
7
Jefferies’ Wood Cuts Gold Exposure in Favor of New Position in BitcoinChristopher Wood, global head of equity strategy at investment firm Jefferies, cut his exposure to gold for the first time in...
-
5
ERPx: Setting a new benchmark for the industry Share ...
-
3
Part II: Setting up Private Testnet on the local machine Reading Time: 2 minutesIn the previous blog: Understanding the diff...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK