Today, NASA goes open source with its code, joining endeavours such as SpaceHack [previously], WorldWind and (for more worldly coders) Github, GoogleCode, and the venerable SourceForge.
Spacehack "A directory of ways to participate in space exploration. Interact and connect with the space community."
The Apollo 11 Command Module code (Comanche054) and Lunar Module code (Luminary099) have been open sourced.
Celestia is the most beautiful toy. It's a free (open source) simulator of the universe, including breathtaking models of known planets. Watch Jupiter rise over Io or follow the course of a solar eclipse. [more inside]