4 ms·
Yesterday, I had to analyze some tabular data. Basically, I was given some CSVs and I had to return different CSVs derived from them. It was a lot of data, and
by jolmg 7y ago
Yesterday, I had to analyze some tabular data. Basically, I was given some CSVs and I had to return different CSVs derived from them. It was a lot of data, and what I had to do was a little complex. Took me a third to half a day.
Turns out the CSV files they gave me were wrong and pretty much unfixable. They'll have to create them again and I'll have to redo the work. Having done it in the terminal instead of a GUI allows me to simply re-execute my actions from my shell history, and do the same work in a few minutes.
Had I done this work in a GUI spreadsheet program, for example, ignoring the fact that it would probably freeze a lot on this amount of data, it would have basically meant redoing the same work by hand and take around the same amount of time. There is no history for GUI actions. I can't tell the computer to redo an arbitrary set of clicks and opening menus and dialogs and typing in fields that I did yesterday.
As another example, right now I'm monitoring the logs of a type of system running on all company branches, and I'm doing it with a simple:
for ip in "${ips[@]}"; do
ssh "$ip" 'tail -F path/to/log' | sed -u "s/^/$ip: /" &
done | tee combined.log
wait
Every time something new happens in any branch, I get a line about it, telling me what's up and where it happened. I can resize the terminal to any size; the whole of the screen realstate it occupies has only the information I need. I'm also simultaneously saving these log entries I'm monitoring for now.
The GUI version of this would be to install a graphics server on these servers and logging in with some remote desktop protocol to all of them at the same time. That's a lot of video feed streaming to my machine at once, in comparison to plain text. I guess I could set up the remote desktop windows in a grid and open some specialized file monitor GUI program (I don't know of any such equivalent to `tail -F`), and look at them separately. To save the logs, I guess I would have to record my desktop, producing a video file. Too bad I can't do much with it. I can't search the text that appears in it, like I could with the combined.log by grepping it.
GUIs rock when playing 3D games, editing images, watching video, etc, but they suck at pretty much everything that doesn't imply graphics. In my case, most things I do don't imply graphics, so living entirely in a terminal is a huge win for me.
- tenebrisalietum 7y agoI prefer GUIs, preferably multi-windowed, to navigate and organize/edit/maintain complex hierarchical structures like filesystems or things that fit that model. Drag-and-drop in this type of situation is very helpful.
- jolmg 7y agoI've found `find`, zsh's extended glob, and its autocomplete menus, brace expansion, and the various file related shell utilities to be so useful, GUI file managers seem so useless to me now.
- red75prime 7y agoAt least with GUI you can see what you are doing. `rm -rf ~ /useless` is much less likely. Bugs even in trivial one-liners are always possible.
- jolmg 7y agoYeah, you have a point. I've known people that type and execute potentially dangerous stuff without re-reading it or understanding what the command is supposed to do. I just read and make sure of what I'm about to execute when I'm working with potentially dangerous commands. I can't remember a time where I've done something as disastrous as your example. Then again, the same is possible with GUIs. People can select stuff without meaning to and deleting them without making sure of what they're doing.
- darkpuma 7y agoThis is one of those cases where danger is proportional to power.
- red75prime 7y agoSure. That's why I don't wield sledgehammer to swat a mosquito, so to speak. GUIs and TUIs have their place as well as command line programming.
- jolmg 7y agoI think a better analogy, though maybe not perfect, is a knife vs a tomato slicer[1]. Tomato slicers are safer, their features are more discoverable, and they're even easier to use, but they're bulky and less versatile. Having gotten comfortable with a knife, I like that it's easier to keep clean, takes up less space, has far more uses than slicing tomatoes, and doesn't require complicated mechanisms to adjust the width of slices. Knives are dangerous, yes, but I think most of us already easily handle that level of danger every day. [1] https://images-na.ssl-images-amazon.com/images/I/51g2vpaIPUL._SL500_AC_SS350_.jpg https://images-na.ssl-images-amazon.com/images/I/51g2vpaIPUL...
- firethief 7y agoI prefer a TUI to play video on the computer hooked up to my tv. The video is graphical of course, but the UI is good ol' mplayer in a tmux over ssh. Unlike every other media remote, when I need to type something I can use my tablet/laptop's decent input capability instead of pushing arrow keys on a remote to select a key on the TV's on-screen keyboard (the worst UI for anything I've ever had to deal with; other than my smart speaker with 6 buttons, 3 of which when accidentally touched seem to activate special modes in which no sound is produced and the meaning of the other buttons is changed, with the only feedback being the volume stripe emitting led patterns that I believe are a reference to Close Encounters, but don't get me started on that).