Soak cod in cold water overnight.
The next day, drain and then rinse under running cold water.
Cook cod, potatoes, and onions separately in water, adding no salt.
Drain when tender.
Remove all bones from cod, trim edges from fish, and cut into 2 inch pieces.
Place fish in alternating layers with onions and potatoes in a top of range casserole.
Drizzle with olive oil, sprinkle with cayenne and black pepper, and pour half and half over all.
Cover and simmer over low heat 20 minutes.
Serve cool, but not cold, with a green salad.