Ideal Development setup
Motivation
Everyone should use the best tool for their job, as a coder, I always have the desire to optimise my work flow to make it as efficient as possible, once its optimised and use it everyday, it will develop as habit, this is very important, because good habits will boost productivities, your brain will in automatic mode, hence use less mental energy, which will give you more energy to focuse on your task.
Daily routines
As a coder, my job is try to solve problems and the weapon of choice for solving problem is writing code in a programming language, hence I will spend most of my time dealing with computer code - Read, debug or write etc, sometimes the code will be running on different servers, so I will need to login into different servers.
Dream setup - Mosh + Tmux + Vim
Over the years, I have accumulated different tools and habits from my job, now I think I have the dream setup which I can’t see myself changing it in the forsean future.
Using the combination of the tools, it allows me to:
- Write/read/debug programs quickly.
- Browse file systems easily
- Open as much shell as possbile, each can have different configuraton.
- Setup different development environments and switch between them within couple keystroke.
- Connect to different server and keep the session
- About login from any computer and the develpment environment is the same.
- Everything is save even the internet dropped or laptop ran out of battery.
- All the tools are very lightweight, the memory footprint is neglectable.
The ability to do the above save time and energey everyday compared to others.
Mosh
Is a mobile shell, a drop in replacement for ssh. Its very handy to use it when login to remote servers.
Normally with ssh, if your internet dropped or roamming (switch between wifi and cellar network on your laptop) you will have different IP address, becuase ssh is TCP based, so you will have to reconnect again, but with Mosh your connection can resume because its UDP based, it also tell you if you connection dropped!
Another killer feature for me is Mosh’s synchonisation protocol e.g ssh will connect to your server and transfer the output of your remote server shell’s standard outputs directly to your local machine’s screen, but when you running a long task that gennerate thousands line of output, it will download all the content and display on your screen, this will saturate your bandwidth and make your Ctrl + C to stop the programm on the server side useless, with mosh it will only get the latest change and also allow you to Ctrl + C r typing responsive.
There are many benefit of using Mosh, but the above 2 is good enough for me to switch to it from ssh.
Tmux
See the other post about the benefit of using tmux.
It allows me to run my development environment on the server and don’t need to worry about save the files if I shutdown my local computer, so I can connect to it from home laptop or library computer, I still have the same environment, everything is open just as I left previously.
There are so many cool things you can do with tmux, I’m only using very small percentage of its functionalities, can’t wait to discover/use more.
Vim
Is my favorite text editor, it allow me wirte/read/debug code, or just use it as normal text editor job, there are tons plugins out there to customise it, available on every server (no need to install anything), I only scratch the surface of what I can do with vim…