"The infinite monkey theorem states that a monkey hitting keys at random on a typewriter keyboard for an infinite time will almost surely type the collected works of William Shakespeare"

(Wikipedia)

What is the probability that a newbie coder starts working with an API (s)he does not understand AND produce some meaningful code?

It hits me each time a developer decides to throw statements one after another driving some crazy random experiment and when (if) something that works happens, they just commit it and get to the next task. Kinda like assembling a Goldberg machine by chance. Find three of this kind and you have guaranteed fun for the duration of the project.

I understand that life started as the result of random combinations (others may disagree), but I still want to think about that as a rare accomplishment - not good enough to use as The Ultimate Approach to Software Engineering.