I also did an interview on Above the Law about how some people in the legal profession may be better off in software: http://abovethelaw.com/2015/06/should-you-leave-law-and-lear...
And for the record, the majority of new lawyers in the United States are paid as much if not less than an junior software developer these days.
I think the assumption that you call out yourself(64 yo developer) is the main difference over a lifetime of work. How many developers are going to be finding much work over 45-50 unless they are already well positioned as an independent consultant or have a name brand? That's 15-20 years more earning potential for the lawyer.
The other thing is the startup x-factor. Because so many start ups fail studies have shown developers that go the startup career route actually make less on average than their counterparts working for larger established companies. Very few people have the drive to make partner at a large firm but even fewer people are lucky enough to be an early employee at a company that makes their equity worth more than a years salary.
Why exactly is this? And why would anyone go into a profession where they will be unable to find work when they are half way through, and at the peak of their powers? In every other intellectual enterprise--doctors and lawyers particularly--they hit their peak earning years just as software developers because (supposedly) unemployable.
This makes little to no sense. It isn't like good older developers become magically incapable of learning new langauges or frameworks. It isn't as if they become less reliable than a 20-something just out of school. It isn't as if they suddenly forget 25 years of history that lets them make more accurate effort estimates than anyone else.
So where does this perception that developers must be young come from, and why does anyone go into a profession that by definition (apparently) is going to require the to change feilds mid-career?
I suspect it is that people think they are less flexible and less willing to work unsociable hours though.
The problem is this: If you have more than 20 years of experience and want to continue being a employee programmer you only have a few choices. You can advertise yourself as a senior programmer and try to command a senior salary. Or you can advertise yourself as a more junior programmer and ask for a low salary. If you have the ability to do the senior position, then there is not problem. If you do not... who the heck is going to hire someone with 20 years of experience who is still performing like a junior? Even if they are cheap, there is value to the employer of imagining that the employee will develop over time. Someone who flatlined 15 years ago is not someone you want on your team.
The moral of the story is: if you want to be a programmer for your whole career you need to stay on the front edge of the industry. You have to work your butt off day in and day out to not only stay current but always improve yourself. There will never be a day where you "make it". You will have to justify that senior position that you are going to occupy and show that you are better than the up and coming young wolves behind you. If you are not prepared to do that, then you are better off not being a programmer.
edit: a word