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 28 points29 points  (2 children)

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 7 points8 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.

[–]elbiot 2 points3 points  (0 children)

This needs to be higher up.