How to Make It
In a large pot of boiling, salted water, cook the ears of corn until just done, about 3 minutes. Remove the corn from the pot and save the hot water to cook the spaghetti. When the ears of corn are cool enough to handle, cut the kernels off the cob. You should have about 3 cups of kernels.
Put the corn in a food processor with the cream, parsley, salt, and pepper. Pulse three or four times to chop the corn to a coarse puree.
Return the water to a boil. Add the spaghetti and cook until just done, about 12 minutes. Reserve about 3/4 cup of the pasta water. Drain the spaghetti and toss with 1/3 cup of the reserved pasta water, the corn mixture, the ham, and the butter. If the sauce seems too thick, add more of the reserved pasta water.
Test-Kitchen Tip To cut the kernels from an ear of corn, break the ear in half with your hands, or cut it with a knife. Stand each half on end on a cutting board and, using a large knife, cut straight down the sides to remove the kernels. It's easier to cut the kernels off cooked corn than raw because the juice splatters less.