Comment Terrible code (Score 4, Informative) 143
Saying that this code was poor would be an understatement.
The report (page 17) has this code as an example - describing it as "Whoever wrote this code clearly has no understanding of elementary mathematics or the most basic rules of programming."
Public Function ReverseSign(d)
If d < 0 Then
d = Abs(d)
Else
d = d - (d * 2)
End If
ReverseSign = d
End Function
The code could potentially be worse because the font that the report uses makes it hard to tell if they are testing "if d is less than zero" or "if d is less than the global variable o".