24 May 2012

Too many functions

I nearly fell out of my chair laughing after reading this article on The Daily WTF:

"It's just too slow," James replied, "once I have real data in there, it takes almost five seconds to add, remove, or find, an item."
Yakir knew something was definitely wrong and sat with James to look at his code. Here's what he saw...


"Uhhh," Yakir said, baffled. "Why didn't you use the built-in Hashtable class from System.Collections that I showed you?" 
"I checked it out," James explained, "but it had too many functions, which means it's slow. My class only has 3 functions, so it's much more efficient."

I think I've worked with James' cousin!!!

No comments: