Live data from Hacker News

A single line of code cost $8000

pietrasiak.com

41–50 of 423 posts

Re: A single line of code cost $8000

#41
post #11

I would also put into question if you _really_ need to check for updates every 5 minutes. Once per startup is already enough, and if you're concerned about users who leave it on for days, it could easily be daily or even less often.

To be as user friendly as possible, always ask if user wants automatic background updates or not. If you can’t update without user noticing it, please implement manual updates as two mechanisms:

1) Emergency update for remote exploit fixes only

2) Regular updates

The emergency update can show a popup, but only once. It should explain the security risk. But allow user to decline, as you should never interrupt work in progress. After decline leave an always visible small warning banner in the app until approved.

The regular update should never popup, only show a very mild update reminder that is NOT always visible, instead behind a menu that is frequently used. Do not show notification badges, they frustrate people with inbox type 0 condition.

This is the most user friendly way of suggesting manual updates.

You have to understand, if user has 30 pieces of software, they have to update every day of the month. That is not a good overall user experience.

Re: A single line of code cost $8000

#42
> Screen Studio is a screen recorder for macOS. It is desktop app. It means we need some auto-updater to allow users to install the latest app version easily.

No, it doesn't mean that.

Auto updater introduced series of bad outcomes.

- Downloading update without consent, causing traffic for client.

- Not only that, the download keeps repeating itself every 5 minutes? You did at least detect whether user is on metered connection, right... ?

- A bug where update popup interrupts flow

- A popup is a bad thing on itself you do to your users. I think it is OK when closing the app and let the rest be done in background.

- Some people actually pay attention to outgoing connections apps make and even a simple update check every 5 minutes is excessive. Why even do it while app is running? Do on startup and ask on close. Again some complexity: Assume you're not on network, do it in background and don't bother retrying much.

- Additional complexity for app that caused all of the above. And it came with a price tag to developer.

Wouldn't app store be perfect way to handle updates in this case to offload the complexity there?

Re: A single line of code cost $8000

#43
post #11

I would also put into question if you _really_ need to check for updates every 5 minutes. Once per startup is already enough, and if you're concerned about users who leave it on for days, it could easily be daily or even less often.

IIRC, Every 5 minutes used to be the standard interval between email checks, back in the days of dialup and desktop email clients. How the times have changed ..

And because how expensive they were in Portugal, I never done it, it was always on manual.

Re: A single line of code cost $8000

#44
post #42

> Screen Studio is a screen recorder for macOS. It is desktop app. It means we need some auto-updater to allow users to install the latest app version easily. No, it doesn't mean that. Auto updater introduced series of bad outcomes. - Downloading update without consent, causing traffic for client. - Not only that, the download keeps repeating itself every 5 minutes? You did at least detect whether user is on metered…

Does the app store handle staged rollouts?

That was a thing I thought was missing from this writeup. Ideally you only roll up the update to a small percent of users. You then check to see if anything broke (no idea how long to wait, 1 day?). Then you increase the percent a little more (say, 1% to 5%) and wait a day again and check. Finally you update everyone (who has updates on)

Re: A single line of code cost $8000

#45
post #7

Just amazed that ‘better testing’ isn’t one of the takeaways in the summary. Just amazed. Yea ‘write code carefully’ as if suggesting that’ll fix it is a rookie mistake. So so frustrating when developers treat user machines like their test bed!

Contrarian approach: $8000 is not a lot in this context. What did the CEO think of this? Most of the time it is just a very small speed bump in the overall finances of the company.

Avoidable, unfortunate, but the cost of slowing down development progress e.g. 10% is much higher.

But agree that senior gatekeepers should know by heart some places where review needs to be extra careful. Like security pitfalls, exponential fallback of error handling, and yeah, probably this.

Re: A single line of code cost $8000

#48
post #7

Just amazed that ‘better testing’ isn’t one of the takeaways in the summary. Just amazed. Yea ‘write code carefully’ as if suggesting that’ll fix it is a rookie mistake. So so frustrating when developers treat user machines like their test bed!

How do you adjust your testing approach to catch cases like this? In my experience, timing related issues are hard to catch and can linger for years unnoticed.

Re: A single line of code cost $8000

#49
post #11

I would also put into question if you _really_ need to check for updates every 5 minutes. Once per startup is already enough, and if you're concerned about users who leave it on for days, it could easily be daily or even less often.

Depends on the application. I have my browser running for months at a time.
Post reply on HN