I'm in a position where at one time in history it would have been a Grand Good Idea to go off and do a Phd in Computer Science. (When I was a student, I remember a bunch of guys who were at my age / stage that did.)
In that past age of the world long gone... I could have advanced the state of a science in dire need of advancement, I could have done really interesting cool stuff, I could have landed a lectureship and maybe a professorship. I could have written a book or two. I could have even received industry funding to do all this.
These days? Do a Phd in Comp Sc? You're joking.
I'd be in debt up to my ears, no guarantee of a better job at the end, endless academic horseshit in between, and your expected gain from the book is less than from cleaning toilets.
Then we wonder why the state of Computer Science as a Science is what it is.