4 ms·
Great, excellent, fun. But, clearly, it should run 'ls' after doing its choo choo?
by benhalllondon 14y ago
Great, excellent, fun.
But, clearly, it should run 'ls' after doing its choo choo?
- rmk2 14y agoWell, this forces you to type 'ls' again, giving you another chance to see the awesome locomotive! ;)
- minos 14y agoOne could use a shell alias, a function or something similar for that.
- ricket 14y agoalias sl='sl;ls'
- cliffbean 14y agoThat 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.
- philwelch 14y agoThe Unix philosophy is that a program should only do one thing. sl only does one thing.