Did you initially want to go into more researchy things and then decide "this is boring, I want to just support PHP apps instead"?

Yeah, stripped of all the romance and intrigue, that's basically it.

Things I would tell someone in your position:

Don't underestimate the wonderful things that money can do for your life.

Don't underestimate the joy of being given money by grateful customers because you have made them incredibly happy in real time by doing something that's completely trivial for you, like running EXPLAIN on a SQL query from the slow log and then doing an OPTIMIZE TABLE and a CREATE INDEX and refactoring a simple loop to use a hash properly.

Know this: Even "fundamental" and "ground-breaking" work may only be read by a few dozen people, then filed away, perhaps never to be of any use at all, except as a very important footnote in the paper that catches fire ten years from now. And the large majority of research projects take five or ten years and then fail to discover anything noteworthy. Learn to be perfectly happy with that, or do something other than research.

Do not underestimate the fundamentally slow and boring nature of research. It is a long, long game, the kind of game that started before you were born and that may make only a handful of moves in your lifetime. Your field may go backwards for decades at a time. Don't worry, do good work, all will sort itself out eventually.

You will spend literally decades getting it right, exploring all the important side tracks, perfecting the difficult techniques. Going to school in science, reading other people's science, is about novelty, because you discover new things as quickly as you can read. But your own science is about consistency. Think of Knuth, who started his grand project nearly fifty years ago and who is up to volume 4 of 7.

Remember that, by the time you are the world expert in some fundamental and ground-breaking field, it won't seem that special to you. It's like being the world expert on your own backyard. You will know more about half of the plants in your yard than mankind was meant to know, but you'll also live in secret terror because people expect you to know about the other half as well, and you know that you really don't. And, unless you're lucky and the soil in your backyard turns out to contain the cure for stomach cancer, you will never meet anyone who particularly cares that you're the world expert on your own backyard. It will bore people almost as much as talk of PHP applications bores people. [1] Except at the annual convention of backyard fetishists. There's a couple hundred of you in the world. Those conventions are the highlight of your professional year.

Read the life story of Gregor Mendel. That's you. Now, by all accounts Gregor Mendel had a pretty good life, puttering around in the pea patch, but he was out of biology, and dead, before people figured out he was on to something. That's fundamental research for you. Don't go into research because you want to be a superstar. Go into it because you like puttering around with peas and hanging out with the other smart gardeners.

Start writing a research grant today, even if the first draft sucks, even if it takes you months to read the existing literature and figure out something new and interesting to propose. I used to think it was torture for universities like MIT to force first-year grad students to pick an adviser at the time of admission and propose their own research. Now I'm not so sure. Practice grant-writing now, because that's really what your future in research is about. If you can't sell your line of research to the customer in advance, you don't want to be a researcher.

Read A Ph.D. is Not Enough, read Hamming's You and Your Research, and good luck to you! Grad school in science or engineering may or may not be a mistake in any particular case, but at least it's one of the most survivable mistakes you'll ever make.

Oh, that's right, I almost forgot: For god's sake, survive. Be alert for signs of depression. First-year grad school is overwhelming, and actually getting out of grad school can be even harder. Hardest thing I ever did.

---

[1] There is at least one exception to this rule: You can take up cancer research. The good news: People will fall over themselves to thank you for heroically working on cancer, even if all you really do is change the light bulbs in the oncology department elevator. It will be only slightly surreal. The bad news: If you actually talk about cancer, which is an absolutely fascinating subject, civilians will always be grossed out, at least subliminally. Often, they will be utterly terrified. You see, the word cancer will never again mean the same thing to you as it does to everyone else.