Why you should avoid clicking buttons
GUI buttons are a nice convenience at beginner skill levels. As your skill level increases, their utility will quickly plateau. If you plan to spend a considerable amount of time programming, there are good reasons to learn how to operate your development setup without clicking a lot of GUI buttons.
I am not a mouseless extremist. I still use the mouse. But for repeated or error-prone actions, the keyboard is preferable.
I’ll use the “Run Code” button in VSCode as a running example:
Buttons are often limited wrappers around more powerful tools
The “Run Code” button in VSCode is basically just a wrapper that opens a shell and runs:
``` bash
path-to-your-python-interpreter path-to-the-current-python-file.py
```
If you want to pass other arguments to the Python interpreter in the CLI, it’s easy. Just type them in. When you do this, the customizations are portable. You can use them anywhere you have a Python interpreter.
If you want to customize them through VSCode, you have to click around to find out how (relying on VSCode and Python to be well-documented instead of just Python), and they are only portable to other situations where you are working in VSCode.
You don’t know what VSCode is doing under the hood, and finding out is sometimes difficult.
When you hit Run Code, which python interpreter does VSCode use? How would you go about finding out? I spoiled it with the previous section, but it’s not always easy to find out what a button is actually doing.
The machinery behind other buttons is even more obscure.
Button workflows are annoying to troubleshoot.
You can very easily copy-paste the shell commands you ran and send them to me, or to your TAs, or to an AI Chatbot, post them on StackOverflow, etc. It’s much harder to communicate via screenshots.
Debugging often involves running the same series of commands several times, with minor variations to a single step or some other part of the programming environment. Doing this with buttons requires you to relocate the buttons every time.
Experts are more inclined to help you use a programmatic interface.
The last point counts twice — when you need help troubleshooting from experts (who themselves use the CLI), they will be more inclined to help you if you use the CLI.
Many of the best programmers I know have no idea what many of the buttons in VSCode do. Some might not know they exist.
Buttons make automation hard.
Yes, CLI commands can be kind of tedious.
The good news is that they are relatively easy to automate. You can write aliases, or write shell scripts that string together common sequences of commands. If you do this, your automation is portable — it does not depend on any particular editor, just a shell environment. The ceiling on this kind of automation is high. You’re bounded by what you can program, not by what the buttons offer.
By contrast, you can automate clicking buttons in VSCode by writing an extension, but in some instances this is harder than writing a shell script, and your solution is tied to a specific editor.