Are you considering a PhD (Doctor of Philosophy) in Computer Science but feel pretty unsure whether it's the right thing to do?
Gather round cos I've recently been weighing up this decision myself!
I don't mind getting stuck into books and studying, I also love the University experience.
So, it's got to be a rewarding experience! And should help further my career.
The answer turned out a bit more nuanced than that!
I know that as I've spent hours trawling the web for opinions, experiences and advice on sites like Quora and Reddit. This article is a summary of that work, listing every pro and con I could find.
1. What are the Pros of studying a PhD?
There are a few career paths facilitated by studying a PhD
- Academic research
- Commercial research (think having a role Google's DeepMind)
- Teaching at the college/university level. 
I haven't listed software development as a PhD is definitely not required to become a coder.
A bachelor's degree in Computer Science or Software Engineering is the requirement for most companies. Either of those degrees will give you the foundation necessary to understand programming at a deeper level and prepare you for a career in industry.
A PhD is mainly about research and opens up a host of advance and research-oriented opportunities.  The primary requirement to earn a PhD is that you must create new knowledge about your subject. .   Even as a Professor, research may still feature high in your tasks.
There are, however, an increasing number of PhD jobs required in computer science such as research scientist for many of the top tech companies, where you would cover many of the same duties as during your PhD but on their commercial behalf. 
An internship offered by Google solely for PhD applicants
Even if you pursue a role as a coder, having a research focused background as a developer can help set you apart and bring new strengths and perspectives to a development team.
A PhD encourages you to take a more holistic approach to project solving. 
I like this quote I found from a developer:
"_Having said that and having been working in (effectively) an industry developer job for the past five years, what I've found is that my training has prepared me very well to ask questions at a higher level of abstraction, to recognize and plug gaps in our knowledge, and to think a bit beyond the highly focused build this now mentality that often drives development. _" 
During a PhD, you master teaching yourself how to learn, how to write well, and how to methodically solve problems. 
Additionally, many come into a Computer Science PhD from different fields and actually learn to code on the course. Switching to Computer Science at PhD level, where you solve problems with practical skills and technology, may ultimately benefit your career as compared to staying on your current trajectory.
1.3 It's Interesting
You've got free access to the latest/classified research, top class library services and access to leading professors in their field.
Pulling off some high level and published research may bring you notoriety, eventually allowing to become recognized as a famous Professors/Researcher such as Canadian computer scientist Yoshua Bengio. 
You will undoubtedly meet some inspirational and well-connected people from all over the world.
Often those pursuing a PhD are among the most intelligent and educated of society. The crème de la crème of their perspective countries. Networking with them, and building friendships, will open a host of new career and travel opportunities.
1.6 It's Fun
Universities are a highly concentrated spaces of dynamic and energetic people.
You've got societies to pursue your hobbies and interests, parties and the good old university bar. Not to mention, subsidized gyms, food and often, accomodation.
Some of us, myself included, thrive in such as environment.
A PhD will help feed an intellectual curiosity.
Do you like to inquire, invent, create, explore, read, discuss, ponder, teach and discover the unknown?
Compared with the rigid tasks of a normal job, a PhD let's you pioneer research, sketch out solutions to the unknown and share all of that with the world through academic publishing.
If you're the type of person who doesn't want to merely make things but understand why things work, a PhD might be for you.
2. What are the Cons that come with studying a PhD?
2.1 Narrows your focus
During a PhD you study a subset of Computer Science and although you become an expert in that area, you may lose touch with the broader understanding of the field.
For example, being super knowledgeable about, say, Convolutional Neural Networks (CNN) while knowing little to nothing about Recurrent Neural Networks (RNNs) or even more basic ML models (e.g. Logistic Regression) will reduce your overall employability to a very specific number of jobs. 
Unless you attain a scholarship, there is a hidden cost to PhDs that's notwithstanding the fees.
Those with a bachelor's or master's degree pursuing an industry role will be able to earn well, save and invest for the future.
PhDs are, therefore, incredibly expensive because your stipend is low compared to industry salaries and you are losing out of several years of salary reasonably early in your working life.
If you take into account compound interest, these few years will be worth the most when you retire. If you get average 8% return on investment, every $100k now earnt is $1M when you are 60. 
You can probably get a higher salary after getting a PhD, but chances are, if you continued working for 4-5 years, you would be getting similar salary as well.
You need to consider whether the non-monetary rewards of a PhD are worth that hidden cost.
The 5 or more years of your life exchanged for a PhD are, for most people, among your most productive, fruitful, healthy, and responsibility-free years of life.
Some people prefer to use that time climbing the career ladder, renovating a home, spending time with relatives or starting a business.
Attaining a PhD is a grind where constant and long-term deadlines are a stress that hangs over you.
During your PhD, you will generally be monitored by a supervisor.
Something I've seen come up a lot is that many students experience a bad relationship with their supervisor or feel that they're being steered in a direction contrary to their interests.
Studying a PhD doesn't equate to free reign. Be prepared to compromise and answer to a someone else, much in the same way in the real world.
2.5 Isn't Needed For Majority of Industry Roles
As rightly discussed in the pros, certain research career opportunities arise when studying a PhD.
However, for the majority of software roles, everything you can do with a PhD you can also do with a BSc or MSc. You might even be considered over-qualified for some jobs.
PhD students are also more likely perform worse on technical interviews than non-PhDs as they're often out of practice with coding (being so focused on research). Or, if they do code, it's in a more obscure language. 
With or without a PhD, you have to answer the same questions when interviewing in the industry: what can you do, what have you done, what skills and qualities make you the best candidate and the best fit?
Top tech companies judge you based on your interview performance, not your resume.
You may aspire to a faculty role, working as a professor, however, industry roles are often more numerous, more generously compensated, and provide a better work-life balance.
Research roles may also require you to move yourself and your family to wherever tenure beckons.
This point is contested but in some specialties of Computer Science, the research in industrial settings is arguably more relevant and more interesting, think of the research that Google and Facebook conduct in their own R&D departments.
2.6 A PhD is Antiquated
The concept of a PhD precedes the online education revolution of recent times, driven by technology and the limitless amount of information and tools available to us.
Nowadays, you can get PhD equivalent knowledge and skills in many fields just by learning on your own without costly time, energy, and career sacrifices using online courses (Code Academy, Coursera, edX, MIT OpenCourseWare , Udemy, etc.) 
Additionally, you are not limited in any way to keep up with trends, connect with leaders in the field, go to conferences, and immerse yourself in the field. Many industry practitioners indeed do.
2.7 It's hard
Doing a PhD will be completely different to your day job.
You probably find the technical side of your job pretty easy most of the time but your PhD should genuinely challenge you (if it doesn't, you've chosen too easy a project).
But there is also the psychological aspect of a 5+ year project that will sometimes feel like it's going nowhere. Although your supervisor will guide you, they won't give you the answers on a plate. It can be lonely. 
If you do not have the skills to learn on your own, nor motivation, curiosity, and discipline to manage your learning process, you're going to find it incredibly difficult and without a guarantee you'll actually graduate.
3. How to decide whether to pursue a PhD?
With all this taken into account, how do you come to a conclusion?
The most important question to start with is: "Can you do what you want to do without a PhD?"
Note, that you can't skip this question by saying, "Well, I don't know what I want to do." In that case, you need to figure it out before returning to the PhD question.
Also consider that for any given goal, getting a PhD will almost always be the "hardest way" to accomplish it. But for a select few number of goals, getting a PhD is also the only way to accomplish it, and therefore by definition also the easiest way.
For example, see yourself a 'professor and best-selling in a top academic institution' - then a PhD and the experience of one could be for you.
There are also two additional considerations _
Do you have a family to take care of, and can you do so just as well while working on a PhD? If you are currently raising a family, paying a mortgage on a home, and trying to send your kids to the best schools, then I would think long and hard before starting a PhD. A PhD is likely to substantially decrease both your time and money, two resources you need a lot of when you have a family.
If you don't currently have a family, mortgage, car, etc. doing a PhD may push certain life goals quite a bit further down the road.
Where are you planning to get your PhD from, and who will be your advisor? The institution you choose to do your PhD matters a lot more than where you did your undergrad. You really need to find a department that has the right reputation for your research interests.
My advice is, in order of priority:
- Do what you enjoy and will make you happy
- Do what will help you achieve your long-term goals
- Recognize that "success" means different things to different people
- Do not follow a path to satisfy someone else's aspirations
- Ensure it's the right time and that you can afford it
Basically, it's this - Pursue a PhD because you really, really want to explore and push the boundaries and you think it that will directly benefit your long term aims.
But, walk into it with the realization that it is very hard to get a job in academia (there are many more PhD grads than there are openings) and you may wind up back in the industry - the same place you would have been before, but years earlier.
Remember! You do not NEED a PhD. So it's OK to apply, see who admits you, and then decide if you really want to go or not. You should not decide to do a PhD, apply and then simply go to the best place that accepts you without proper consideration of all the points in this article. That's a recipe for misery!