Use your hands to crumble the cod or salmon into a bowl, carefully removing any bones and bits of skin. Depending on how much fish you have, add one or two beaten eggs, chopped cooked onion, cooked and mashed potatoes, salt, pepper, and just enough flour to hold the mixture together.
Heat a large skillet or griddle, melt a little butter on it. Form the fish mixture into patties about the size of hamburgers, and brown them slowly over low to medium heat, turning when one side is brown. When brown and crispy, remove from heat and serve hot.