3 ms·
> You know what else doesn’t have unbounded loops? Excel. Right, one of the many reasons why nobody (with half a brain) hosts a web server in Excel. I wonder
by yongjik 5y ago
> You know what else doesn’t have unbounded loops? Excel.
Right, one of the many reasons why nobody (with half a brain) hosts a web server in Excel.
I wonder how much "boring web app" experience the author had. If I'm debugging on 11 pm why the webserver is timing out talking to microservice A, but only if it first opened connection to service B, and someone strolls along saying "Hey, your code is bad because it's using unbounded computation," then god help us, because I might lose it. (Well, shrug, the worst that can happen is that I may rage-quit on the spot. I'm not a very imposing guy.)
- mhh__ 5y agoThat's why you want to start thinking macro and holding your code to a high standard early. You can, for the most part, avoid firefighting if you don't let things fester. If you're in charge, that is...
- yongjik 5y agoWell, sure, you're absolutely right that it's best to write high-quality code so that you avoid firefighting in the first place. But that's an orthogonal question to whether the number of while loops is relevant to code quality. Most programs (or even subtasks) aren't Turing machines - they are "unbounded" in that they're supposed to run indefinitely until someone tells them to quit, or until they abruptly hit EOF, end of stream, whatever. You don't improve such logic by making them "bounded" - it will be in fact missing the point. * If you prefer, change 11 pm to 11 am and my point still stands (though I'll be less cranky and less likely to rage-quit).
- q-rews 5y agoCongrats on insulting someone you don’t know because he made a valid point without saying anything about the point they made. They love linters, you sound like you hate linters. Don’t use them and let your colleagues deal with your unbounded computation.
- deleted 5y ago[deleted]