Live data from Hacker News

Good Tools Are Invisible

gingerbill.org

291–300 of 305 posts

Re: Good Tools Are Invisible

#291
post #85

Earlier quoted context omitted.

People don't use vim because they enjoy puzzle solving. I don't even know how you got this conception. People use vim because they are effective at editing with vim, period, just like you are effective with Sublime Text. People don't use Linux because they enjoy tweaking config files and everybody else has too busy a life to do that. That's a silly misconception and veiled attempt at feeling superior at those time-wa…

> People don't use vim because they enjoy puzzle solving. I didn't say that either nor even imply it, and you know that when you quote me afterwards. So huh?!?! > People don't use Linux because they enjoy tweaking config files and everybody else has too busy a life to do that. A lot of people, including younger myself, got into Linux and Android BECAUSE it was configurable and customizable. And even played around wit…

> I didn't say that either nor even imply it, and you know that when you quote me afterwards.

You come across that way when you describe your interactions with Vim users talking about how they use macros. (Which, incidentally, doesn't match my experience at all.) More importantly, your comparison of "Vim users do this with macros" to "I could do this with (proper) multiple cursors" doesn't seem apt.

Perhaps it could possibly make sense if we had at least one concrete example of "this"; but the most obvious thing to do with multiple cursors is patterned editing of multiple matching text fragments, and Vim users would (or I would, at least) normally do that with a /g regex. To the extent that macro is useful, it's because multiple changes are done (such that the dot command wouldn't help), and if that's too complex to do easily with regex then I can't imagine that the simultaneous changes with multiple cursors could actually get it right anyway.

More importantly, though: the real point of a macro is that, having recorded it, you can persist it even across editing sessions. You also mentioned the possibility of writing a script; a macro is that, just in a very small, focused language.

> A lot of people, including younger myself, got into Linux and Android BECAUSE it was configurable and customizable. And even played around with all of the customizations because it was fun to do. But it didn't really make my general experience better because I was forever trying to correct something I should have to correct in the first place.

This doesn't match my experience at all. I play around with customizations because I understand that the default couldn't possibly have anticipated what I wanted. But more importantly: I use multiple user accounts on my system (all for myself; I did this on Windows too) and what I appreciate about Linux is that I can duplicate configuration files instead of having to navigate through UIs again and click a ton of options (perhaps following notes on what to click; I never descended to the AutoHotKey level of madness, though).

Re: Good Tools Are Invisible

#292
post #274
post #232

Earlier quoted context omitted.

You can be less of a coward and reply to my comment, since you are talking about me personally, rather than mentioning me by name elsewhere. gingerBill and I were disagreeing, sure, but at least we were arguing on topic. I fail to see what is insightful about your comment than just pointing and saying 'get a load of this guy.' Thanks for your input, you can take a seat now.

I wasn't talking to you. Flagged.

Casting aspersions at others behind their back, and then claiming "I wasn't talking to you" when called out for it, is not a productive or civil mode of discourse. Please don't.

Re: Good Tools Are Invisible

#293
post #288

Earlier quoted context omitted.

> a class of user who enjoys learning all of these “extra” features, even though they ultimately provide less value than the core features. I don't think this was actually established. The author may have a point about the UX of multiple cursors in Sublime, but comparing that to Vim macros is missing the point of the macro system — i.e. that you can create something that persists between editing sessions, and encapsu…

Yeah I think this is all coming from someone who never got good at vim. Multi-cursors can be nice, but a sufficiently powerful implementation of that looks like helix or kakoune, and those are at least as complex as vim, if not more. When you're good at vim, it is invisible. Once you're good at writing macros, you can do stuff which is impossible with Sublime-style multi cursors. I assume those are situations where t…

> but vim macros are an interactive scripting language specifically designed to tersely express text transformations

Yes, I think this is important here. Although it's still hard for me to imagine a level of mastery where one deliberately "writes" macros (what, directly in the vimrc?) as opposed to recording them. Perhaps it's within my grasp to optimize them later, but.

All that said, there are quite a few things I don't like about Vim even though the overall editing model clicks with me, and ideas I've had for something I'd like better. Although I guess I really should check out alternatives before running my mouth about that…

