3 ms·
If the code compiles and does what it is supposed to do, then the answer is that nothing is 'wrong' with it. Writing code that does what it is supposed to do i
by tcarnell 15y ago
If the code compiles and does what it is supposed to do, then the answer is that nothing is 'wrong' with it.
Writing code that does what it is supposed to do is often not the challenge of software engineering - but writing code that can be easily tested, refactored, altered and ultimately understood by other developers is the harder part.
The conditional statement used in the 'for' loop whose value can not easily be determined is not helpful and the i--; is 'unusual'.
In any case, it is more useful to code review the unit tests than the code itself.