4 ms·
Many of the bugs the quiz wants me to find would be pointed out by my IDE (but I'm not taking the quiz in my IDE...) Also, lots of this code is terrible. Simply
by delinka 10y ago
Many of the bugs the quiz wants me to find would be pointed out by my IDE (but I'm not taking the quiz in my IDE...)
Also, lots of this code is terrible. Simply adhering to a reasonable style could highlight or eliminate bugs. For example, "variable > other_value - 1"; let's get that "- 1" outta there and use >= instead.
Anyway, although I suggest these would be helped by a modern IDE and some style guides, I'd concede that since this is open source code, it's probably older than modern IDEs...
- thomasahle 10y agoThe whole point of this is that static analysis can find bugs that people have missed. If your IDE finds most of these, it just means that its static analysis is mostly as good as the Intel one.
- AndreyKarpov 10y agoSmall comment. PVS-Studio is not Intel static analysis tool. It is OOO "Program Verification Systems": http://www.viva64.com/en/about/ http://www.viva64.com/en/about/
- the_af 10y ago"This code is terrible" is not a good argument. Yes, it's buggy code. However, we know most programmers write bugs. This is an argument in favor of static analysis (and yes, your IDE is a form of that).
- cloudjacker 10y ago> Many of the bugs the quiz wants me to find would be pointed out by my IDE No no, you are supposed to pretend like you might be in a situation where this is no IDE! Tech company interviews in a nutshell
- pjmlp 10y agoI guess you never looked at typical enterprise code. Also even on 2016, many live on the AT&T world where IDEs are not welcome.