Place the salt cod in a large bowl and cover completely with cold water. Leave to soak for at least 12 hours, draining and covering with fresh water every few hours.
When you’re ready to cook, pick the parsley leaves and set aside, then finely slice the stalks. Peel and finely slice the shallots into rounds. Using a speed peeler, peel away strips of lemon zest. Half-fill a large pan with boiling water, place over a high heat and bring to the boil, then reduce to a simmer. Drain and add the salt cod, then add the parsley stalks, shallots and lemon peel. Poach for around 20 minutes, or until the cod starts to soften and flake apart.
Meanwhile, peel and finely slice the onions, then add to a large, wide pan over a medium heat with 2 tablespoons of olive oil. Season with pepper and cook for 15 to 20 minutes, or until golden and starting to caramelise, stirring regularly.
Meanwhile, crush the olives, pull out and discard the stones, then place the flesh into a medium bowl. Roughly chop the parsley leaves and add half to the bowl along with the chilli flakes, vinegar and 4 tablespoons of extra virgin olive oil. Mix well, then set aside.
Using a slotted spoon, remove the salt cod to a plate. Pick out any bones, then flake the flesh into the onion pan along with a good splash of the poaching liquid. Break it up with a wooden spoon, then cook for a further 10 minutes over a low heat, or until the fish is soft and flaking apart, stirring occasionally. Remove from the heat.
Peel, then finely slice the potatoes into matchsticks using a mandolin (use the guard!) or a sharp knife. Place a medium pan over a high heat, pour in the oil and allow to heat up. To test if the oil is hot enough, drop a piece of potato into the pan – if the potato floats to the surface, sizzles and turns golden, it’s about right. Using a slotted spoon, lower the potato matchsticks into the hot oil (you’ll need to do this in batches) and cook for 1 to 2 minutes, or until very lightly golden, but not cooked through. Transfer to a double layer of kitchen paper to drain.
Return the cod mixture to a medium heat, then stir in most of the remaining chopped parsley. Beat the eggs, pour them into the pan, then gently stir. Fold in three-quarters of the potato matchsticks and take the pan off the heat – the eggs will continue to cook in the pan, so make sure you don’t overcook them at this stage.
Return the remaining potato matchsticks to the hot oil, then fry for a further 2 to 3 minutes, or until golden and cooked through. Transfer to a double layer of kitchen paper to drain and season with salt. Transfer the bacalhau to a serving dish and top with the crispy potato fries. Using a slotted spoon, spoon over the marinated olives, sprinkle the remaining chopped parsley on top, then serve with a green salad and a cold glass of dry white wine.