COMP 105: Information all students must know


CS Basics. You must grasp basic algorithms, data structures, and good programming practice.

Unix. You must understand the basics of files, directories, creating and editing files, printing, compiling and loading programs, and using make. You will be much, much happier if you also can write a simple shell script (sh) and use Awk and grep effectively. Kernighan and Pike cover these topics at the appropriate level.

Theory/Discrete Math. You must be comfortable with basic discrete mathematics and you must be able to prove theorems, especially by induction. We assume that you have taken Discrete Math (Math 61 or COMP 61). If you have not, you must produce some other evidence that you can reason precisely about computational objects. You should be able to write an informal mathematical proof. For example, you should be able to prove that a sort function returns the same set of elements that it was passed. You should be comfortable using basic mathematical formulas with “forall” and “exists” quantifiers, i.e., the propositional and predicate calculi. You should know basic set theory, e.g., the mathematical definition of functions as sets of ordered pairs. You should be comfortable reading and writing formal mathematical notation, or at least not run screaming from the room when it appears.

Programming. You should have substantial programming experience. Students without such experience will have difficulty keeping up with the homework. Proficiency in C is needed for a few homework assignments; if you have a strong background in C++, some details will be different, but your background should be sufficient. Your programming experience should include work with dynamically allocated data structures and with recursive functions. You should be very comfortable writing recursive functions in the language of your choice, as well as proving that such functions terminate. You should have implemented some of the basic data structures and algorithms used in computer science, like stacks, queues, lists, tables, search trees, standard sorts (quick, insertion, merge, heap), topological sort, and graph algorithms. These topics are well covered in COMP 15 at Tufts. Prior exposure to exhaustive search (backtracking) will also be helpful.

Some students spend many, many hours thrashing out homework assignments. This course uses unusual programming paradigms, and the techniques you are accustomed to may not be much help. Although this material is not a formal prerequisite for this course, you will be happier if you have a nodding acquaintance with formal methods, including the following intellectual tools:

You can brush up on this material by looking at the article by Bentley on the reading list. Chapter 4 of Liskov and Guttag has a nice tutorial on reasoning about data, which you will find helpful in several assignments.

Good Work Habits. The most important prerequisites for this course cannot be taught. To do well in this or any other course that involves programming, develop these habits:

If you have these habits, the other prerequisites are almost irrelevant. If you don't, you can expect to have trouble no matter what your background.

Interactions are Expected

Engineering is not a solitary profession. To maximize your chances of success in 105 and beyond, I have designed some interactive experiences into the class.

Spontaneous interactions may be welcome or unwelcome depending on the interaction:

Class participation

A portion of your grade is based on your participation in class. This phrase encompasses a variety of activities that demonstrate you are engaged actively in managing your own learning, developing new skills, and undertanding new ways of programming and problem-solving. To earn high grades for class participation, you must show that you are so engaged. You can show this engagement in a variety of ways:

Nobody has to do all of these things; you can earn top grades for class participation by doing just a few things well. In particular, nobody is required to speak in class, but everybody should be prepared to answer questions if called upon. What questions are appropriate? Any question about programming languages. However, it may not be appropriate to insist that every question be tracked to its lair and answered. If a question becomes inappropriate during class, I will let you know.


In this class, you will learn most of the material on your own as you complete the homework assignments. The importance of homework is reflected in the weight it is assigned. Most homework for this course involves short programming assignments. Many of them will be based on the text by Ramsey. There will be also be some larger programming assignments. There will be some theory homework, involving more proving and less programming.

As in most classes, it helps to start the homework early. But in 105, starting early seems to produce unusually good benefits. Many students report that if they start early, even if they don't appear to make much progress, a solution will “come to them” while they are doing something else.

Another reason to start early is that if you get stuck, early help is a lot better than late help. 105 is a large course, and your difficulties could be overlooked until they get out of control. Keep an eye on yourself, and remember that a short conversation during office hours or recitation can save hours of aimless frustration.

