Whisk the miso, mirin, sake, and sugar in a small saucepan over low heat for 2 minutes until the sugar dissolves and the mixture is smooth. Let it cool a few minutes. That is the whole glaze.
Pat the cod completely dry. Coat the fillets in the glaze. If you have 30 minutes, let them sit in it in the fridge. If you have 30 seconds, just brush it on thick and move on. The marinated version is deeper, the brushed version is still very good.
Set the broiler to high and put a rack about 15 cm (6 inches) below it. Line a baking tray with foil, this glaze welds itself to bare metal.
Wipe excess marinade off the fish so only a thin coat remains, place on the tray, and broil 8 to 10 minutes depending on thickness. Do not flip. The glaze should blister and catch dark spots in places, and the fish should flake when pressed.
If the glaze darkens before the fish is done, move the tray to a lower rack and give it 2 more minutes.
Serve over rice with scallions, spooning any glaze from the tray over the top.