All students concentrating in computer science must take three prerequisite computer science courses: COS 126, COS 217 and COS 226. AB candidates must also take Math 103-104 and one of Math 202 or 204. (The math requirement is automatically fulfilled by BSE candidates through their general BSE degree requirements.) All prerequisite courses must be taken for a letter grade, not PDF. The three prerequisite computer science courses introduce the core concepts and techniques of the field. All three are offered every semester.
COS 126 - General Computer Science
COS 126: General Computer Science, is a broad technical introduction to the field. It is required for all engineering students as well as prospective computer science concentrators. Normally, one completes this course by the end of freshman year.
COS 126 Description from the course website:
"An introduction to computer science in the context of scientific, engineering, and commercial applications. The goal of the course is to teach basic principles and practical issues, while at the same time preparing students to use computers effectively for applications in computer science, physics, biology, chemistry, engineering, and other disciplines. Topics include: programming in Java; hardware and software systems; algorithms and data structures; fundamental principles of computation; and scientific computing, including simulation, optimization, and data analysis."
COS 217 - Introduction to Programming Systems & COS 226 - Algorithms and Data Structures
These are complementary courses, COS 217 deals with the organization of the computing machine itself and the design of core programs needed to use the machine. COS 226 deals with the design and evaluation of efficient algorithms for tasks that are essential to a preponderance of systems programs and applications. It also addresses the efficient organizations of data essential to these algorithms. Normally, both COS 217 and COS 226 are completed by the end of sophomore year.
COS 217 Description from the course website:
"The purpose of this course is to provide the fundamental background necessary to understand, design and implement the components of programming systems. Examples of such components include text editors, assemblers, compilers, loaders, interpreters, and portions of operating systems. The course is divided into three major parts: machine organization and assembly language programming, program design and development, and software tools."
COS 226 Description from the course website:
"This course surveys the most important algorithms and data structures in use on computers today. Particular emphasis is given to algorithms for sorting, searching, and string processing. Fundamental algorithms in a number of other areas are covered as well, including geometric and graph algorithms. The course will concentrate on developing implementations, understanding their performance characteristics, and estimating their potential effectiveness in applications."
What to take when
A common question amongst undergraduates is when to take these three courses. The main goal for any prospective major should be to have these three courses taken care of by the end of sophomore year. It is possible for students to pass out of 126, but many students who technically pass out still take the course in the beginning of freshman year. This is for good reason: COS 126 offers a good "refresh" of material learned in high school and also covers topics not covered in typical high school courses..
Once a student takes (or passed out of) 126, the next decision is whether to take 217 or 226 first, or to take them simultaneously. There is no straight answer to this question. Students who take them simultaneously may find the course load very heavy, so this is generally not advised unless you are an older student is catching up, or a glutton for punishment. The curricula of the courses are largely different and neither relies on the material of the other, so both orders are equally valid.
I did a lot a programming in high school, so do I have to take 126?
It depends. There's more to computer science (and more to COS 126) than programming, and there's plenty of material in 126 to interest and challenge even experienced programmers. Nevertheless, students who feel they should be placed directly in to 217 and 226 should set up an interview with the Freshman placement officer, who can be found in the advisors page.
I did no programming at all in high school, so doesn't this put me at a disadvantage in 126?
What scheduling issues should I consider when deciding whether to take 217 or 226 first?
How do I decide if I can handle taking COS 226 and COS 217 at the same time?
Taking COS 226 and COS 217 at the same time is a very difficult, heavy load. Taking them in either order (226 first and then 217, or 217 first and then 226) is much easier for almost every student. We use the following grade guidelines when making recommendations:
- Received an A in COS 126: Will be able to take COS 226 and COS 217 simultaneously.
- Received a B in COS 126: Will struggle significantly if taking COS 226 and COS 217 simultaneously. Should take them in separate semesters.
- Received a C in COS 126: May struggle significantly taking COS 226 and COS 217 in separate semesters. Should never take them in the same semester. A COS major is not recommended.
I took Integrated Science (ISC) in the Fall this year, but I decided not to continue in the spring. Do I have to retake COS 126?
Please see the Freshman placement officer for placement advice and evaluation. Normally, we try to do whatever is in the student's best educational interest. One option is placing the student directly into COS 217 or COS 226, if the student is prepared. Another option is taking COS 126 for a grade. (We would accept the programming assignments the student turned in as part of ISC, or the student could redo these from scratch.)
If I fail a prerequisite, can I take departmentals that depend upon this course?
Students who flunk prerequisites cannot take departmentals that depend on them under any circumstances. While this policy may appear severe, we adhere to it because of bad experiences under previous policies.
Beyond COS 126, COS 217, COS 226, what courses should I take in my first two years?
All freshman take a writing seminar in the fall or spring. If you are a BSE candidates, you must fulfill the math, physics, and chemistry BSE requirements. Although typically chemistry is taken freshman year, you can take it sophomore year. If you are an AB candidate,you must complete your math requirement for computer science. We advise you to also complete your AB science requirement and be well-along in completing your AB language requirement.
I did not take any COS courses in freshman year. Can I still be a CS major?
It is usually possible to major in COS as a BSE or an AB without taking any COS courses during your freshman year, especially if you have taken some Math. For example, if you are a BSE student and you took MAT 103 and MAT 104, PHY 103 and PHY 104, and CHM 203 in freshman year, then you can take COS 126 plus one of MAT 201 or 203 in the sophomore fall, and COS 217 and COS 226 plus MAT 202 or 204 in the spring. After that, you're on track to take 8 departmentals (two each semester) and a semester of independent work during your senior year.
If you are an AB student, you must complete MAT 103-104 by the end of the sophomore year. MAT 202 or 204 (students entering Princeton before fall 2015 may use MAT 175) should be completed by the end of the sophomore year, but can be deferred under very unusual circumstances until the fall semester of the junior year. You would take COS 126 in the sophomore fall, and 217 and 226 in the spring. After that, you're on track to take 8 departmentals (two each semester), your two semesters of junior independent work, and your senior thesis.
You may ask “but wait, didn’t you just recommend against taking COS 217 and COS 226 at the same time?" True. You can postpone one of COS 217 or COS 226 until junior fall, but you will want to find a departmental course (300 or above) that has only the one you’ve taken as prerequisite to also take junior fall. But be warned – there are only a few possibilities; most 300 and 400-level COS courses require both COS 217 and COS 226. AB students must be particularly careful because you must also find a fall junior independent work topic with less than the typical CS background.
I'm a spring-semester sophomore. By the end of the spring semester, COS 126 will be my only COS course. Can I still be a CS major?
It is incredibly difficult to become a CS major if you have taken COS 126 and no other courses by the end of your sophomore year. If you are a BSE, you should have the math background already (through MAT 202 or 204). In your first semester in junior year, you would probably take COS 226, COS 217 and either COS 323 or COS 340. This is an extremely difficult load -- many students find doing both COS 226 and COS 217 simultaneously very difficult. Very few students can handle the even tougher load of COS 226 and 217 in conjunction with 323 or 340. Many students, particularly those with weaker math background, find COS 340 alone very challenging. Do not plan on having any life outside of computer science if this is the path you choose. If you can manage to get through that semester, you will still need to take 7 COS departmentals in the final 3 semesters at Princeton and you will also need to do one semester of independent work on top of that. If you plan to attempt this course of action, make an appointment to see the departmental representative and come with a full schedule of every COS course you plan to take (assume the COS schedule is the same as it has been the last few years). Only students with excellent performance in 126, exceptional reasons, motivation and other background will be allowed to pursue this kind of curriculum.
If you are an AB, the path is even more difficult. On top of all the hurdles above, you will have to do 2 semesters of junior independent work and a senior thesis. The junior independent work requirement is the most difficult requirement to fulfill having taken only COS 126 by the end of the sophomore year. There are very few projects that a COS major can engage in that satisfy the junior independent work criteria with so little experience. Entry in to the COS major at this point as an AB will only be allowed under truly exceptional circumstances. On top of demonstrating excellence in COS 126 and perhaps other computing background, having math background equivalent to MAT 202 or 204 (having taken MAT 175 is acceptable if you began Princeton before fall 2015) having exceptional reasons for making this late change, and exceptional motivation, you will have to demonstrate that you have a satisfactory idea for junior independent work in advance, the background to implement the idea, and a faculty advisor willing to supervise you. Make an appointment to see the departmental representative and come with a full plan of study.
If you are in this situation, we recommend that you consider the Applications in Computing Certificate instead of the CS major. This way, you can load up on as much COS as you can reasonably fit in to your schedule, but you are not constrained by the specifics of the CS Major requirements.