Re: Good Tools Are Invisible

#294

Well this is a take. It’s weird how much the author fixates on Vim being “visible” and implies multiple cursors and features in Sublime aren’t. Just because your brain is trained to not think about it anymore doesn’t make it any less visible. Multiple cursors aren’t a native feature in many tools, it is still something to learn how to use, let alone effectively — just as Vim key bindings are. Plus, vim is more than j…

That's not what I was saying. I used vim macros specifically as an example, not Vim as a whole. > I’ve had people tell me how “fun” it was to build a macro to handle some one-off text-refactoring problem. But when I looked at what they were doing and how long it took, my honest reaction was: I could have done that in Sublime in a minute with multiple cursors, or just written a quick script. and > What baffles me is t…

> I’ve had people tell me how “fun” it was to build a macro to handle some one-off text-refactoring problem.

I can't relate, either as a Vim user myself or having heard other users.

To the extent that it happens, it's surely because the macro can be seen as a sort of programming. Vim offers you two esoteric programming languages, if you want to see them that way: vimscript obviously, and the simple concatenation of Vim commands. But any system consisting of a text editor plus a way to record and play back its commands gives you the latter. Vim isn't doing anything special to create that second esolang; it's just bundling the playback mechanism.

But that rather is the point: creating the macro is as much "scripting" as actually using vimscript is. Not only is it recorded in an at-register, but it can be stored as plain text in a vimrc file. It should be compared to "written a quick script" and not to "used multiple cursors"; and any sensible Vim user would have a different approach (commonly powered by :%s/foo/bar/g , perhaps with backreferences) to the cases where Sublime's multiple cursors shine. (Yes, you can use visual-block across multiple lines if everything lines up; and yes, it's inferior to a real multiple-cursor system; and no, I don't think I've ever personally had a use case for it.)

There are people who reach a level of proficiency where they enjoy the challenge of an intentionally difficult to use programming language. Vim macros are accidentally a programming language, and definitely not intentionally difficult. And using them to "handle some one-off text-refactoring problem" is entirely missing the point, and a sign that one has more room to grow in proficiency and a lot more room in wisdom.

In short, the people you've heard this from should not at all be taken as representative of Vim users.

Re: Good Tools Are Invisible

#295

Earlier quoted context omitted.

I don't think I've ever had to rename 20 files at once, so I wonder if the way people work is kind of shaped by their tools?

I've had to batch-rename files many times over the years. That means: 1. I do it manually over however many minutes. Works if there aren't too many (especially if the pattern is too complex to trivially automate). 2. I make a Python script for it. No way I'm renaming a thousand files by hand. 3. I don't do it. Too much work. The problem lingers forever. Or these days, 4. I make an AI datacenter eat another town's wat…

> I'd love a way that isn't miserable to do such a common basic task.

The problem is that you actually describe a family of tasks which is not basic. The "iterate over files, select the right ones and apply rules to rename them" part is common; the problem is that the rules vary broadly in kind and complexity, and you haven't figured out how you want to specify them (some ways will be limited in the complexity they can handle.

(Usually the selection of files is trivial; when not, we can fold that complexity into the change rules, and emit null changes in some cases.)

If your selection rule is simple enough for Bash globbing, and your per-file rename rule is simple enough for, say `tr` to handle, then that's trivial to wrap up as a Bash script (or function). In fact, you could write the Python script such that it just accepts a single input filename and outputs the changed version, and handle the rest externally.

> I've never used Emacs. I tried vi(m) nonconsensually and had to google how to exit. A while later, I tried it intentionally and hkjl navigation didn't work because I use a custom keyboard layout, so I never touched it again. Sublime Text and its many cursors for the win!

I'm not really clear on how text editors are supposed to be relevant to batch file renaming. If trying vi(m) the first time wasn't your idea, then there should have been someone else around responsible for guiding you through it. But the variations I've tried had arrow-key navigation configured by default (and `vimtutor` explicitly tells you that it should also work); you really don't have to learn hjkl, which exists largely for a combination of historical reasons with a lot of back-filled justifications. (I would have used ijkl, mimicking an arrow-key layout.) And everything can be remapped in the config files.

Re: Good Tools Are Invisible

