Actually, I think the programming field is actually more lucrative these days. The difference is that where the photographer in question expects to be paid for work he's already done, most people going into programming are either paid a salary up-front or have a fairly involved business plan (startups and the like). App developers do seem to be doing relatively poorly, but they are a minority.
There was a time when video game programmers got royalties on the games they wrote. I'm not entirely sure why this notion of compensation disappeared. The common argument is along the lines of, "you'll just have people jumping onto projects with people in them who've got proven success," but I fail to see how that's any different from life right now.