3 ms·
I'm an "early" programmer and still poking my way around various toy side projects to learn concepts and such. Ubuntu and Bash had been somewhat of a mystery t
by shostack 8y ago
I'm an "early" programmer and still poking my way around various toy side projects to learn concepts and such.
Ubuntu and Bash had been somewhat of a mystery to me previously, but I eventually got a virtual dev environment setup and was comfortable getting in with navigating to my Vagrant folder, then executing 'vagrant up', 'vagrant ssh', etc. and then navigating to my project.
That comfort turned to annoyance as I realized how unnecessary those few keystrokes were. And despite how little time they took, I found myself getting angry at the repetition of having to enter them.
So I decided to conquer my Bash scripting fears, and wrote what many would consider to be a trivial script to navigate to the Vagrant folder on my host machine, boot up the VM, and then navigate to the appropriate project folder in the VM. Along the way I learned more about aliases, and also how to pass commands from a host to a guest machine which was one of the roadblocks I encountered.
I now can boot up and get into my project folder with a simple three character alias from within any directory on my host machine.
Again--any experienced developer would be able to script this in minutes most likely. Back then it took hours. And now those are the most satisfying three characters I type, as every time I enter them, I get reminded of the progress I'm making and that even trivial things may be candidates for automation.
- sgwae 8y agoYou could still save yourself the misery of typing one or two characters if you fix that alias.
- otisfunkmeyer 8y agoyou just blew my mind. im not even kidding.
- Latteland 8y agoDoesn't every developer eventually alias building to 'b' or maybe 'm'? It's like a law of nature. Or you can just rebuild automatically every time you save a file, like js people do.
- shostack 8y agoI know, right? I'm actually leaning in the direction of making it a little less spartan by having it either accept a parameter for a project name to go directly to that folder, or prompt me to enter a number to select from a list of projects gathered from the folder names in my parent project directory.