So where’d the code come from if nobody wrote it?
Why, just like the code for the computer programs you're using - it magically appeared abiogenetically out of nowhere, due to completely naturalistic forces!
/sarc
“So whered the code come from if nobody wrote it?”
First, it’s not ‘code’ the way you and I understand a human-created code to be. If you think so, you’re anthropomorphizing it.
Second, there’s an entire branch of chemistry/physics which demonstrates the capability you questioned -
http://en.wikipedia.org/wiki/Self-organization
Some of the links on that page are worth following, such as http://en.wikipedia.org/wiki/Emergence
The metaphor is hopeless.