News for hackers. Stuff that matters.
Re:Hashing for the Homeless by MichaelAza on Tuesday June 04, 2013 @07:47PM (#5822821)
If I had to quickly assign numbers to buckets using a hash table would be obvious but I would never have thought of using the same ideas for assigning people to lines.

This reminds me of a joke I once heard - if you want the cold soda you need to get to the one in the back of the fridge. That's what you get for implementing the fridge as a stack.

Data structures are all around us, we just need to recognize it.

Re:Hashing for the Homeless by jdunck on Tuesday June 04, 2013 @07:51PM (#5822838)
You won't believe this, but we actually have a soda fridge here that has a deque implementation on the door with a note that cold ones will be at the back.

I'll provide a pic if demanded. ;)

Re:Hashing for the Homeless by MichaelAza on Tuesday June 04, 2013 @07:58PM (#5822863)
That, I need to see.
Re:Hashing for the Homeless by jdunck on Tuesday June 04, 2013 @08:03PM (#5822877)
OK, I misremembered, it's a queue, not a deque. Still: http://imgur.com/a/Yujev#0

Also kinda random since we don't use much Java here. I do like that people debugged it, though.

Re:Hashing for the Homeless by lann on Tuesday June 04, 2013 @09:43PM (#5823197)
I've been meaning to cross out the "synchronized" there. It's unnecessary since Queues are already threadsafe.