top | item 5428647

(no title)

benhalllondon | 13 years ago

Great, excellent, fun.

But, clearly, it should run 'ls' after doing its choo choo?

discuss

order

cliffbean|13 years ago

That is optimizing for the short term. "When I've run sl, I clearly wanted ls, so you should give me that (even if you also punish me)."

Optimizing for the long term is also plausible. "Don't reward me for making mistakes (even if you also punish me) because it'll dilute my muscle-memory training, and I'll be more likely to make mistakes in the future."

Neither of these is inherently more correct than the other. The long term has more uncertainty, but greater potential rewards. We just have to make a judgment call.

I tend to favor the long-term approach for sl. I can't easily quantify how valuable my stricter muscle-memory training will be, but I can imagine the possibility of a significant upside if I actually become a more precise typer. Also, the worst-case downside just isn't that bad -- retyping ls just isn't that hard.

rmk2|13 years ago

Well, this forces you to type 'ls' again, giving you another chance to see the awesome locomotive! ;)

philwelch|13 years ago

The Unix philosophy is that a program should only do one thing. sl only does one thing.

minos|13 years ago

One could use a shell alias, a function or something similar for that.

ricket|13 years ago

alias sl='sl;ls'