#296
post #285
post #240

Earlier quoted context omitted.

That's a weird thing to say. GUI slows down me A LOT when I sometimes have to switch to it from my terminal for whatever reason. Where did you get your "absolutely no one" data point?

You should read again what I said. Do you think that simply using GUIs makes anyone less productive? You can’t think of any cases where a GUI is definitely better for a task than a terminal? If you think that , consider why the vast majority of people are using GUIs for everything, and only a tiny minority is using terminals for everything. It’s ridiculous, yes, to imagine you would be more productive if no GUIs exis…

I reread your original comment. It would have been better if you had included those small details that, for some reason, you left out. In my opinion, you simply failed to get your point across.

Anyway, my point stands. "Absolutely no one" without any context makes no sense whatsoever. There are a number of tasks that are much, much more efficient to perform in the terminal than in a graphical interface. So no, I didn't misunderstand your point - you're just wrong.

> any cases where a GUI is definitely better

Sure I can. Not all of them are though. So be careful with exaggerations.

Re: Good Tools Are Invisible

#297
post #62

Earlier quoted context omitted.

> By this logic a person who were comfortable with mouse should never grow to like VIM. Quite the opposite, my argument is that habits are changeable. > Fundamentally a computer is something that execute instructions. It is pretty poor interface to pick instructions from 100 options using a mouse as opposed to type it using a keyboard. A mouse hides the power of the computer behind a set of fixed clickable options. T…

Picking from 100 options is what the mouse is best for. Keyboards require learning so they are best for the options you do often enough to learn. I know about 10 different vi commands of the hundreds. There is more than selecting options. Selecting text is normally better with a mouse.

>Keyboards require learning

We are not talking about keyboard shortcuts (key combinations that you press to do something) by the way, and about the actual typing of commands in the terminal/shell/repl what ever...

Re: Good Tools Are Invisible

#298

What is a good tool that's invisible? I'm genuinely curious. All tools I've used are either simple and heavily limited (so, not "invisible" because hard things are hard) or powerful but heavily specialized (so, not "invisible" because the learning curve is very evident). I feel the trade off is inescapable.

A good tool is invisible such that it is highly opinionated and nails the 80, 90, 99% use cases in terms of making assumptions regarding logical defaults.

Restated, the tool understands the process and what a “good” result/outcome looks like. It correctly presumes relevant and important information (especially given the current stage of your full task), and can “fill the gaps” between start and finish.

A good tool can distinguish between what you wanted, what you thought you wanted, and what you “should have” wanted.

A good tool makes it easy to do the “right” thing and hard to do the “wrong” thing.

A good tool doesn’t function to be understood, but to not be misunderstood.

I have spent a lot of time sitting in this question, having spent years creating design and drafting automation tools for architects, designers, and engineers in the building-design industry.

Re: Good Tools Are Invisible

#299
post #284

Earlier quoted context omitted.

No! Rename in JSP is not intelligent enough to match an interface name with its implementation names and decide whether to also rename those!

What do you mean by "implementation names"? I assumed you meant changing the "implements X", which should be easy for an LSP.

Java implementations sometimes take part of the name from the interface they implement, for example, `FooRunner` probably implements `Runner`. My example was that I renamed `Runner` to whatever, `Executor`, and IntelliJ will ask me if I want to rename also implementations (in this case, it would show `FooRunner` -> `FooExecutor`).

Re: Good Tools Are Invisible

#300

Earlier quoted context omitted.

I don't think I've ever had to rename 20 files at once, so I wonder if the way people work is kind of shaped by their tools?

I've had to batch-rename files many times over the years. That means: 1. I do it manually over however many minutes. Works if there aren't too many (especially if the pattern is too complex to trivially automate). 2. I make a Python script for it. No way I'm renaming a thousand files by hand. 3. I don't do it. Too much work. The problem lingers forever. Or these days, 4. I make an AI datacenter eat another town's wat…

Try vidir from moreutils (or its improved version, https://github.com/bulletmark/edir ).

It opens the list of filenames in a given directory (or set of files passed on cmdline) in an editor of your choice, and then you use your editor to rename them; the changes get applied when your editor is closed.

Post reply on HN