|
![](/i/fill.gif) |
Chambers <Ben### [at] gmail com> wrote:
> However, the very bottom comment is several lines of code to perform a
> negative absolute... when all that's needed is "-abs(x)". I think that
> might be what he's referring to.
Having been a teaching assistant that the University of Technology here,
in a course where several tasks are programming-related, you wouldn't
believe the programming horrors I have had to witness.
For example, you wouldn't believe how complicated the task of writing
a function which calculates the distance between two 2D points can get.
Where normal people would just write a "sqrt(vx*vx+vy*vy)"-based solution
in 3 lines (two of them to calculate vx and vy), the worst examples I saw
spawned over 100 lines of code. And I'm not exaggerating the least bit here.
And these are university students who have gone through math courses in
grade school, high school and several years in the university.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |