Put the beans to soak overnight in cold water.
Next day, bring them to the boil in fresh water. Boil briskly for 10 minutes and throw this water away, too, unless you want to introduce a flatulent note into the proceedings.
Cover with fresh water, add the onion, chilli flakes and 4 peeled whole cloves of garlic. Bring back to the boil, lower the heat and simmer until done, when