Hacker News new | ask | show | jobs
by jwmcq 998 days ago
Odd choice of words. I'd say that perl, awk, regex etc are great ergonomic tools - if anything too ergonomic. The main problem with them - and the probable source of their bad reputations - is that the ease and comfort (the 'ergonomics') of just cobbling something together something that works and then throwing it out there does not encourage good engineering practices.

Do I need good engineering practices in my day-to-day text editing? Mostly not for what I do myself, but I'm grateful that the maintainers of the emacs packages I use have better tools to work with.

1 comments

> something together something that works

or something that works... sometimes, and is indecipherable, so all the "ergonomics" of the initial cobbling phase disappears to reveal how unergonomic this really is

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.

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