A single line of code cost $8000
11–20 of 423 posts
Re: A single line of code cost $8000
#12What 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 deduplicated by name.
It’s probably not so easy as to make it a rule, but most of the time, an update download should probably do this
Re: A single line of code cost $8000
#13The number of times I have caught junior or even experienced devs writing potential PII leaks is absolutely wild. It's just crazy easy in most systems to open yourself up to potential legal issues.
Re: A single line of code cost $8000
#14I 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.
How the times have changed ..
Re: A single line of code cost $8000
#15Ever consider not using cloud for everything? Hosting this on traditional hosting would have limited the problem and the cost.
Re: A single line of code cost $8000
#16The author seemed to enjoy calculating the massive bandwidth numbers, but didn’t stop to question whether 5 minutes was a totally ridiculous.
Re: A single line of code cost $8000
#17I 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.
Re: A single line of code cost $8000
#18Previous discussion: https://news.ycombinator.com/item?id=35858778
Re: A single line of code cost $8000
#19I 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.
Re: A single line of code cost $8000
#20Bugs 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…
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.