If you complete and understand all the homework assignments, you are almost certain to do well on the exams and earn a high grade. If you miss assignments or don't really understand the homework, it will be difficult for you to earn a satisfactory grade. Details about how we determine your grade on homework assigments, for exams, and in the course are available.

Format of homework

Your written work must carry your name, and it must be neat and well organized. Clear English expression is required; grammar and spelling count. The same requirements apply to exams.

If you can, use a computer to prepare your written work. We highly recommend that you prepare your theory homework using LaTeX. We also recommend the mathpartir style file. It should already be installed on the departmental computers. For a personal machine, you can download it directly or install it as a Debian package. For an example of mathpartir in use, you can look at the LaTeX source code for a simple proof system. You can also look at LaTex source code for typesetting operational semantics (Thanks to Sam Guyer for providing this example file). There are also many useful tutorials online for learning how to use LaTex. You can find out about many other useful LaTeX packages from the LaTeX Companion. There is a second edition, but I've linked to the first edition because it's almost as useful and a lot cheaper.

If you can't use a computer for your written work, write it by hand and scan it. (If you can't scan it, photograph it at high resolution in a strong light, and use the script jpegstopdf on the server Any work that cannot easily be read will receive No Credit.

Every assignment should include a README file that describes the work. This description must

Extra Credit

Most homework assignments will offer opportunities to earn extra credit. I use extra credit to adjust final letter grades. For example, if your grade average falls in the borderline between A- and B+, I will assign you the higher grade at my discretion if you have done extra-credit work. I will also mention extra credit if I write you a letter of recommendation. Extra credit is just that: extra. It is possible to earn an A without doing any extra credit.

Readability of programming assignments

A solution to a problem is of little value if that solution cannot be understood and modified by others. For that reason, your code will be graded on your explanation of what you are doing, its conformance to coding standards, and your results. This page explains our coding-style expectations in detail.


Programming is a creative process. Individuals must reach their own understanding of problems and discover paths to their solutions. During this time, discussions with friends and colleagues are encouraged—you will do much better in the course, and at Tufts, if you find people with whom you regularly discuss problems. But those discussions should take place in English, not in code. If you start communicating in code, you're breaking the rules.

When you reach the coding stage, therefore, group discussions are no longer appropriate. Each program, unless explicitly assigned as a pair problem, must be entirely your own work.

