5 ms·
> but several apps refuse to work properly if "internet" isn't detected For me it's very bad code smell when the developers try to check some sort of a global
by dixie_land 4y ago
> but several apps refuse to work properly if "internet" isn't detected
For me it's very bad code smell when the developers try to check some sort of a global flag ("has internet") instead of just perform the action (eg send http request) and fail gracefully
- gregoryl 4y agoYou can mess around with that description to understand the reasoning. Why maintain code to duplicate functionality that is provided by the OS? Can I be more reliable than Microsoft?
- doodlesdev 4y ago> Can I be more reliable than Microsoft? Absolutely.
- PeterStuer 4y agoUnfortunatly the inverse is also true.
- account42 4y agoThe OP isn't asking those developers to duplicate the functionality but to remove it. It's entirely pointless for most applications and only breaks things when there is something wrong with the connection check itself - you still need to handle connection errors in either case.