I happen to come across this excellent article from this year's ICML on Machine Learning that Matters. I encourage everyone, especially computer science Ph.D students, to read it.
As an industrial researcher who draws a lot of job satisfaction by making both scientific and practical impact, I completely agree with the author on that we need to work on research "that matters", not just for machine learning. Many of the challenges outlined by the author are applicable to many other areas in computer science as well.
If you have ever encounter questions from reviewers on the motivation of your work, reading this article can help you think about why your research does (or does not) matter.
I would also strongly encourage all computer science Ph.D students to do at least one summer internship (especially in an industrial research lab). You will make new friends and get to work on cool projects. Most importantly, it can truly broaden your herizon and allow you to understand what kind of research matters.