Do not, under any circumstances, permit any other student to see any part of your program, and do not permit yourself to see any part of another student's program. In particular, you may not test or debug another student's code, nor may you have another student test or debug your code. (If you can't get code to work, consult a teaching assistent or the instructor.) Using another's code in any form or writing code for use by another violates the University's academic regulations.

Do not, under any circumstances, post a public question to Piazza that contains any part of your code. Private questions directed to the instructors are OK.

Suspected violations will be reported to the University's Judicial Officer for investigation and adjudication. Be careful! As described in the handbook on academic integrity, the penalties for violation can be severe. A single bad decision made in a moment of weakness could lead to a permanent blot on your academic record.

The same standards apply to all homework assignments; work you submit under your name must be entirely your own work. Always acknowledge those with whom you discuss problems!

Use of the library

You may look in the library (including the Internet, etc.) for ideas on how to solve homework problems, just as you may discuss problems with your classmates. Library sources must be acknowledged when you submit your homework, even if you find little or nothing useful.

Some students rely heavily on the library. Although this behavior is permitted within the letter of the rules, I discourage it. I assign homework problems not because I want to know the answers, but because doing homework is the best way for you to learn. While library skills are important in our profession, the homework in this course is designed to develop other skills that are even more important. Remember, you will not have the library with you when you write your exams or go on job interviews!

Wikipedia considered harmful

For COMP 105 in particular, Wikipedia merits special warning. Wikipedia is a terrible source of information on programming languages. Many of the entries are just plain wrong, and Wikipedia's rules make it nearly impossible for experts to correct bad articles. Don't use Wikipedia for 105.

Late Policy

Homework that is submitted electronically (most homework) will typically be due at 11:59 PM on Monday or at 6:00 PM on a Wednesay. We will grant an automatic extension of fifteen minutes at no cost to you. If you plan on submitting your work at midnight or at six, you will have fourteen minutes for last-minute changes.

Homework is expected to be submitted on time. However, we recognize that the exigencies of college life occasionally interfere with on-time submission. If you have difficulty getting homework in on time, you have several options:

Solutions to homeworks will be placed on the Web after the 24-hour extension deadline has passed.


If we have made a mistake in grading a homework assignment, you have seven days after the return of the assignment to call the mistake to the attention of the teaching staff. You can use the email list to report such problems or go to office hours designated as being for grading questions. Including your utln in such correspondance will make resolving your issue faster. In general, graduate TAs Jared Chandler and Jerett Sierad are the first point of contact.

In such cases, we reserve the right to reassess the entire assignment and assign a new grade. The new grade may be higher or lower than the original grade.

Submission and automatic validation

We will provide a submission script for each assignment. By executing

     use comp105

you ensure that these scripts are on your execution path. It is very convenient to put this line in your .cshrc or .profile file, but to work around a misfeature in use you will need the line

     use -q comp105

Without the -q option you may have difficulties with scp, ssh, git, VNC, or rsync.

A submission script is named submit105-name, so for example the submission script for the first assignment is called submit105-impcore. Normally you should change to the directory in which you have placed your solutions and run the script. Most submission scripts do some sort of sanity checking. If the submission script complains, fix the problems and resubmit.

We encourage you to submit work early and often, even if it is incomplete, so that you have may have an independent check that what you plan to submit is what the course staff are expecting.

Questions and discussion

To reach the course staff, post your question to Piazza. If your question contains any of your code, you must make it private to the instructors. Otherwise, please make it a public question and give your classmates a chance to help you by answering it. By helping to answer your question, your classmates get the opportunity to improve their grades for class participation. Similarly, you get opportunities by answering other people's questions—but your answers must not contain any code you have developed for the assignment. Do as you would be done by, and everyone wins.

I will use information in SIS to enroll most of you in Piazza. But if you are not enrolled, you can enroll yourself using the COMP 105 signup page.

Please never email the course staff directly to their personal accounts. If you have a question that is not suitable as a private question on Piazza, you may write to the staff at But Piazza will be faster.

Finally, if you have posted a question to Piazza and not gotten a timely response, many questions are appropriate to post to Stackoverflow, which can respond very quickly indeed. If you use Stackoverflow, please follow our guidelines.

We make every effort to answer questions in a timely fashion.


All class handouts should be available from the class web page.

Computer software and accounts

The class will be run using Red Hat Enterprise 64-bit Linux, as installed on the departmental servers and in the laboratories in Halligan 116, 118, and 120. For remote access use The software from the book will be installed on these machines, but you can also grab the software and compile it yourself; try

      git clone

If you need an account for CS machines, please send email to Ask for bash as your login shell.

Stupid software tricks

The Linux servers have the wonderful ledit program, which is extremely handy for interacting with our interpreters. Try typing, e.g., ledit impcore, and you will be able to get an interactive editing loop with the impcore interpreter.


Tufts University values the diversity of our students, staff, and faculty, recognizing the important contribution each student makes to our unique community. Students with disabilities are assured that the Student Accessibility Services office will work with each student individually to ensure access to all aspects of student life. Tufts is committed to providing equal access and support to all students through the provision of reasonable accommodations so that each student may access their curricula and achieve their personal and academic potential. If you have a disability that requires reasonable accommodations please contact the Student Accessibility Services office at 617-627-4539, or through their email at to make an appointment with the director to determine appropriate accommodations. Please be aware that accommodations cannot be enacted retroactively, making timeliness a critical aspect for their provision.

Tufts and the teaching staff of Comp105 strive to create a learning environment that is welcoming to students of all backgrounds. If you feel unwelcome for any reason, please let us know so we can work to make things better. You can let us know by talking to anyone on the teaching staff. If you feel uncomfortable talking to members of the teaching staff, consider reaching out to your academic advisor, the department chair, or your dean.

Back to the class home page