

Hashing for the Homeless - jdunck
http://causes.github.io/blog/2013/06/04/hashing-for-the-homeless/

======
onan_barbarian
Do homeless people have a single canonical name that they will use
consistently?

Is it fair to request that they structure their day around a hashing algorithm
that they don't understand?

There's an arbitrary kind of "command" oriented aspect to this that I'm not
crazy about. Sort of a "the algorithm says that you go here at time X" element
that is inscrutable and will no doubt inspire a lot of theories about how it's
rigged ("Hispanic names always get to go in the morning, did you notice?").

I would suggest colored tokens that are good for certain timeslots: Red might
mean "Monday at 9, Tuesday at 10, ...". I don't know if they are persistent or
good for one use or both. The tokens can be recollected so you know how many
are circulating for a given time/place and can avoid oversubscription.

These could be handed out at random and traded among the clients so they can
put together a schedule that suits them. This removes the "arbitrary computer
says so" kind of element of the hashing scheme.

~~~
jdunck
> Do homeless people have a single canonical name that they will use
> consistently?

They have an identity.

> Is it fair to request that they structure their day around a hashing
> algorithm that they don't understand?

It is not fair that they are homeless. It is not fair that the best thing for
many of them to do is to stand in line starting at 3AM the _previous day_ to
get a bed for a night. It _is_ fair to offer them a fair chance at a shower in
a predictable way. Rather than standing in line for hours in hopes of a
shower, they can come and maybe get a shower... or not. Unfortunately,
rationing is necessary.

The tokens idea is interesting, but the meaning of them is a good bit more
abstract than remembering a single time. Also, things get lost, and keeping
things is pretty hard when you're homeless - basically everything you hope to
keep has to be carried with you at all times.

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

~~~
jdunck
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. ;)

~~~
MichaelAza
That, I need to see.

~~~
jdunck
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.

~~~
lann
I've been meaning to cross out the "synchronized" there. It's unnecessary
since Queues are already threadsafe.

------
georgeoliver
It's an interesting idea but I don't think the ID problem is as trivial as the
proposal makes it. For example,

<http://www.nlchp.org/content/pubs/Photo%20ID%20Barriers1.pdf>

~~~
jdunck
By "ID", I don't mean government-issued photo ID, necessarily - just the
ability to know how a person is will do.

It may be that the person is a repeat user so that the staff recognizes them,
or it may be that someone else can vouch for them. And some will have photo
IDs, too. ;)

------
jdunck
Author here if people have feedback.

~~~
PaulHoule
I think you're missing the point about homelessness.

In most parts of the US you can get social services if you're willing to (1)
deal with horrible bureaucracy, and (2) stop using drugs and alcohol.

Chronically homeless people aren't homeless because they're poor but instead
they have mental health issues that leave them disconnected from avenues for
help. There are many "homeless" people that don't sleep on the street because
they stay with friends or family, or, like William Shatner in the early 70's,
live in a car.

Because the chronically homeless have bad enough problems relating to people
they don't need complicated rules coming between them and services they need.

~~~
dragonwriter
> In most parts of the US you can get social services if you're willing to (1)
> deal with horrible bureaucracy, and (2) stop using drugs and alcohol.

To even have a chance of being loosely correct, the "willing" here needs to
change to "willing and able". For both items, that is a pretty big difference
from just "willing".

~~~
PaulHoule
I'll agree with that.

