POV-Ray : Newsgroups : povray.off-topic : You know... : Re: You know... Server Time
5 Sep 2024 07:21:15 EDT (-0400)
  Re: You know...  
From: Warp
Date: 27 Aug 2009 10:09:08
Message: <4a969384@news.povray.org>
Chambers <Ben### [at] gmailcom> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.