DEV Community

Cover image for Improve your productivity by using more terminal and less mouse (🚀).
Sotiris Kourouklis
Sotiris Kourouklis

Posted on • Originally published at sotergreco.com

Improve your productivity by using more terminal and less mouse (🚀).

Many beginners might think that only senior developers can use the terminal for productivity. When I started learning programming, I was afraid to use the terminal for anything beyond basic tasks like npm commands.

However, over the years, I realized that I missed a huge opportunity to enhance my productivity. So, we are going to explore all the reasons why you should use the terminal more and some tools that can help you become more productive.

Also let's be honest to all the mouse-only-users you are kind of dull.

The mouse is slow 🐌

Basically, the less you use the mouse, the faster you will be. Keeping your hands on the keyboard will save you a ton of time. And let's be honest, if you are using the mouse for most of your activities, you are kind of noob.

Navigating folders

Who the hell uses the file explorer on their computer? I mean, even if you are a Windows user, the file explorer is basically shit, but even on Mac, using the terminal to navigate is much faster. For the people that are using file explorer on Linux, I hope God forgives you for your sins.

Create files and directories

The people who right-click to create a file are said to have mental issues, although I don't completely agree with that, I am 82% there. Commands like touch , mkdir and ls are basically lifesavers when it comes to productivity.

Using cat to quickly peek through a file is also very helpful.

And I want to hear your opinion on that in the comments. What other commands are you using?

What if I am on Windows?

First of all, if you are a Windows user, your situation might be worse than those who use right-click to create a file. However, this is a discussion for another day.

By installing Git Bash, you will basically have almost all of the Unix system terminal commands and move away from the PowerShell disease.

windows = 🥲

Nano or Vim

Understanding the basics of nano or vim will prevent you from opening slower alternatives like vscode or jetbrains. When you want to quickly edit a small file, opening an IDE or Text Editor just to change a few lines of code can be a betrayal to the developer community.

Also, that means you are basically useless when it comes to servers.

ZSH

If you are not using oh-my-zsh, you are missing out on some amazing plugins. One feature most people wish the terminal had is autocompletion. With the zsh-autosuggestions plugin, your terminal will autocomplete most commands and remember previous ones.

So, for all the up-arrow 🔼 fighters out there, you will stop pressing the up-arrow key 500 times to find one old command because you are tired of googling.

Hardcore Stuff (🍆)

Switching to neovim with tmux makes you look like some kind of a porn-star coder. You will appear cool in meetings and when you share your screen to show your code.

Besides the funny side of things, if you are willing to switch to tmux with neovim, it can make you a 10X developer. I could extend and talk for hours on how beneficial it can be after you go through the learning curve, but that is an article of its own.

Conclusion

So, there you have it! Ditching the mouse and opting for the command-line is like upgrading from a bicycle to a rocket ship—it's faster, cooler, and the view is spectacular!

By getting cozy with the terminal, you're not just speeding up your workflow, you're also joining the leagues of elite developers who can make magic happen with a few keystrokes.

Remember, every master was once a disaster.

Thanks for reading, and I hope you found this article helpful. If you have any questions, feel free to email me at kourouklis@pm.me, and I will respond.

You can also keep up with my latest updates by checking out my X here: x.com/sotergreco

Top comments (25)

Collapse
 
latobibor profile image
András Tóth • Edited

Hey, senior software engineer here. I try to use a great IDE as much as possible and the terminal as little as possible.

Why? Let's say I'm writing and fixing unit tests. The jest integration runs in my Webstorm works as a breeze: I get diff, I can click on the failing test, it jumps to the relevant line in the codebase, I can put in a breakpoint if I want it and so on. Lightning fast, I have everything at my hands, no need to manually scroll, load, struggle with something. 21st century experience.

I do advocate for learning the keyboard shortcuts while using the IDE and also to learn tricks like multiline cursor editing and so on, because they save so much time.

Now, about typing speed. Mostly I think for a while, then type out my code, the check the results (either through a unit test or on the frontend). Half of my "coding time" is actually also talking with stakeholders, making agreement with my colleagues on what to work on and what not to work on. It's not a typing competition, it's not a copy-paste-modify extravaganza. If I'm writing 2-3x times the same thing or modified version of the same thing I step back to evaluate if I need to extract the code or if I expect them to diverge a couple of iterations later, therefore no need to extract the code. It requires stopping and thinking, nonetheless.

Finally, about CLIs: I hate command line interfaces. They violate "avoid mental mapping" principle of clean coding: you have to memorize the flags for each CLI tool, remember if -f was file or force or folder or something completely different. There are conventions, yes, but not everyone follows them. The only things I do in the terminal are basically "npm start" or "npx something something". Very, very limited instructions.

Summary: you have to use the tools to be productive. You have to code and plan your productivity in accordance of the tools available. If you "muscle" your code through and ignore very effective coding assistance tools, you can have the illusion of productivity as you type a lot, and press Enter a lot, but in reality you are doing double/triple work.

Collapse
 
nandorholozsnyak profile image
Nándor Holozsnyák

Exactly 👆
I share the same opinions, although I still want to learn how to use Neovim and standard vim. 😅

Collapse
 
latobibor profile image
András Tóth

Thanks for your comment and for all the likes on it! Sometimes I feel alone with my opinion and that's pretty scary. So your support feels encouraging.

Collapse
 
phalkmin profile image
Paulo Henrique

terminal is 🔥 - I dare any GUI to let me type fuck and then get the correct command I need.

