Begin by bringing two separate pots of water to a boil—one for the eggs and one for the pasta. While the water heats, slice the onion paper-thin and place it in a bowl of cold water to soak and mellow out its sharp bite; this is a key step in Japanese cooking that removes the raw onion harshness. Finely julienne the carrots and set aside. When the egg water reaches a boil, carefully add the eggs and set a timer for 12 minutes. Once the pasta water is boiling, add salt and the macaroni, then cook for 1 minute longer than the package directions recommend—this slight overcooking gives the pasta the tender, almost creamy texture characteristic of Japanese macaroni salad.
Drain the cooked macaroni in a colander and transfer to a large mixing bowl. While the pasta is still warm, toss it immediately with the olive oil, rice vinegar, and sugar—this seasoning absorption happens best when the pasta is hot, allowing it to soak up the flavors evenly. Let the pasta cool to room temperature, stirring occasionally to prevent clumping and to ensure even cooling. The oil coating prevents the pieces from sticking together while they cool.
When the eggs have finished cooking (12 minutes), transfer them immediately to an ice bath to stop the cooking process and ensure a perfectly set yolk with no grey-green ring. While the eggs cool, slice the cucumbers into thin rounds or matchsticks. Drain the soaked onions and pat them dry with paper towels—this removes excess water that would dilute the dressing. I like to squeeze the onions gently to extract as much moisture as possible, which concentrates their flavor and prevents the salad from becoming watery. Once the eggs are cool enough to handle, peel them gently, chop them into roughly 1/2-inch pieces, and set aside.
Cut the ham into thin 1-inch strips and set aside. In a small bowl, whisk together the mayonnaise, Dijon mustard, salt, and black pepper until smooth—I highly recommend using Kewpie mayonnaise for its richer, slightly sweeter flavor that's more authentic to Japanese versions. The mustard adds a subtle tang and depth that balances the creamy richness without making the salad taste overtly tangy.
Add the drained vegetables (cucumber, onion, and carrots from the earlier steps), ham, and chopped egg to the cooled pasta base from Step 2. Pour the dressing from Step 4 over everything and gently fold together using a spatula or large spoon, being careful not to break up the delicate pasta pieces. Once thoroughly combined, transfer the salad to a serving dish or storage container and refrigerate for at least 1 hour before serving—the chilling time allows all the flavors to meld together and the salad to set to the proper texture.