Applying for PhD in USA

This post is an overview of PhD application process in USA. Application for Master program is usually very similar, but there are differences, specific for every University. Actually, every University has their own requirements, which are similar among the country.

My very first advice is to start planning application process at least 1.5 year before the semester in which you want to start your program. In most top Universities the PhD programs are starting only in Fall and application deadline is in mid-December, on the previous year (e.g. for Fall 2014 it is December 2013). Almost 1 year ahead! There are also Universities, which are admitting for Spring as well. However deadline is still around 6+ months before program’s start date.

To do list for PhD application

  1. Find Universities/Professors/Research groups you are interested in
  2. Take standardized tests: GRE and TOEFL(*)
  3. Write Statement of Purpose
  4. Get 3 recommendation letters from your Professors
  5. Get your transcript of records
  6. Apply!

Now, let’s look at each of the above tasks in details.

Find Universities/Professors/Research areas you are interested in

This choice depends on many factors. It is worth to apply for some top Universities, some good Universities and one or two you are sure you will be admitted. When you are choosing Universities it is good to check its rank in your major. E.g. Harvard (one of the best Universities in USA) is #22 in Best Computer Engineering Grad Schools ranking, while University of Michigan is #5. Even more important than ranking (which is more useful in case of Undergraduate Programs) are Professors and research ares at the chosen University. This part will take you weeks if you are starting from scratch (you have no idea about that). It is worth to ask your professors for advice in selecting Schools.

My advice is to choose some 1-3 top Universities, 1-3 average (where you have real chance to be admitted) and 1-2 you are almost sure you will be admitted.

Be aware that applying for Grad School is not free. You need to pay non-refundable fee for every University you want to apply. Usually the application fee is around $70-80. However some Universities are expensive, e.g. Stanford: $125. As long as you are not rich (and you are probably not, when you are a student), you need to choose Schools you are really interested in to don’t waste your money.

Take standardized tests: GRE and TOEFL(*)

During Universities/Programs research, you can start preparation and schedule test dates for standardized tests.

95% of good Universities require GRE (Graduate Record Examinations). Preparation for this exam is usually 1 to 6 months depends on your knowledge. It will be easier for people to whom English is a first language. It will be also easier if you are good at math. Reasonable preparation time for this exam is 1-3 months. More details about that you can find here. There are three sections: Verbal Reasoning (130-170 points), Quantitative Reasoning (130-170 points) and Analytical Writing (0-6 points). I know, it is weird that the minimum score in Verbal and Math is 130 🙂 The exam takes around 4 hours in total. You need to wait around 2-3 weeks for results. Cost: ~$200 (depends on country/city where you are taking it).

I think all Universities require TOEFL exam (Test of English as a Foreign Language) if you are international student. There are variety of possibilities to waive it (e.g. if you have US degree, or you are full-time student in USA for more than 2 years), but it depends on the specific University. Test is not very hard, when you can communicate in English without any problems. The challenging part is the fact that it takes more than 4 hours, and you need to stay focused all the time. There are four sections: Reading, Listening, Speaking and Writing (30 points for each, 120 is maximum in total). You need to wait around 2-3 weeks for results. Cost: ~$200.

Every University (and some Departments) has GRE code and TOEFL code. You need to provide this code, to specify where you want your results to be sent. In case of GRE I needed to provide this code at the end of exam (in the examination center). In case of TOEFL: “Score report recipients can be added or deleted through the TOEFL iBT® online registration system until 10 p.m. (local test center time) on the day prior to the test date”. Due to that, it is good to check these codes earlier (and take them to the examination center in case of GRE). When I was taking TOEFL and GRE, I was able to select up to 4 institutions to which they send my results without any additional charge. If you want to apply to more Grad Schools you need to order extra results (which is not free). In my case it was $18 for TOEFL and $25 for GRE (per one copy!).

Statement of Purpose

It is similar to cover letter. In Statement of Purpose you should describe what is your interest and relevant experience, which can be useful during PhD research. There are many online resources how to write statement of purpose. E.g.: here and here. What is very important: you need to tell the truth. Especially about your research interest. Based on SoP (Statement of Purpose) you might be admitted or not by specific professor. Remember that PhD is usually 5-6 years and you probably would like to do stuff you are passionate about. Not some things you have never heard about, and do not have any interest in.

Get recommendations

