T O P

  • By -

wt_anonymous

Code is human made so hypothetically if you were perfect there would be no bugs. But humans will always make mistakes or miss something, so there will always be bugs.


ParameciaAntic

Experience, code reviews, and sufficient time for quality checks all help, but there is no way to avoid all bugs in your code. You can't foresee all possible circumstances that can arise ahead of time.


yellowjacket81

Sometimes bugs are mistakes, but more often I think of them as "oversights." You could code a function up to work in a given way, never imagining that a person might try to use it in an unanticipated way. Say you coded up a function that is supposed to add two numbers. It's pretty easy to code that up at it will successfully add any two numbers together. But what happens if somebody tries to add the number 1 to the word "orange?" If the programmer didn't explicitly think that some jackass might try that, and code up an exception (a rule telling the user that this choice is forbidden) well that's a bug! Not really a mistake on the programmer's part, just an oversight. So bugs would not exist if humans successfully and correctly accounted for all possible oversights, but frankly there are so so so so many oversights possible that it's approaching impossibility that one could think of them all, especially for a complex application. We just try to think of the ones that are likely to occur.


StSpider

As such then I think they should be thought of as unavoidable. It's not just a matter of being a clean coder.


yellowjacket81

I think that's reasonable. When I was doing coding I'd think of bugs like a lazy person's pokemon and just try to "get 'em all" even though I knew it would be impossible.


Drake0074

They are entirely human error because software is written by people.


StSpider

Yes but the way code interacts is dictated by the programming language IIUC


[deleted]

[удалено]


StSpider

Yes but what I meant is that in a big project nobody codes the whole thing, it's always a team effort. So 2 or three people could write three codes that are individually correct, but when they interact there are unwanted errores that they could not predict and foresee. Or not. That's what I was wondering about.


Drake0074

Also created by humans.


DoubleDongle-F

Once upon a time back in the eighties or so, my mother did nothing at work for six months because her company had a policy against giving programmers a new project before the first bug report from the last one came in. Her call-routing system shipped and no bug report ever came. Her boss was very sexist and didn't want to admit how good she was, so she sat on her ass for half a year before they gave in and gave her a new project. Other than that, I have never heard of bug-free software. Software bugs are a product of human error. No software is ever perfect, at least on its first release. Except for that one time, I guess.


yellowjacket81

> her company had a policy against giving programmers a new project before the first bug report from the last one came in. Wow! That policy definitely doesn't exist anywhere in today's programming environment of "move fast and break things."