In a large pot, fill with enough water to just cover ham hocks and bring to a boil. Cover and simmer 45 minutes. Add beans and sugar and continue cooking another 25 minutes. Add potatoes and salt and cook until potatoes are tender, about 20 minutes more. Remove hocks from pot and remove meat from the bone. Add meat back to the pot, add salt and pepper, to taste, and serve.