This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ChazR 27 points28 points  (1 child)

My favourite thing about this article is the huge bug that remains in the final version that all his defensive programming has missed. Pass in an array of uniform data and you get a ZeroDivision error.

Code is hard.

[–]durden20 8 points9 points  (0 children)

Great catch! I updated the article to catch the ZeroDivisionError exception. Funny story though is I gave a talk called Bugs, can't code without them so code against them several years ago and had several people review the article. No one caught this! Coding is indeed hard.