Difficulty of Getting into Top Graduate Program in TCS I'm currently a sophomore interested in TCS. Recently I've been somewhat bothered by the difficulty of getting into PhD programs in the future since the selection is indeed very competitive.

I looked through the webpages of some top CS school and found that their current grad students mostly also come from top undergrad schools and many graduated summa cum laude, i.e. with highest honors(top GPA, I guess?).

I've also been advised by a PhD student that by the time of application, I'd better figure out a specific area in theory(algorithms, complexity, crypto, etc) to write in my PS. Being interested in a wide range of topics would put me at disadvantage.

Though I'm at a top 5 university, I started learning CS only after getting into college. I fell in love with theory right away but I felt really left behind by many around me. I have a relatively good GPA, but not stellar enough. I've also been doing research in a few diffenrent topics but haven't published a paper yet. And currently I'm still widely interested in graph theory, complexity, cryptography and even quantum computing.

I know I still have two years to go. But sometimes I felt really pushed by the scenario in academia nowadays. I believe that many students are in the same boat as I am.

I wonder roughly what is the difficulty of getting into top graduate programs in theoretical cs(MIT,Berkeley,Stanford,CMU,Princeton etc.)nowadays? Does GPA really play no role once you have reached a "bar"(like 3.7/4), as many said? 
Do I have to decide on a specific area just after 3 years of undergrad studies?

And any other advice related to my situation(research, application, anything) would be appreciated.
Disclaimer: I am just a student, so I cannot speak authoritatively about admissions. I haven't been on an admissions committee, but I can tell you my understanding of how it works.

A PhD admissions committee looks at an application and asks "will this person do well in our PhD program?" Doing a PhD is first and foremost about doing novel research. So the question is: "Can this person do research?"

Your application has several parts, which together need to convince the committee that the answer is yes. Below are my thoughts on the various aspects.


Recommendation Letters: These are extremely important. A good recommendation letter comes from someone who knows you well in a research setting and who is an established researcher. Such a person should be in a good position to judge your ability to do research and their opinion will carry a lot of weight.
 A strong recommendation letter will talk about research-level work you have done and speak about your skills as a researcher, particularly your ability to be self-directed. A letter that only talks about how you did in class is not strong.
 To get strong recommendation letters, you should try to do research projects with professors either at your college or at a different college through an REU program or similar. If you do well, those professors will be able to write strong letters for you. (Make sure to work with research-active professors. e.g. work with a professor that has current PhD students. The more well-known your letter writer is, the more weight their recommendation carries.)
 Publications: If you already have written research articles, that is a clear sign that you can do research. Don't worry too much about this. If your recommendation letters say that the work you did is of publishable quality, that already says a lot, even if it hasn't been published yet.
 GPA and Transcript: Having a good GPA and transcript matters, but is not decisive on its own. It shows that you are hardworking and that you have the appropriate background, which are necessary attributes for a PhD student. 
More important than overall GPA is which courses you took and how well you did in them. Getting a B in art history will not sink your Theoretical Computer Science PhD application, whereas a B in Algorithms or Linear Algebra is a red flag. 
Taking more computer science and math courses, particularly at higher levels, and getting good grades makes your application look solid.
 Your College: Being an undergraduate at a top research university is an advantage because it gives you exposure to a research environment and gives you opportunities to do research, which leads to strong recommendation letters. If you are at, say, a liberal arts college, you will need to be more proactive about finding research opportunities (e.g. by doing a REU at a research university over the summer).
 Admissions committees will not discount your application based on your undergraduate institution.
Personal Statement: The personal statement should convince the committee that you have the right motivation for doing a PhD. In particular, it should tell them why you want to do research.Do not talk about what you did when you were 10 years old --- that's completely irrelevant. Talk about your recent research experiences; talk about scientific questions that excite you. 
 You do not need to choose a subfield when applying. However, it looks good if you can discuss some subfields that interest you; it shows that you have thought seriously about what you want to do. Read up on the professors at the school you are applying to. If one of them does something that excites you, mention it (and why).
GRE scores: Everyone knows the GRE is flawed, but it is the only standardized information available. Top programs receive far too many applications, so they may use the GRE to "filter" applications. As long as your GRE score is passable, it is not a problem.
Writing Sample: A few places ask for a writing sample. They want to know if you can write clearly --- this is important when writing research articles.  Just make sure this has been appropriately proofread. Bad spelling and grammar or rambling are a bad look. (This applies to your whole application!)
CV: This should be a concise overview of your skills and experiences.
Web Presence: Some professors will google you. So your web presence can matter.You can take control of your web presence by setting up a homepage. This doesn't need to be fancy. As a bonus, you can set up analytics and see who is googling you.


The fact that you are thinking about this as a sophomore is a promising sign that you are on the right track. 

Don't worry too much! Get some research experience --- this is also useful to you, as it gives you useful experience and helps you figure out whether you will enjoy doing research full time. Otherwise, just work hard and take courses that interest you.

One final piece of advice: Ask people to read over your application, e.g. the people writing your recommendation letters. They can tell you if you have missed something.  

TL;DR: Do research!