I tweaked the window joke on this one to be more scientifically accurate, since I forgot conduction/convection are virtually non-existent in space, so even though the temperature may be minus 270 C outside, the internal temperature and airflow within the room itself would probably mitigate any significant heat loss. A vacuum is the most surefire method to stop heat transference, and this is *literally* how double-pane windows work.
Not that window condensation isn’t something we can fix with modern technology (your car can do it now) but it’s safe to assume the builders of the RPST Enterprise are incompetent, and Riker is damn lucky he didn’t get a room on the side of the ship that faces *towards* the sun.
At minimum, all windows onboard interstellar star ships should have protective metal shutters that slide in place when the window isn’t being actively used, or whenever eternal sensors detect dangerous levels of radiation. I’d hate to be some poor schmoe working in Ten Forward when the Captain decides he wants a closer look at that solar corona.