3 ms·
I feel like interacting with there real world, and with users in particular, just inevitably leads to orders of magnitude more complexity. You can see that eve
by ertian 6y ago
I feel like interacting with there real world, and with users in particular, just inevitably leads to orders of magnitude more complexity.
You can see that even in simple cases. Writing a basic single-propose script is trivial; it may end up being just a line or two. As soon as you decide to make it general and reusable, though, complexity explodes: positional arguments are confusing, better name them. Users are gonna expect a familiar format. Need a library for that. Reasonable and understandable names are tricky! What arguments are required versus optional? What if _this_ option is specified without _that_ one? Gotta add proper errors for every bad state! What if the user starts using globbing? Or wants to specify multiple inputs and one output, or vice versa?
Your three-line script is now 100+ lines. And you're not even worried about hostile or abusive users yet!
Writing code for the web is all that--and much more besides.