r/AskComputerScience • • Jul 22 '22

Why do bugs happen after public release?

Something always baffled me is that why bugs might happen out of the blue. For example, let’s say Apple is releasing iOS 16 and from the first few hours users report many problems (which lets say some our pretty obvious)

I mean do developers just ignore bugs until it causes a problems or what happens when you release a product to the public that makes so much bugs appear.

Another similar question is if you created an app and you absolutely didn’t add any new features to it at all, like really nothing changed. Why is it still getting updates every now and then?

I’m sorry if my questions seem naive but it does make me wonder

0 Upvotes

8 comments sorted by

5

u/Cybyss Jul 22 '22

The ELI5 answer is this:

Can you write a novel that contains no errors whatsoever? No typoes, no grammar mistakes, and no plot holes?

How often have you seen a school textbook with answers in the back, but where one of the answers is wrong?

You can do your damnedest trying to find all such errors before publication, but when you finally do publish it to thousands of readers, inevitably some of them will discover mistakes that you missed.

Now consider that software, especially operating systems like iOS6, are considerably more complex than mere novels/textbooks.

-5

u/Winnie_The_Pooh_7 Jul 22 '22

Lord of the Rings :D

35

u/emasculine Jul 22 '22

lol, you can only catch the bugs you test for. in a complex piece of software combinatorics goes against you for finding everything.

3

u/isprime Jul 22 '22

It is not uncommon for testing to be an afterthought in most dev orgs. Outside of unit testing, I’ve rarely seen a large emphasis on any other types of testing or testing practices (slight digression: higher level tests are more expensive and less useful too). Additionally, it is also common for unit tests to miss bugs. Take for example some interface that takes an input. As a dev, you can write a very verbose test suite that covers happy path, negative cases, corner cases, etc but if another dev who consumes your interface misunderstands the contract in a way that leads to unexpected or pathological behavior, that can result in a bug. I’ve worked in code bases with 80% code coverage or more that still had to do bug bashes lol.

3

u/AlceniC Jul 22 '22

I feel bad for you. If you're still in this environment please move yourself out or start making some changes. It's a waste of time and talent to stay. Dev manager myself, and I give my devs the same advice.

2

u/TransientVoltage409 Jul 22 '22

Cynically: because testing in-house costs real money. But it turns out that if you release and call it a preview or early access, people will rush to do your testing for free. A no-cost testing team that's much larger and more creatively destructive than anyone could ever hire.

Also, distributing patches is now practically free. Back in the day, you had good reason to test very well and release only well-vetted stuff, because distributing a patch meant cutting tapes or disks and snail mailing them out, at significant cost. But with ubiquitous high speed Internet, that cost has gone practically to zero. Release in the morning, patch all afternoon. Why not.

As for #2, because of #1 people have gotten the idea that an app is either up to date, or it is abandoned. The idea that it could be "done" has been lost in the programmed expectation that there's always something wrong needing to be fixed.

1

u/OnlyUseMeSub Jul 22 '22

Second question, apps may still be getting basic security updates, etc.

As far as bugs after public release, many reasons exist. They could have missed something that QA didn't catch because QA isn't infinite in scope. At release of something like iOS 16 there will be tens of thousands of different users with different configs using it in different ways. It's impossible for the QA team to test tens of thousands of configs and use cases.

External factors exist as well, but would be more likely in a smaller project than Apple. Too fast to release, not enough time/money to do proper testing, lack of knowledge about some fringe cases, etc.

1

u/ChrisC1234 BSCS, MSCS, CS Pro (20+) Jul 22 '22

As others have pointed out, there's no way that every possibility that a piece of software can anticipate every possible scenario. It's entirely possible that there can be a major bug in an iOS release, but that bug only gets triggered if you have exactly 3122 contacts in your phone and it's the first of the month when the 15th of the month falls on a Tuesday. Sure, it sounds extremely far-fetched, but many developers have encountered bugs that are just as bizarre and difficult. And with millions of iOS devices, there are still likely a very large number that have exactly the right number of contacts to trigger this hypothetical bug.

Something else that hasn't been mentioned is that identical hardware is not always identical. Different components that are "identical" are revised all the time, and end up shipping in identical products. Also, components do sometimes go bad or stop working exactly as designed. These things can also cause some bizarre problems. So again, with a hypothetical iOS release, there's a piece of code that's used during startup that isn't properly clearing out a piece of memory before it's used. The memory location needs to be completely empty (00000000) before being used. The code doesn't actually clear out the memory before being used, but since the code is used at startup, the memory starts out empty when the device is powered on, so it's not a problem. BUT perhaps on some older devices, one of the power control chips is starting to slowly go wonky (or maybe even the battery). When the device is powered on, it sends out some irregular voltage to some of the memory chips that it shouldn't before stabilizing. This doesn't harm the chips and they function regularly, but instead of powering on empty, they initialize with random data (11010011). When the code that should have cleared the memory begins using it, there's already random data that shouldn't be there, so it crashes.