News for hackers. Stuff that matters.
Re:Naggum Nugget by exit on Tuesday November 02, 2010 @09:43AM (#1860350)
another thing the world needs is people who can argue a point without an obnoxious "shut-down" mentality about it.

whatever points he's making, it feels like listening to bill o'reilly make them.

Re:Naggum Nugget by zachbeane on Tuesday November 02, 2010 @09:50AM (#1860378)
Obtaining useful information in contexts or from people you find unpleasant is a handy skill.
Re:Naggum Nugget by jimbokun on Tuesday November 02, 2010 @11:26AM (#1860794)
In this case, the useful skill is scanning that wall of text to extract the small nugget of useful information:

For small N, finding something in an association list can be faster than finding the same thing in a hash table.

Naggum also could have run some quick bench marks and figured out at what size N hash tables become a better choice (depending on the nature of the keys, etc. etc.), in less time than he spent berating the intelligence of the questioner.

Re:Naggum Nugget by reynolds on Tuesday November 02, 2010 @01:54PM (#1861498)
That nugget of useful information is also explained (in a lot more detail) in one of the first chapters of the "Introduction to Algorithms" book.

When I was working through the book (and I still am to some extent), it was basically beat into my brain that some algorithms with worse performance could perform better than faster algorithms for a small enough n.

Re:Naggum Nugget by jules on Tuesday November 02, 2010 @11:52AM (#1860913)
I doubt he is right for any N. Association lists require on average N+1 memory accesses. Small hash tables require 1 memory access.

Only in edge cases like looking up a long string in an alist consisting of one short string he's right.

Re:Naggum Nugget by silentbicycle on Tuesday November 02, 2010 @11:12AM (#1860719)
It's good to be able to endure it when necessary, sure, but it's also good to avoid needlessly perpetuating bitterness.

Is it really that hard to say, "Complex algorithms have higher constant factors, so for small values of N, 'naive' ones can still be faster. When in doubt, measure." without chewing somebody out?

Re:Naggum Nugget by dlytle on Tuesday November 02, 2010 @11:25AM (#1860784)
Agreed, but being able to present useful information in a context that makes people more receptive, rather than hostile, is also a handy skill.

It's easy to deliberately overlook rudeness, but it still unconsciously colors a person's responses and thoughts, which could have a negative impact on the message.