( But I still need to make zsh better on mac - AND discover how to make the settings work when I'm connected via ssh)

Collapse
 
secondsleepblaine profile image
Blaine

I agree with the overall thesis here. One thing I'd add is that if you're a beginner, you may need to force yourself to use each CLI tool even though it will be slower at first. But if you eat your vegetables for just a few days, you'll be rewarded.

The whole Windows vs Mac argument is silly, silly, silly. We love to act like there's an objectively better OS, but it's all just opinions. I'm a Mac user who works heavily in the Microsoft ecosystem and I love it. I also think Windows is amazing OS. I also think the Ubuntu desktop is fantastic.

However, I can objectively say that PowerShell is superior to all CLI options. Come on, it's an object-oriented shell that runs on all platforms! If you disagree, you're an idiot.

Collapse
 
ruanltbg profile image
Ruan Carlos

Hey you, if you are a new engineer around, don't fall to this post.

  • The guy that wrote this is not a senior engineer, he has only 7 years of experience.
  • The text is based on his opinion not based on data.
  • The text has no fundaments, as if you as engineers spend most of your time creating folders or touching files. If you do that or use that as param to compare productivity, you are for sure not a senior+ engineer.
  • What is productivity and why create a folder 0.01 second faster matters so much for you to be disrespectful to others?

Kids, don't be like this person, be respectful, add your opinion not impose it.
Gather data, measure, compare and then expose the result. Have a positive thinking and try to aggregate.

This post is so disrespectful on so many ways that deserves a report.

Collapse
 
ezpieco profile image
Ezpie

NeoVim Mentioned! Let's go!!!!

Collapse
 
purdy profile image
Jason Purdy

When it comes to trying to find a previous command in your terminal, you can use Ctrl+R and it pulls up a search where you can type part of the command to find it. You can hit Ctrl+R repeatedly to go through other results. Bonus, this feature is also available in your MySQL/MariaDB console.

Collapse
 
orenc profile image
Chanan Oren

Also, as long as you have "stty -ixon" (Linux and *BSD I'm not sure about MacOS) in the shell session (in config or manually run), if you Ctrl+r past your intended command you can switch direction and search forward with Ctrl+s (if you don't turn off the flow control commands with the above stty command then when you press Ctrl+s the shell output will appear frozen until pressing Ctrl+q)

On ZSH with flow control commands disabled then Ctrl+q is mapped to push-line by default you can remap to push-line-or-edit (sgeb.io/posts/bash-zsh-half-typed-... )

Collapse
 
ezekiel_77 profile image
Ezekiel

Powershell Alternative for touch is New-Item or ni. And No Powershell is not shit

Collapse
 
orenc profile image
Chanan Oren

Does New-Item also update the timestamp on existing files? I'm not against PowerShell, just might not be an entirely equivalent command if it doesn't update timestamps (though does cover the most common use).

touch updates accessed and modified timestamps if the file(s) exist (current time by default arguments available for setting a specific time).

Collapse
 
jefflindholm profile image
Jeff Lindholm

Nope it does not - but it is easy to create a touch command in powershell, and put it in your profile.

Collapse
 
marissab profile image
Marissa B

I get where you're coming from, but gatekeeping, nasty stuff like this:

Also let's be honest to all the mouse-only-users you are kind of dull.
if you are using the mouse for most of your activities, you are kind of noob.
The people who right-click to create a file are said to have mental issues

...just makes you come off like an unprofessional jerk, which I don't think was your goal here and it's not the kind of vibe this site is about.

Collapse
 
citrix123 profile image
RahulAN

Hello there, I like your post, but I would recommend to make a combination of Windows and Linux. Development on Linux is much better it depends on your domain, I mostly spend my time with remote ssh Linux workspace on vscode on Windows, It makes debugging much much easier than vim where you have no X environment running at all.

Collapse
 
casperbraske profile image
Luis

There's a third option: the keyboard. If I want to copy/paste random files from one dir to another, file explorer is "billions" of times faster, for example. New folder? Ctrl+shift+N. Navigate dirs? Ctrl+L, super+arrows etc.
Same thing for non-terminal editors/IDEs.

Collapse
 
gokayburuc profile image
Gokay Buruc

I also recommend adding key assignments and job automation and specifying time differences.

Especially for very repetitive vim regex or file searches opts, assigning keys provides a tremendous speed increase in tasks.

Collapse
 
faaktap profile image
Fakie Tap

We are all programmers here. Best to use programming to make your tasks easier.
I use batch files in windows.

When I start a new project, I just add new commands to my batch file to do all the typical tasks for that project.

I also associated Alt-F1, and Alt-F2 with 2 command windows. So I always have two cmd windows open.

so to for instance open my foo project, load code editor, and start a node session

  1. Press Alt-F1 (open or goto cmd session)
  2. type "d foo" (change folder to my foo project)
  3. type "serve" (start a npm run serve)
  4. type "code ." (open vscode on current folder)

etc...

Yeah - I'm working in windows.

It also means I do not forget commands.
If I find a nice way to do XYZ - I will save a batch file called XYZ in my bin folder.
If I need to do XYZ 2 years later - that batch file is waiting for me.

Collapse
 
dimau profile image
Dmitrii Ushakov

Just use IDE like WebStorm for programming

Collapse
 
joaf93 profile image
Joachim

You can get just as far, if not further (in terms of speed) using keyboard shortcuts and Microsoft PowerToys (fantastic program)

That said, a well configured terminal with good auto completion and tab navigation is a must!

Collapse
 
karma0 profile image
Bobby

I came to the same conclusion - the context switching for motor memory is too much time wasted in the long run unless you can type with one hand while you mouse with the other.

Don't listen to the negative feedback from others - only you know what works and feels good for you. For me, browsing and selecting text with a mouse while I'm coding is the most painful part of my job, so I focus on using vim modes in apps when it's available and using keyboard shortcuts with scripts backing them in UIs that have easy interfaces (like i3).

Also, when it comes to the "wow" factor if folks watch closely they'll see what I'm doing and they may even get impressed, but usually they're just overwhelmed trying to follow out keep up, and that's probably a little intimidating.

The "cool" occasions definitely don't outweigh the "outdated tech" commentary I get - like, "welcome to the 21st century!" Or, "you still use v-i!?". These people haven't relentlessly pursued continuous and gradual performance improvements in software development over long periods of time. So, don't do it for the wow factor - do it because it feels good when you do it.

No one will understand why you do it, but you will, and that's all that matters.

Nice work! What's next? Maybe a new keyboard layout? 😉