Live data from Hacker News

You Don't Need a GUI

github.com

31–40 of 439 posts

Re: You Don't Need a GUI

#31

I’d argue that if you’re using an ncurses based UI, you no longer have a command line interface, and you’re not scriptable anymore. Which is fine of course, but what you really have at that point is a rather ugly and limited GUI...

Something like Vim still benefits from the composability of the command line interface. I can write and read buffers to/from other processes, asynchronously run commands and pipe the output into Vim, and of course I can always put Vim in the background at any time which immediately drops me into my shell, where I have complete and full access to the entirety of the machine.

These are the main reasons I stick with terminal based editors over something like VS Code with Vim bindings. Using a separate GUI breaks that deep integration with the shell, which for me just creates too much friction for not enough benefit.

Re: You Don't Need a GUI

#32
post #9

This is terrific. But... GUIs support the concept of undo. It would be great if all shells indicated the command to undo what you just did, and you could turn off that warning message with an environment variable. And, almost none of these work in the Windows command prompt. I've tried powershell and while there are some great ideas, nothing behaves as I would expect after using bash for 20+ years. These are the reas…

Undoing isn’t a feature of a GUI though, but rather running in a context that maintains history/state. There’s no reason a command line program couldn’t do something like this in theory.

No need to be abstract and think of “theory”. Vim for example has undo.

Re: You Don't Need a GUI

#33
post #5

Most the things in this list are things that you technically don't need a GUI for, but a GUI is so much better that doing it in command line is pointless. For instance, you could do all those file operations in the terminal, but chances are you're already browsing files using a GUI file manager so opening a terminal to do those things is pointless. Terminal is great if you want to do something complicated that a GUI…

No kidding. I laughed at this part: "STOP DOUBLE CLICKING ON A FILE " "Instead type '$ xdg-open file'"

Yeah, because that's way faster and more convenient than double clicking on an icon.

This one is great too: Don't open the file explorer! Instead you should type "find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"

Seriously?

Re: You Don't Need a GUI

#34
post #22
post #5

Most the things in this list are things that you technically don't need a GUI for, but a GUI is so much better that doing it in command line is pointless. For instance, you could do all those file operations in the terminal, but chances are you're already browsing files using a GUI file manager so opening a terminal to do those things is pointless. Terminal is great if you want to do something complicated that a GUI…

I do most file operations in a terminal because I can switch between my editor and the terminal without picking up the mouse. I do use a file manager to organize media files.

The mouse is not a requisite for a GUI file manager

Re: You Don't Need a GUI

#35
post #25
post #5

Most the things in this list are things that you technically don't need a GUI for, but a GUI is so much better that doing it in command line is pointless. For instance, you could do all those file operations in the terminal, but chances are you're already browsing files using a GUI file manager so opening a terminal to do those things is pointless. Terminal is great if you want to do something complicated that a GUI…

Different people will draw the line in different places. Take your example of file management: since I'm usually in a terminal, it takes far less effort to enter a command than it does to open up a graphical file manager and navigate to the desired directories. The other issue is that few file managers are as powerful as command line utilities. There are exceptions. I am quite fond of Directory Opus while using Windo…

Mac: open $dir

Linux (whatever env provides this): xdg-open $dir

Re: You Don't Need a GUI

#36

You need a GUI. The user experience of GUIs are superior to CLIs in discoverability, consistency, etc... The only reason CLIs are still useful is because we still haven’t found a way to compose GUI applications well. We still can’t automate GUI applications, use the result of one app from another app etc... But that’s not something inherent to the GUI paradigm.

I think it is, which is why it hasn't happened. We shouldn't couple ourselves to the GUI itself (widgets, layouts, etc.). When you decouple the data and core operations from the presentation, you get APIs. Slap a flag parser around those and you've got yourself a CLI. (PowerShell is an interesting case study here too.)

Re: You Don't Need a GUI

#37
post #4

Earlier quoted context omitted.

Oddly enough, even in the Windows world, I'm seeing more and more instructions for things like installing a software app or component, as a list of commands that you enter into the shell or the taskbar search box. Installation instructions for Windows are horrifying -- page after page of pictures, with circles and arrows and a paragraph... And when the OS is updated, all of the dialog layouts and icons change just a…

Even worse is the more recent trend of Youtube videos showing you how to do something on your computer. "OK, GUYS! We're going to start at the desktop. Now click on Start..." Watch someone moving their mouse around for 20 minutes, making mistakes, backtracking, hovering over things so they remember what to do, then finally achieving what the tutorial was about. Ending the video with "Don't forget to like and subscrib…

> This could have been a single command line command.

... that you could have copied and pasted.

When it comes to technical support on Linux, few people seem to realize how much easier it is to provide support with a handful of shell commands. Describing how to do things in a GUI usually involves awkward descriptions, multiple screenshots, or a video demonstration. Actual support involves doing all of that in both directions (or having someone else log into your machine to do that for you). With a terminal, you're just copying and pasting text.

Re: You Don't Need a GUI

#38

GUI is better for discoverability of the most common scenarios (I can right-click to see everything that can be done with the file, including some third party programs). But it's bad for composing programs and interoperability, often it's impossible or very hard to automate (how many people are doing UI testing? there is a good reason it's not many -- it completely sucks) TUI/console is very good for interoperability…

A fair part of what I do includes ERP implementation project work. Way back, when TUI/keyboard centric ERP system dominance was starting to give way to GUI/mouse centric ERP systems, I was working with one client where replacing a TUI with GUI based system. One measure we made during the project was the impact to new employee training time and we saw significant reductions in training time due to the sorts of discove…

Have you looked into pgcli, psql is great but pgcli is a little nicer.

https://www.pgcli.com/

Re: You Don't Need a GUI

#39
post #9

This is terrific. But... GUIs support the concept of undo. It would be great if all shells indicated the command to undo what you just did, and you could turn off that warning message with an environment variable. And, almost none of these work in the Windows command prompt. I've tried powershell and while there are some great ideas, nothing behaves as I would expect after using bash for 20+ years. These are the reas…

Undoing isn’t a feature of a GUI though, but rather running in a context that maintains history/state. There’s no reason a command line program couldn’t do something like this in theory.

It's been 50 years.

Why doesn't bash in a friendly system like Ubuntu have undo for mv.

Re: You Don't Need a GUI

#40

GUI is better for discoverability of the most common scenarios (I can right-click to see everything that can be done with the file, including some third party programs). But it's bad for composing programs and interoperability, often it's impossible or very hard to automate (how many people are doing UI testing? there is a good reason it's not many -- it completely sucks) TUI/console is very good for interoperability…

> I can right-click to see everything that can be done with the file, including some third party programs

Smart move by (for instance) Microsoft when they did that in Windows 95 and continued it til now. You could theoretically design the same functionality into a text user interface. Like if you type the name of something (a filename) and hit enter (or maybe tab? space? Whatever the designer comes up with) it could give you a menu to choose from context specific commands. It would seem pretty natural in that case if you are using post-fix (arguments(s) and then commands, like in Forth). Maybe something already exists like that.

Post reply on HN