Here is what Rex Stout, creator of the Nero Wolfe detective series, says about that. Nero Wolfe is talking with Inspector Cramer:
"Wolfe: It must be nearly mature, but not quite, and it must be picked not more than three hours before it reaches me. Do you eat sweet corn?
Cramer: Yes. You're stalling.
W: No. Who cooks it?
C: My wife. I haven't got a Fritz.
W: Does she cook it in water?
C: Sure. Is yours cooked in beer?
W: No. Millions of American women, and some men, commit this outrage every summer day. They are turning a superb treat into mere provender. Shucked and boiled in water, sweet corn is edible and nutritious; roasted in husk in the hottest possible oven for 40 minutes, shucked at the table and buttered and salted, nothing else, it is ambrosia. No chef's ingenuity and imagination have ever created a finer dish. American women should themselves be boiled in water."
If you can, you should have the oven preheated before you pick the corn. Also, you should strip down the husk, but don't remove it, remove the silk, then re-enclose the ear in the husk. Makes for much nicer eating.