Bring a large pot of water to a full boil. Add corn and boil for 6 minutes. Remove from water, sprinkle the corn with salt on all sides and let cool completely. Once cooled, lay the corn on its side and slice the kernels off the cob, trying your best to keep the kernels together in big pieces; set aside. You will need roughly 165 g of corn kernels, so depending on the size of the ear, you may not need all of it.
Cut the salted duck egg in half right through the shell and scoop out the egg in one piece with a spoon. Cut one half of the egg into chunks (for tossing into the salad), then cut the other half as nicely as you can into wedges (for putting on top of the salad).
In a mortar and pestle, pound garlic and chilies until there are no more chunks. Add palm sugar and pound until mostly dissolved. Add dried shrimp and long beans, and pound briefly just to crush the long beans. Add tomatoes, fish sauce and lime juice, adding also a few pieces of the lime rind after juicing. Pound gently to mix and crush the tomato slightly, using a large spoon to help fold the mixture. Add cucumber, corn and the chunks of the salted duck egg, toss to mix with a spoon. Plate and arrange the wedges of salted duck eggs on top.
Note:If you do not have a mortar and pestle, you can still make this salad in a mixing bowl with a few extra steps: 1) Mince the garlic and chilies 2) Finely grate the sugar so it dissolves easily, or make a palm sugar syrup by cooking it with just enough water to dissolve. 3) Crush the tomatoes with a wooden spoon or spatula to release their juices into the salad.