4 ms·
A philosophical question: how does the author reconcile his source code being full of ".js" files and saying "lightweight" with a straight face? . And a more
by dmitrygr 9y ago
A philosophical question: how does the author reconcile his source code being full of ".js" files and saying "lightweight" with a straight face?
.
And a more practical one: do they not teach people about how power management works anymore? Who thinks this is a good idea...?
Refreshes the cache every 15 minutes (use INTERVAL environment value for custom number of minutes - more)
Do you update your app every 15 minutes? And are you presumptuous enough to assume your users need each update immediately? Maybe you simply just not care for users' devices' battery lives? If you really insist on the NIH approach to updates, check at app launch time, or once every 24 hours at most for long-running apps..
and then
Automatically detects the platform/OS of the visitor by parsing the user agent
When did it become OK to trust user agent strings for feature or device detection?
- r1ch 9y agoAs far as I understand it the cache is a server-side thing, so the update server is polling github every 15 minutes, not the Electron app.
- dmitrygr 9y agoif it runs remotely, then why doesn’t the app just pull from github directly. why an intermediary? something doesn't add up
- mcbits 9y agoIf your app ever gets popular and causes unreasonable traffic to your GitHub repo, or if GitHub decides they hate you for any other reason, your app will work only by GitHub's mercy and generosity.
- ux-app 9y ago> When did it become OK to trust user agent strings for feature or device detection? I never really understood the complaint against this. UA string detection is good enough 99.99% of the time and sure it's not trustworthy in the sense that the end user can mess with it, but so what? If the user is messing with the the string they know what they're doing.
- guessmyname 9y ago> UA string detection is good enough 99.99% of the time I don't believe you, show me the data to back up such assumption.
- ec109685 9y agoWhy would a browser lie?
- guessmyname 9y agoBecause of this — http://webaim.org/blog/user-agent-string-history/ http://webaim.org/blog/user-agent-string-history/
- ux-app 9y agomy own experience? I've been developing for the web for 19 years. I know the issues with UA strings. It's an old argument. On the modern web, for the most part UA sniffing isn't necessary. If you do need it, there are plenty of libraries that will very reliably sniff strings which account for 99.99% of the web. Possibly mobile strings are an issue, but there are services like http://wurfl.sourceforge.net/ http://wurfl.sourceforge.net/ which will again get you to your 99%+ range. Of course do all the other things like feature detection, graceful degradation and progressive enhancement, but I find the entire argument a bit overblown.
- ec109685 9y ago> Do you update your app every 15 minutes? And are you presumptuous enough to assume your users need each update immediately? I don't think you quite understand that this project is the server side, so the every 15 minute update frequency (which is user configurable) controls how often the server polls GitHub.
- TheAceOfHearts 9y agoApparently it's for the server-side component, but even then... Polling every 15 minutes seems like such overkill. He could register a webhook for ReleaseEvent [0]. To make the process fault-tolerant, he could also have a daily check. [0] https://developer.github.com/v3/activity/events/types/#releaseevent https://developer.github.com/v3/activity/events/types/#relea...