"I do think there is a link in that in both cases, writing fiction or writing a computer program, at any given moment you're focusing on a very specific and particular thing—one word, one line of code, whatever."
- Neal Stephenson

Robots with the capacity to assemble themselves from components, and then switch themselves on.

This is a relatively early, explicit reference to this idea in sf.

The Sheem Robots were modeled after living animals of various worlds, and the Spider is considered to have been the most perfect of them all. This is the last specimen still in existence. You asked whether I had assembled it recently... Yes, I have. It's a most simple process...

The captain swung the gun up, pointed it at Yango's chest.

"What are you hiding?" he asked.

"Why, the activating mechanism," Yango frowned puzzledly. "I understood you wished to see it assembled. You see, the Sheen Robots assemble themselves when the signal to to it is registered by them."