Hacker News new | ask | show | jobs
by lobotryas 4891 days ago
>Don't like it - don't use it.

This is a false dilemma and completely misses the point. The replace library was written by a person who either never heard of or never learned how to use SED. Just because they created their own hack as a workaround doesn't mean it's the right thing to do.

8 comments

Why would you assume that, because they wrote an alternative to an existing tool, they don't know how to use it? Perhaps she just doesn't like sed, or would like to use the replace functionality in an environment where it's not clear ahead of time whether GNU or BSD sed are available. Or any of a number of reasons. Your assumption that she must be ignorant to have created her own solution is just as boorish as the original tweets, imo. Was tmux written by a person who had "either never heard of or never learned how to use" GNU screen? What about GNU itself? Why bother when UNIX already exists? People have lots of reasons for writing software, and deciding for them whether it's "the right thing to do" because some other software already exists is absurd.
Just because it does something that you like to do a different way, doesn't mean it is hurting anyone for someone to write it.

By this logic, there is no way for beginners to write much of anything since there are existing implementations of almost any idea, and it should be disallowed ever to make a new thing which could replace any old thing.

If you take a look at the readme, the first commit back in 2011 says this:

"It's similar to sed but there are a few differences:" and then goes along to list out the differences.

I would expect this person to 1) have heard of and 2) have learned to use sed in order to write a tool that is similar but has slight differences in syntax to sed.

There is no wrong thing to do when writing tools for personal productivity, as OP clearly stated. If it works, it works. If they decide to open source it, that's great. Maybe someone has use for it. The end.
If a program is nontrivial to learn and use (as the sed examples shown in mrb's post illustrate) then a good solution is to make a better, more easily usable tool tan sed.

As for editors - there is a niche for emacs and there is a niche for notepad. If a program is weaker on some aspects but clearly superior in another aspect, then it has a valid niche and making it really is the 'right thing to do'. Usability/discoverability is a very important aspect of software, and sed is a bit lacking there.

> Just because they created their own hack as a workaround doesn't mean it's the right thing to do.

Are you honestly at HackerNews posting that someone hacking together some code to scratch their own itch is not "the right thing to do"?

Right is arbitrary.
Please don't follow up a false dilemma with circular reasoning.