Linked by Thom Holwerda on Fri 15th Feb 2013 10:40 UTC
Thread beginning with comment 552795
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
Guidelines are loosely applicable, so while its great you can find a corner case, it doesn't really mean much.
No guideline applies 100% in every situation, there are always exceptions. The programmer needs to be aware of the constraints he operates in and adjust accordingly.
Similarly in resource strapped environments like mobile, sometimes you sacrifice good design to achieve acceptable performance. Its not nice, and pie in the sky academics probably scoff at it, but its reality.




Member since:
2005-07-12
Apparently you've never worked with polygons or 3d math -- array indexes are slow so if you have four 2d coordinates representing a square what would make more sense than x1, x2, x3, x4 and y1, y2, y3 and y4 for it's corners... it's not like top/left/right/bottom have any meaning when you're constantly changing the orientation. Particularly true when unrolling for performance since a hardcoded offset from DS:BP is going to be faster than using dynamic indexes on something like an array. (see why pointered lists can often outperform arrays on complex data)
The code section used in the article that the author has some sort of noodle-doodle problem with seems completely normal and rational to me given it's implementing fixed point arithmetic with shifts... Just what in blue blazes would you do instead there? Lemme guess, make it run three times slower by moving the like bits of code into functions?
No offense, but that article to me reeks of someone looking at code they're too stupid to understand.
Of course that there is NO meaningful breakdown of the actual code or anything more than flowchart theory asshattery makes this little more than a fluff piece -- it sure as shine-ola is NOT a "code review"!
-- edit -- my bad, there's more than one page of this -- MEIN GOTT that websites navigation is horrible.
Edited 2013-02-18 02:33 UTC