Graduate Schools require usually 3 recommendation letters. It is good when 2 are from your professors and 1 from somebody you were working with out of your University (e.g. during Internship or in job before/after College). If you do not have person like that it is fine to get recommendation only from your Faculty members. In general professors don’t like you to see their recommendations. It is not a problem, because you just need to provide their e-mails for Graduate School. Then Graduate School (or Department) send a ‘request for recommendation’ directly to them. They need to reply for this email or upload your recommendation online. Additionally you will get an option to ‘Waive right to review recommendation’, which means you won’t see the recommendation. I think there are variety of reasons behind that (e.g. student may not like something in the letter, or when he get very good recommendation he may lose motivation etc.). Anyway, you should not be worried about that if you are a good student.

Get your transcript of records

In case of US University this part is easy. You just request transcripts from University and they know what to do. Even when you are not student anymore. In case of foreign country it might be an issue. It was in my case (Poland), but finally (after many phone calls and e-mails) I got them. Fortunately most of Universities accept unofficial copies. Especially from foreign countries, because they are aware of differences between education systems. However, most of Schools require you to send them paper copy of your transcripts. Additionally they are providing specific address to which you should send them. Usually it is Graduate School, but sometimes it might be department. You need to check this on your own.


To do the final step, which is ‘apply’ you need to register in every University’s Grad School online system. After providing all necessary information and listing your recommenders, you need to pay the application fee. Remember about sending your tests (GRE/TOEFL) results and your transcripts to every School.

Now, let’s look how it goes in practice.

My PhD applications

Finding Universities/Professors/Research areas I am interested in

I am already in Graduate School (in Master program) at Kansas State University. I am GRA (Graduate Research Assistant) in very strong research group: SAnToS lab. Additionally PhD was only an option for me. It means: it wasn’t my only way (get PhD or die) to move my career forward. Another option was to find a job.

