Live data from Hacker News

A single line of code cost $8000

pietrasiak.com

71–80 of 423 posts

Re: A single line of code cost $8000

#72

Earlier quoted context omitted.

whyyy does wikipedia not redirect mobile links to the desktop website when you have a desktop UA?

Because people on desktops asking for the mobile site should be able to view the mobile site. The url specifically asks Wikipedia to serve the mobile site.

Well when I follow a desktop link on my phone, it redirects me to the mobile version, despite the URL specifically asking to serve the desktop site, it just doesn't work the other way around. Plus I never asked to see the mobile site, I followed a link someone else posted

Re: A single line of code cost $8000

#73
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)

yes obviously something as mature as the App store supports phased rollout. I believe it is even the default setting once you reach certain audience sizes. Updates are always spread over 7 days slowly increasing the numbers

Re: A single line of code cost $8000

#74
post #24

It would also be nice if the update archive wasn't 250MB. Sparkle framework supports delta updates, which can cut down the traffic considerably.

This is an electron app.

which is their design choice, not an obligation.

Electron really messed up a few things in this world

Re: A single line of code cost $8000

#77

Bugs are great chances to learn. What might be fun is figuring out all the ways this bug could have been avoided. Another way to avoid this problem would have been using a form of “content addressable storage”. For those who are new, this is just a fancy way of saying make sure to store/distribute the hash (ex. Sha256) of what you’re distributing and store it on disk in a way that content can be effectively deduplica…

> out all the ways this bug could have been avoided. The most obvious one is setting up billing alerts. Past a certain level of complexity, you're often better off focusing on mitigation that trying to avoid every instance of a certain kind of error.

Note that billing alerts protect against unexpected network traffic, not directly against bugs and bad design in the software. Update checking remains a terrible idea.

Re: A single line of code cost $8000

#78
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.

In the previous year 2023 discussion, the founder says that the update interval was changed to 3 hours. lol. see https://news.ycombinator.com/item?id=35873727

If the update interval had been 1 day+, they probably wouldn't have noticed after one month when they had a 5 minute update check interval.

Re: A single line of code cost $8000

#79
post #13

I am always kind of a stickler about code reviews. I once had a manager tell me that I should leave more to QA with an offhand comment along the lines of "what is the worst that could happen" to which I replied without missing a beat "We all lose our jobs. We are always one bad line of code away from losing our jobs" The number of times I have caught junior or even experienced devs writing potential PII leaks is abso…

...And if there's no one around to review the code?

The website makes it seem like it's a one person shop.

Re: A single line of code cost $8000

#80
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.

And if it is necessary, the proper way to do this is via DNS with a record with a TTL less than 5 minutes, not pinging some webserver.

This could have easily been avoided by prompting the user for an update, not silently downloading it in the background... over and over.

Post reply on HN