Comment It is a solved problem (Score 5, Funny) 312
Years ago people solved this problem but they didn't document their solution well, so here we are again.
It is better to give than to lend, and it costs about the same.