That said, I still think that even the "useful" STEM fields you mentioned are lagging behind the professions that can take (as the article pointed out) 1/4 to 1/6 of the time to completion, which much higher completion rates (and less rigorous prerequisites to boot).
By the way, I remain extremely enthusiastic about majoring in hard science, math, cs, or engineering. These majors set you up really well for entry into the workforce. You can contribute immediately in a high impact way, and I've found this notion that you'll be viewed as "merely a coder" to be greatly overstated. There are all kinds of great directions to go from starting out as a developer (including remaining in development). But PhDs clearly don't pay (not surprisingly, you see a much higher percentage of US citizens in undergrad programs in STEM fields, since this is the economically rational choice - at the grad level, the rational choice is to go to law, medicine, or MBA programs, or just get to work and enjoy a salary).