top | item 37604841

(no title)

jwmcq | 2 years ago

I feel you've missed my point - 'ergonomics' literally means 'efficiency and comfort', not 'future maintainability'. Regex does comfort. AWK does it. If you need to do a specific thing right now, and you know them, then those tools are about as good as it gets. I'm not denying that those solutions will be horrible to grow and maintain, but that wasn't your point - that's why I said your choice of saying they weren't "ergonomic" was a bit odd. They are. That's the problem.

Most of the custom text editing operations I do on a daily basis only need to work once. For that, a Regex is very 'ergonomic'. If I were writing an emacs package, I'd probably use something better - something less ergonomic, but easier to maintain.

As an aside, I used to work in a machine shop and we had a well-designed system of pneumatic tubes throughout the warehouse powering spartan steel-handled drills that would give me calluses but reliably get the same jobs done the same way every day. At home, for the odd job I need to do, I use a cheap lithium drill with a nice grippy handle. Sometimes the ergonomic option is better because, right now, I just don't need to buy a compressor and run tubes through my house.

discuss

order

eviks|2 years ago

There is no comfort in poorly readable regex that seems to work, but really doesn't with a subtle bug. And it's only efficient if you consider the time to write the bugged version, not the time to write the correct version

This isn't about future maintainability