But in the interest of fairness, I'll speak plainly and say I know a lot of people who work hard, virtually all of them are successful by their own standards. I know a lot of people who don't, only some of them are successful.
(See also: confirmation bias, survivor bias.)
Not to detract from your success, of course! Good for you. But don't use it as a platform from which to claim that unsuccessful people would achieve more success if only they just worked at it a bit more.
Understand that the market for software developers is HOT. If you are able to program a computer then there is no recession for you right now.
If you had instead focused really hard on becoming an expert in architecture or civil engineering rather than a computer programmer, you would be singing a different tune right now. I know many people in the construction related fields who do engineering work as difficult as computer science who keep finding themselves unemployed. They are unemployed not becuase they were laid off, they are unemployed because the company they worked for literally went bankrupt becuase nobody is building anymore.
Those people would be better off putting in a middling effort as a programmer than killing themselves to be experts in construction. So hard work in their case is not leading to success.
Now 5-10 years ago when they picked construction as their field, it made a whole lot of sense. Are we in the same place as programmers? 10-15 years from now will you look back and say, crap it looked like a good choice in 2012, but I really wish I had focused on X instead?
Time will tell.
Statements such as the above are spoken from a position of privilege. There are many, many people out there who do work hard and yet do not enjoy success; the fact that you can adduce examples of the form "that person is unsuccessful and is not working hard enough" is not evidence for your claim either.