Many beginners might think that only senior developers can use the terminal for productivity. When I started learning programming, I was afraid to ...
For further actions, you may consider blocking this person and/or reporting abuse
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.
Exactly 👆
I share the same opinions, although I still want to learn how to use Neovim and standard vim. 😅
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.
💯💯 I couldn't agree more.
Also, appearing cool just because of my console appearance is not one of my goals 🚶🏻♂️➡️.
I have a feeling that other things can be also at play:
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)
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.
Hey you, if you are a new engineer around, don't fall to this post.
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.
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.
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 topush-line-or-edit
(sgeb.io/posts/bash-zsh-half-typed-... )I get where you're coming from, but gatekeeping, nasty stuff like this:
...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.
NeoVim Mentioned! Let's go!!!!
Powershell Alternative for
touch
isNew-Item
orni
. And No Powershell is not shitDoes
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).Nope it does not - but it is easy to create a touch command in powershell, and put it in your profile.
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.
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.
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.
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
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.
Just use IDE like WebStorm for programming
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? 😉
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!
Hey👋🏽
I personally think GUI and CLI r good just depends in what you r doing as they both have their strength and weaknesses. I would say programmers, script writers turn to stick to CLI while designers turn to stick to GUI. Nevertheless i think you should go with the flow, just go what ever makes you more productive.
Very nice! I do agree about that tools are meant to be used and improves productivity. But how about the mouse situation? I feel like it's drag me down.
I'm a beginner so I'm always trying to use the CLI and recently installed the Vim motion extension on my VS code, man no more up and down arrows.
I think you insult me because I use window, but thank you for your advice dude
If you're a Windows user, I recommend using Powershell 7 with Windows terminal app. It runs Linux commands on Windows.
I use all of them but I am still not able to use web without mouse, any suggestions would be helpful. Thanks