Place your tomatoes and garlic in an oven-proof dish, and sprinkle with salt and pepper and a healthy coating of oil. Cook in a medium oven until soft and giving (check that the garlic is cooked too; if not, remove the tomatoes to a bowl, leaving the garlic in the tomatoey oil, and return it to the oven until it is properly cooked). Hang on to the tomatoey oil.
Meanwhile cook your potatoes in gently boiling salted water. Also bring another pan of clean water to a gentle rolling simmer, which you will cook the cod in.
When the potatoes, tomatoes, and garlic are ready, poach the salt cod gently for 5 minutes. Then in a bowl bring together the drained potatoes and cod, the tomatoes and garlic with their oil, and the parsley, and season and mix gently (the cod will crumble, which is fine). Top with the egg and serve.