4 ms·
People make typos and simple mistakes all the time, regardless of experience.
by oji0hub 6y ago
People make typos and simple mistakes all the time, regardless of experience.
- Guthur 6y ago+1 seen it so many times, often times from some cut and paste heavy refactor, one is more or less going on autopilot just moving substrings around and then bam. Review process hopefully catches it, when it is a bug, and potentially when the semantics are unclear...
- scotty79 6y agoTrue. But the intention of writing int three = 3; is insane. I would never ascribe to previous programmer (unless he just learned what variables are) the intention of creating variable (not even constant, which wouldn't make it any better) named 'three' and assigning actual value 3 to it.
- forgottenlogin9 6y agoIf that is insane, you may not have issue with this specific line but you surely have issue with the 2 “insane” lines that follow it?
- esrauch 6y agoAll three lines would be "insane" if the variables weren't mutated. As in a variable named "three" is insane if it solely contains either of the values 1 or 3. When it contains other values it is still subpar variable naming.
- scotty79 6y agoIf something looks insane, but probablu sane person made it and it works then that's usually good indicator that you are missing part of the picture and should look around. It still might be bad, but probably not insane.