4 ms·
I’ve written shortcut code like this for at least 20 years. Mostly for fun and to mock up quicker. The article was a fun thing not a style guide. I prob wouldn
by dpweb 6y ago
I’ve written shortcut code like this for at least 20 years. Mostly for fun and to mock up quicker. The article was a fun thing not a style guide.
I prob wouldn’t on a major project but only because there’s negligible cost savings.
I find the browser arguments (no pun intended) kinda weak. You can test on a couple platforms and have 100% of an internal corporate environment and 99% of the public internet user agents covered.
All programming is choices and opportunity cost. We make decisions based on maxing the value/cost equation. It may make sense for me to cover 99% of user agents and say screw the 1% if my cost benefit warrants it.
- mewpmewp2 6y agoI agree on the purpose that I dislike it when people tout golden good practice rules and how you should always follow them no matter what. I like the approach where I follow best practices situationally and what I consider to be least amount of time spent for getting most value. It does not mean I won't follow best practices for critical systems. If anything, this lets me understand better why there is a best practice for something compared to blindly following them no matter what. For instance I might run into issues when I don't follow them for low critical systems.