Because of that I needed to adjust my recommended strategy (1-3 top + 1-3 average + 1-2 sure Universities). I think my Department is one of average (#85 in Grad Schools ranking) and I had high chances to be admitted (Faculty already knows me, I had experience in their research area etc.). I chose one more average: University of Massachusetts (they work on similar things as I am in my research) and 5 top Universities: Stanford, Carnegie Mellon, MIT, Harvard and University of Pennsylvania.

Taking standardized tests: GRE and TOEFL(*)

I took TOEFL before I started Master Program and I got 86/120. I could use it for my PhD applications because the test was taken less than 2 years ago. In most of Universities TOEFL results don’t expire for 2 years.

I needed to take GRE, because I didn’t take it before. I had to go to Topeka, KS (60 miles from Manhattan, KS where I am currently studying). It was much harder than TOEFL. I learnt some words in English, which I didn’t know even in Polish before. E.g. bigot or ephemeral. Do you know them? My results: 3/6 (Writing), 144/170 (Verbal), 168/170 (Quantitative). Not good in Verbal, but not bad in Quantitative (Math). I thought I have some chances. Especially, because Grad Schools don’t require minimum. They use GRE only as indicator, which means that if you are awesome in different areas, they don’t really care about it. Of course most of people who are awesome in other areas, have also good GRE scores 🙂

Writing Statement of Purpose

It took me a few days. Especially because I adjusted some parts for specific University. The structure of my SoP was as follows:

  • something about me
  • my experience
  • what I want to do
  • why this University

Getting recommendations

I got recommendations from my major professor, one other professor from my research group and my former manager (from the company I was working for before Graduate School).

Getting transcript of records

It was super easy in case of Kansas State University. I just needed to log in into Internet Student Information System (ISIS), request transcript and provide address to which I want them to be sent. Everything for free ($0!) if you are current student.

Unfortunately, it was not that easy in Poland. At Wroclaw University of Economics, I needed to prepare it on my own and lovely Ms. Daga had to check if it conforms to data in the online system. No possibility to print it from the system (sic!). Then somebody needed to pick it up in person. I asked my sister, who picked it up and gave them to me, when I was in Poland for Christmas. At Wroclaw University of Technology it was even harder. They do not have procedure to issue transcripts for former students (sic!). I had only one copy of my diploma supplement (which is similar to Transcript of Records). I copied it, went to the dean’s office and ask for University stamp on it. Again in this situation, one women working there was nice and did it for me in the same day (she needed to review manually 7 copies in total!). I hope that this situation will change soon. Students should be able to request transcripts through online system (not necessary for free) and be able to pick it up or get it sent to chosen place.


Application deadlines of Universities I chose were in the middle of December. E.g. Carnegie Mellon had two deadlines: early in December 4 (fee: $75) and late in December 16 (fee: $125). I sent transcripts after I paid the fee (because I didn’t collect all of them before) and it was fine. The same with recommendations, some of them were sent 5-10 days after deadline. Thus I think the most important part is to send the online application (along with fee). You can send all other documents within some reasonable time (one month?) after deadline.


  • Stanford – REJECTED
  • Carnegie Mellon – REJECTED
  • Harvard – REJECTED
  • University of Pennsylvania – REJECTED
  • University of Massachusetts – REJECTED

Sounds bad, right? Rejected everywhere. However, I chose 5 top Universities and 1 average. Currently I am at the Kansas State University, which is aspiring to TOP 50 Public Research Universities. Additionally, I am already in very good research group: SAnToS lab. Thus, it was only make sense to apply for better Schools.

K-State was on my list of Universities, that “I’m sure I will be admitted”. Finally I didn’t apply for PhD program at Kansas State University, because I got a job offer from company I wanted to work for.

After rejection, I sent e-mail to every University asking about rejection reason. Most of them replied, that they “cannot provide details, because of high number of applications”. Only Stanford gave me outline of reasons:

  • low score in some sections of GRE (50% in Writing, 45% in Verbal), it is good to have around 90% in every section
  • low GPA: my 4.72 in Poland, converted to USA scale is ~3.23; good students in USA have GPS greater than 3.5 (usually close to 4.0)
  • no publications (top Universities like even Undergraduate students with publications)

They also recommended me to enroll for some Graduate Courses via their Non-Degree Option program. Then, after getting good grades (A+) I will have higher chances to be admitted.


PhD studies might be very good experience and adventure. Especially in USA, where you have opportunity and environment to work on technologies of tomorrow. I was lucky to have this chance during my Master studies. I am working for SAnToS Lab. Our main research areas are Formal Methods and Medical Devices. We have access to pre-releases of IDE (GNAT Programming Studio), which are public 6 or more months later. We are working on standards for Medical Devices, which will be (or not) in the Industry after 20 years from now. It is a lot of other cool stuff, which I describe in the other post.

Before you decide pursuing PhD, be aware that it will take 5-6 years (or even more) and you will be around 30 years old when you graduate. During this time you can gain experience in industry or start your own company. Of course you can cancel your PhD studies, but it is better to really think about it before you start application procedure. It also take a lot of time, during which you can applying to some great companies or creating apps.

Regular Expression Translator

Another class I am taking this semester (except Real-Time Systems which I blogged about) is Formal Language Theory. It is very theoretical course. Most of the time is spend on formal proofs. Fortunately, one programming assignment was very fun.

The goal was to implement the program, which checks if one regular expression is subset of another. Thus, the input is two regular expressions.

RegEx AutomatasThe program use basic regular expressions notation and supports following operators:

  • + (union)
  • * (Kleene closure)
  • ε (Epsilon, empty expression)
  • 0,1,2 (literals)

To solve the problem, I had to take advantage of finite automatas (ε-NFA and DFA) in following order:

  1. Parse regular expressions E1 and E2
  2. Create ε-NFAs N1 and N2 using Visitor pattern and transition described here
  3. Convert ε-NFAs N1 and N2 to DFAs D1 and D2 based on this
  4. Create D’I DFA, which is intersection of D1 and D2 DFAs generated in step 3

Implementation details


  • Eclipse
  • Scala
  • Java
  • ANTLRWorks 2
  • Scala JUnit tests

I took advantage of ANTLR for parsing. I want to learn Scala and I am using it for every programming assignment in this semester if possible. ANTLRWorks 2 does not support Scala (it does not generate parser/lexer/visitor in Scala). However, ANTLRWorks 2 generates Java and interoperability between Scala and Java is easy. I decided to try it!

Scala is a main language in which this application was developed. ANTLRWorks 2 was used for parsing regular expression. The new version (v.2) generates Visitor class, which enables iterating through AST (Abstract Syntax Tree) nodes and perform appropriate actions. As I mentioned, ANTLRWorks 2 does not generate Scala code yet. Thus the generated parser and Visitor is in Java language.

During the intersection of DFAs creation, there is an exception thrown in 2 cases:

  • There exists some node of newly created D’I DFA, which is sum of D1 final node and D2 not final node
  • Some transition, which exists in D1 leads to dead node in D2

Exception contains string, which is accepted by L(E1), but not by L(E2). Then, this string is returned as a result of execution. If no exception was thrown, it means, every final state of D1 is also final state of D2. That means L(E1) ∈ L(E2) and ‘true’ is returned.

Running program

The main program is Main.scala. You can find there String variables defined with sample Regular Expressions. The easiest way is to replace them (if you want to test different ones). You can also read input from the console (by commenting and uncommenting appropriate lines).

Empty regular exception cause Exception throw.

There is also set of unit tests to test some regular expressions. You are more than welcome to add new Unit tests if you want to.


Every closure has to have parenthesis: (exp)*
Union also require parenthesis and multiple unions are allowed: (exp1+exp2+exp3)
Sample inputs:

  • (0+1+2)*
  • ((0(0+2)*+1)*+2)
  • ((0(0+2)*+1)*+2+12+(00+21)*+0000110102)

Details about accepted input can be found in ANTLR grammar file.


In this assignment I was able to reuse my knowledge about compilers, learnt last semester in Compilers course I had. Additionally I had to implement automata representation and apply recursion to accomplish required tasks.

It is very simple translator. Handle only basic regular expressions and small language (only 0,1,2 literals allowed). However, the goal was to practice and understand how Regular Expressions work internally.

You can check the code of my translator on github: RegExpTranslator.

Compilers course I had

In the last semester (Fall 2013) I had a pleasure to take course CIS706 – Translator Design (aka Compilers) with Dr Robby at Kansas State University. It was great experience! I think it is the best course I have ever taken.

The way how this course is designed is just amazing. During course about compilers you will also learn many other useful things:

  • Java
  • Eclipse
  • Source Control (git)
  • Unit Testing (JUnit) and TDD
  • Reading legacy code
  • Java Byte Code

How? You have to build the compiler for simple, Java based language called ExtendedStaticJava. You have 4 homeworks: parsing, building AST (Abstract Syntax Tree), type checking and byte code generation. For each of them you have ‘legacy’ code, which implements compiler for StaticJava. Your task is to extend it to handle ExtendedStaticJava syntax. For each homework you get around 100 Unit Tests. Your grade depends on number of passing tests. If all test are passing you get 100%. Implementation does not matter…but you might need to pay for workarounds later, because each homework is based on the code from previous one. I experienced this. I made a few hacks in first homework and then I needed to fix them during homework 2. It cost me extra time and I had to send incomplete solution. It is exactly how it goes in “Real World”!

For final project (last month of semester) we needed to create ExtendedStaticJava to C transpiler with Garbage Collector. Transpiler is source-to-source compiler. In other words: resulting code was C with Garbage Collector calls (GC was also implemented by us in C). We reused our homeworks (without byte code generation part) and generated C code (with GC calls) using StringTemplate.

Let’s take a look how all above help us to be better developers.

Most of students probably already know Java. If not – this course is the best time to learn. Java and C# are the most popular, static typing programming languages (today). When you learn one of them – it is easy to catch up with another. Java is still the most popular language in case of job offers (source):

traditional Language Job Trends - Indeed

Thus, probability that you will be programming in Java after you graduate is pretty high. When you will be programming in Java, you will be probably using Eclipse – its most popular IDE. Another ‘standard’ in industry is Source Control. If the company you are working for is not using it – you should change your company(!), because something wrong is going on there. If you are not familiar with git (leader in Open Source community, now being adapted by the industry) then this course is the best time to learn. Nowadays, even big companies (e.g. Microsoft) open sourcing their code (e.g. ASP.NET or SignalR), which is available through git.

Unit testing is very popular nowadays. Lots of commercial projects use this technique to ensure software quality and development stability. Many projects are also using TDD (Test Driven Development) approach. First your write the test (as the requirement) and then code. When test pass, you refactor the code. During the course we were using JUnit (for now: No.1 Unit Test Framework for Java). Additionally, when you learn how to work with Unit Tests, then picking up a different framework is very easy (even in different language).

Software Development is a team work. Because of that, you will need to read code of other developers everyday. In most of courses during your University career you need to create some applications from scratch. Sometimes you are working in team of 2 or 3 people. Then in your first job, you get 100 000 lines of code written by somebody else. Often without documentation and sometimes people who wrote this code are not working there anymore. In other words – you’re screwed. Compilers class will prepare you for that. During the course you will need to understand the existing code (StaticJava compiler), extend it and introduce some changes to get ExtendedStaticJava compiler working and Unit Tests passing.

Besides learning Java, you will also learn how JVM (Java Virtual Machine) and ByteCode are working. The idea of intermediate code is also used in C#: code is compiled to an Intermediate Language (IL) which then runs in the Common Language Runtime (CLR). It is very helpful for understanding how high-level code is translated to Assembly language.

It is also worth to mention about the essence of the course: compilers. The course is based on the popular Dragon Book. You will learn about every stage of compiling: lexical analysis, parsing, creating AST (Abstract Syntax Tree), semantic analysis, optimization and code generation. For parsing and AST creation you will use ANTLR, which is the most popular tool for such purpose nowadays. Finally you will get understanding, what is going on between your high-level code and electrical impulses flowing in your computer.

Even if you know all of these things (Java, Eclipse, git, Unit testing) it is still worth to take this class. You will apply your knowledge in practice and learn about compilers. This knowledge is useful not only to understand how computers work, but also to learn about algorithms and data structures, which are applied there.

You can find more information about CIS706 on compilers website. Moreover the StaticJava code is available on github: There is also nice Compilers Course by Stanford University on Coursera, which can be used as supplement for this class.

I am back!

Last two months were super busy for me. The end of semester (with compilers course‘s project), applying for a PhD studies, Christmas, New Year’s eve in Poland, and a job interview. I will tell you more about all of those things later in separated posts. Maybe not all, Christmas and New Year’s eve experience I will keep for myself 🙂

I am happy that all above is accomplished and I can get back to my routine (programming, blogging, reading books and learning new things).

It is worth to summarize the last year, which was quite successful:

  1. I started Master of Science in Computer Science program at the Kansas State University.
  2. I started this blog.
  3. I created twitter account and started using it.
  4. I co-organized dotNetConfPL (with Michal Franc and Pawel Sawicz).
  5. I almost maintained 4.0 GPA (I have 3.8 for now).
  6. I applied for Microsoft Student Partner position, but Microsoft rejected me.

The main goals for this year are:

  1. Graduate with Master of Science degree from Kansas State University.
  2. Start a new job.
  3. Run dotNetConfPL 2014.

I also would like to finally attend Dev Day conference in Kraków, but I am not sure if I will be in Poland on September 26.

During ‘the break’ I came up with a lot of ideas. I have 6 drafts for blog posts, 5 topics for a blog posts on the to do list and tons of ‘new, cool things’ to check out. When you get busy, because of School, work, personal issues etc. – don’t worry. Take a break, get all of more important things done and once you get back, you will be more happy and motivated than before.

don't just wish for a great 2014, make it so

Research Assistant Job – Project Sireum

Since January 2013 I am Master student at Kansas State University. I am also Research Assistant at SAnToS lab.

Bakar toolset

Since the beginning I am working on project Sireum. It is focused on toolset for analyzing Spark/Ada programs: Bakar. Spark is subset of Ada programming language extended by code contracts. More info here. Bakar contains two main tools: Alir (information flow analysis tool) and Kiasan (verification tool for code contracts).

The Kiasan tool is based on symbolic execution. Simply saying: it checks all possible code paths and discover possible issues (like variable overflow, side effects etc.). More info about Spark contracts can be found in Tokeneer Discovery Tutorial. Comprehensive description of Kiasan in contained in this paper.

Kiasan plugin for GPS

My first task was to integrate Kiasan tool (Java app) with GPS (GNAT Programming Studio).

I have never working on IDE plugins before. It was something totally new for me. That’s why I was excited.

Plugins for GPS are written in PyGTK (Python graphic library). First I needed to learn Python and PyGTK. Then I followed GPS documentation (especially chapters 16 and 18).

The sample flow of running Kiasan plugin is as follows:

  • right click on method (which you want to analyze) and choose ‘Run Kiasan’
  • handle this event and get method name and package name (will be needed to run Kiasan)
  • run external Java program (Kiasan.jar) from Python code (it has command line interface, so I just needed to execute method), which generates JSON report
  • parse JSON report and display it in the PyGTK window attached to the GPS
  • add code highlighting, dependent on chosen method or case (in report window by double-click)

GPS along with Kiasan plugin is available in Sireum distribution, which can be downloaded from

In the demo below I am showing how to install Sireum distribution and GPS with Kiasan plugin on Windows.

By the way: Sireum Project is Open Source on github!

Do I like GRA job? Yes. It is very nice experience. I am able to work on Mac. I didn’t have this opportunity before (I wouldn’t buy it soon probably). I was able to learn Python (and PyGTK). I learn Design by Contract. I learn how to create plugin for IDE (GNAT Programming Studio). We have continues integration server – Jenkins: I learn how to manage it. I explore the World of ‘High Assurance Software’ and Ada programming language, which is most common in such environment. It is totally different than working as software developer in some company.

Recently I started working on second SAnToS’ project: Medical Device Coordination Framework. Another interesting thing. But I will tell you about it in another post.

Interesting fact: Ada programming language was named after Ada Lovelace (1815–1852), who is credited as being the first computer programmer.