(image copyright Shane Willis)

First I wrote code that could write new code. Then I wrote code that could edit itself. Finally, I wrote code that could execute self-written or self-edited code. I obviously thought that was all fairly interesting, if not downright scary in its potential.

But, then I saw someone on Reddit [UPDATE: It was The Renegade Coder from right here on WordPress!] mention quines. I wish I had kept the username, but since I had never heard of quines before, so I only saved the word to goodsearch later (Goodsearch.com donates a penny per Internet search to your designated charity).

I found this site: http://www.madore.org/~david/computers/quine.html

I copied the C code. I pasted it. I ran it.

Mind blown.

The exact code I copied-and-pasted was the exact output of the code.

But, what if the output was not displayed on screen, but output to a file?

The first thing that comes to mind is Ultron, of comic book and Marvel Cinematic Universe (MCU) notoriety. Imagine an Artificial Intelligence (AI) that can edit itself, copy its new self, and then propagate itself like a virus. It doesn’t look easy, but it certainly looks plausible with current technology.