I've had good luck and I've had bad luck. Good luck is better!
In my career, I've been screwed over several times, but I must in honesty admit I've also had some unreasonably good luck. In my case, things have more-or-less worked out even.
My first good job was back when people were just getting over the idea that programming had to be on punch cards, and structured programming was still controversial.
(Not to me, but to people who just didn't Get It!) If you don't know what structured programming is, think of it as the invention of cellular life; before it, our loose and unstructured coding protoplasm wandered messily all over the place and died mysteriously.
I moved from Michigan to Pelham, Massachusetts possessing several years of programming experience, but had no luck finding work. Partly this was because I was living in a small college town where there was an oversupply of students competing with me. I also didn't want to take a pay cut from what I'd earned in Michigan, little appreciating that my resume and professional appearance was not helpful.
(All those people who tell you appearance doesn't count, it's what's inside that matters, knew nothing about looking for work.) Armed with an unrealistic view of my marketability, and knowing nobody actually working for pay in my field, I turned down a couple of offers that I now know were actually reasonable.
Finally, I got an interview at Coleco Industries, in Hartford. This was a grossly excessive commute, but I was out of options, so I went to the interview with the project manager named Ray. Now I'm not going to say anything bad about Ray; I like Ray; he was very outgoing and if he didn't have the greatest technical skills in the world, he was never nasty. If I could make something work, that's all that really mattered to him; what else do you want?
But our first interaction was a screw-up. At the interview, Ray asked if I knew anything about transaction programming. Sure, I thought, I knew what a transaction is. You know, it's like cashing a check. And I knew about programming. So I said yes. And so I got the job.
It turned out that we had both fooled ourselves and each other. Transaction programming was a specialized field, sort of like pre-internet page serving with some database access thrown it. It wasn't that hard to pick up, so maybe Ray never knew we'd mutually b.s.'d each other. Maybe it didn't matter, since it all worked out. Maybe the supply of programmers was tight in Hartford, with the big insurance companies vacuuming up all the talent. Or maybe Ray could never admit a mistake.
At any rate, through this lucky accident I got a gig which was still the best job I ever had. The working conditions were good, the pay and bennies fine, I had lots of friends and respect for the knowledge I had crafted.
(I would still be working there today, if the company hadn't gone bankrupt, but that's another funny story...)
I like to think of that job interview, when I am reminded of the times I was screwed over. For certain organizations, I have sacrificed a lot; in return, I've been treated like a used tissue - not even recycled! Now, this has been not everywhere and everytime; I can name some good organizations and great bosses too but, frankly, technical merit and business success has too often been the least important features of too many projects. This would annoy any normal person but, since my entire programming career depended on that one bit of unreasonably good luck, how can I complain when the dice run cold?
Don't we all like to think that anybody can succeed with hard work, good planning, skill and determination? Don't we all know this is horseshit, although (like a steaming manure pile), sometimes it's your only source of warmth on a cold wintery day? Anyone will find it easier to succeed with work, planning, skill, determination and a bit of horseshit, but as Stephen Schwartz writes in
Pippin:
"Now listen to me closely I'll endeavor to explain
What separates a charlatan from a Charlemagne
A rule confessed by generals illustrious and various
Though pompous as a Pompey or daring as a Darius
A simple rule that every good man knows by heart
It's smarter to be lucky than it's lucky to be smart"
And with that cheery thought ... good night and good luck!