"Luck" (in an effective & successful software product delivery) is one of those topics I've never dedicated a post to. At least not directly. You may be surprised why I want to change that - isn't "luck" something random, or at most - environment-specific? Why waste keystrokes on topics that are not in one's control?
Before I answer these questions, why won't we start with some quotations and references?
First, many famous military leaders praised the importance of "luck" on the battlefield. Let's give the floor to a few of those gentlemen:
"I'd rather have lucky generals than good ones." – Napoleon Bonaparte
"When evaluating generals, don't ask 'is he skillful?', but 'is he lucky?'" – Cardinal Jules Mazarin
"I'd rather have a lucky general than a smart general. They win battles." – Dwight D. Eisenhower
What?! How can those respected & wildly successful gentlemen attribute that much importance to something that can't be planned, developed, or taken for granted? Or can it?
Intuitive meaning of luck
Why won't we start with a definition? What does "luck" or "being lucky" mean?
My intuitive understanding is being more successful than expected. Or - to be more precise - than what could be justified (with common sense) by the sum of skills, efforts, and merit. "Luck" happens when some favorable circumstances have occurred, increasing the positive outcome - without apparent deliberate action and/or seemingly beyond one's control.
Is it just that (simple)? That would mean it is indeed random, and there's no significant need to build any sophisticated mental model around it, right?
Extremes of luck
One can get (at least a partial) answer to that question from ... a Polish football manager - Jacek Magiera. This gentleman's "trademark" is his frequent references to the "luck" vs "fate" dichotomy (inspired by the book titled "A boa sorte" - or "Szczęście czy fart" in Polish - by Alex Rovira Celma & Fernando Trias De Bes). Unfortunately, to understand Mr. Magiera's message, we must dive (but just a bit) into linguistics.
Two Polish words: "szczęście" & "fart" mean almost the very same thing - an equivalent of English "luck". The difference between them is very subtle - we use the former to express modesty ("Oh, I was just lucky."), while the latter is frequently associated with relief after the last-minute, miraculous (& potentially - objectively undeserved) save-the-day rebound ("Damn, that was close."). The closest word to Polish "fart" in English would be "fate" then. Yes, these two are not exactly the same thing (there's nothing predestined in "fart"), but they share the nature of being beyond one's control.
So, looking at the full spectrum of "luck" flavors:
Polish "fart" is just a pure chance event, when & where there was no deliberate action and the eventual positive outcome wasn't a result of something you had purposefully impacted/influenced. "Fart" is not something you can plan or trigger at your convenience.
What about "szczęście"? I think it was perfectly described by one of the famous ancient stoics:
"Good luck is preparation meets opportunity." – Seneca
He truly nailed it. "Szczęście" is about leaving as little as possible to the random factors while acknowledging those factors will happen & eventually play their role. "Szczęście" is thinking ahead and being prepared for what could (realistically) happen. It's about hedging your options and having A, B, and Z plans (always) ready. You boost your "szczęście" by having many tools in your personal arsenal. That widens the palette of options to amplify the opportunity (once it manifests itself). And "szczęście" is also about (maybe even most importantly) keeping a very high situational awareness and a positive attitude to immediately spot and take advantage of an opportunity as soon as it appears.
Consistency
Does it justify preferring "lucky" generals over smart ones? Yes, if you realize that in this context, "lucky" means "consistently lucky". It's tough to tell "szczęście" from "fart" after a single situation - the random factor makes the details obscure. What's essential is the "consistency" part - it applies additional "weights" on top of randomness to move the needle in the desired direction.
So, where does this consistency come from? Well, I've partially answered the question in the previous section (I believe), but if I had to summarize it with just one thing, it'd be: "paying attention to the smallest details". Why so? These small details may not turn out critical in 90% of cases, but they will eventually save the day in the remaining 10%, giving you the predictable and stable +10% performance margin long-term.
"All great events hang by a hair. The man of ability takes advantage of everything and neglects nothing that can give him a chance of success." – Napoleon Bonaparte
In the end, "szczęście" is still a skill (or - an amalgamation of multiple, discreet skills). But it's so subtle and unobtrusive that bystanders don't see it in detail and attribute the final (positive) outcome to sheer randomness.
P.S. I realize I covered "good" luck only. But there's also "bad" luck. What about people who consistently have "bad" luck, then? I think you can figure it out based on what's already in the post, right? 😉 If not, search my old posts with the keyword "victimship" - that should help.
P.S.S. I hope it's obvious, but in case it's not: the attention to detail should not overshadow the fundamental pragmatism. That's why one of the essential skills for every leader (either on the battlefield or in the product development team) is evaluating risks and ROIs in real-time.
P.S.S.S. The quotations and references above are either from the military or sports - why did I silently assume they are fully applicable in software product development (leadership)? Empirically 😏 But feel free to prove me wrong ...