Description of Course Goals and Curriculum
This course gives a general background and overview of computer science as a discipline and as a tool in the context of its many interdisciplinary applications. It teaches Java, one of the most widely used programming languages, and provides a solid foundation for students who have never programmed before, but also a good overview and more in-depth extension for students who have some, but limited programming experience. While a requirement for computer science majors and students in the School of Engineering, COS 126 teaches skills that are broadly applicable and is consequently taken by students from all disciplines.
The curriculum of the course can be divided into several main goals: first, to introduce and orient beginning programmers to basic programming concepts and practices with emphasis on programming logic, basic data structures and algorithms, object-oriented and modular programming, style - clear and concise coding, and analysis of programming efficiency - performance in terms of memory and timing, second, to explain the primary principles behind computer science and programming as considered through the computer as a machine - hardware and software, third, to give a general survey of theoretical computer science, the ongoing questions within the discipline, in order to point to broader implications and significance of problems in computation and areas that are open for exploration and improvement including computability and intractability - P and NP, abstract understanding of what a machine is at its essence, and finally, to understand the importance and uses of computer science and programming in the context of practical applications in the modern world.
COS 126 as a class is taught through lectures and readings, class meetings, precepts, programming assignments, and programming and written exams. Lectures are online videos that introduce and explain important concepts and general ideas, and readings cover similar topics to lectures but in more detail. Precepts cover concepts from lectures through applied problems and programming exercises. Programming assignments provide practice for applying concepts learned in lecture to practical and interesting problems, and help students understand and use programming principles, logic, data structures, and style. Class meetings provide additional guidance for assignments. The way the class is designed and graded is intended to emphasize the important concepts behind being a good programmer and developing the critical coding habits (style, performance, etc) that all successful coders need and use, so to be successful in the course it is helpful to keep this big picture in mind.
Learning From Classroom Instruction
All the lectures that cover the main concepts of the course are online, which means students can decide on their own time when to watch them and at what pace. Lecture slides are also provided for students’ use. They are comprehensive and cover all the important concepts and principles that a student needs to do well in assignments and exams. Lectures are typically one hour long, divided into 10 to 20 minute sections, and students are expected to watch two lectures a week and to complete the lectures before coming to precept, which is typically on Thursday or Friday. Because lectures are online, it is easy to delay watching until the last minute but because there are two a week, it is important to keep up with lectures so as to not fall behind; there are no “official” checks to ensure that you watch the lectures online but they are covered extensively on the written exams and it is not feasible to watch all of them at once right before the exam. Since they are not in a traditional “lecture” format and there are no mandatory/designated days to watch them, it may be helpful to set out two specific days a week to watch the weekly lectures so that you can keep that structure and stay on track.
It is also helpful to take advantage of the fact that lectures are on YouTube to pause when something is confusing to think about it more, or to play it double/1.5/half speed depending on what is better to keep your concentration. Students may also find it helpful to take notes during lectures, which makes review for the written exams more efficient. In fact written exams typically ask one question related to each lecture so it is important to grasp the main ideas from each lecture. Although each lecture is divided into sections, the sections follow immediately after each other so while watching them separately may be easier in terms of time commitment, it may make more sense to watch a whole lecture at once. On the other hand, even though you have to watch two lectures a week it is perfectly fine and often even better to watch the two lectures separately rather than in one sitting because each lecture is quite long and dense.
Textbook readings cover essentially the same material as lectures but in greater detail, so while some students may find it helpful to use textbooks as review of the same information from lecture and others may find it helpful to explain things that lectures skimmed over, they are ultimately not absolutely necessary to succeeding in the course and understanding all the material. If you watch the lectures and everything from the lecture makes sense, and have no trouble with programming assignments, then it is fine to skip or skim over the textbook readings.
Precepts and preceptors are somewhat underutilized but are especially helpful for clarifying concepts from lecture that were confusing and for preparing for written exams, arguably the most difficult part of the course. Precepts assume that you have watched the lectures beforehand, so that is also something to keep in mind. Precepts are optional, so to make the most of precepts you should decide whether you have a good grasp of the lecture material and attend precept if you have questions or are unclear. Precept worksheets are especially helpful for preparing from written exams because they offer problems that similarly test your understanding of core concepts, so it is worth the time to make sure you are able to complete the worksheet questions on your own. The programming exercises in precept are also a good way to prepare for the programming exams. Preceptors can be especially helpful when you can identify the specific concepts you are having trouble with understanding, or which type of problems you need help solving, so it is best to come to precept with specific questions or issues in mind.
Class meetings are also optional, and are meant to provide guidance on programming assignments. You should read the assignment specifications before going to the class meeting, and if you are able to, try starting the assignment or planning out ideas before attending the class meeting. If you find the assignment straightforward and have no trouble figuring out what it is asking you to do and how to go about solving it, then the class meeting is not necessary or very helpful. The class meeting is more useful if you are not sure what the assignment requires you to do or how to approach it, and in that case is useful for giving an overview of the assignment and how to start it.
Learning For and From Assignments
Programming assignments are the one of the most essential components of the course and this is reflected in their large weight in the final course grade. Programming assignments get more difficult successively as the course moves forward in the first few weeks but students also tend to become more adept at debugging their programs and become more comfortable with programming logic. Programming assignments are important because they help students gain practical coding experience, understanding the design, development, and debugging process, and emphasize fundamental programming principles such as clear and concise written code, and thinking about how to improve the program in terms of design and efficiency.
Students can make best use of these assignments by really thinking about how to improve their programs to make efficient use of memory and time, and how their programs use important data structures such as arrays, queues, stacks, or symbol tables. The debugging process - finding errors and issues with your code and fixing them - may seem frustrating or tedious but is really a hugely beneficial learning process and critically important for becoming a better programmer. One thing to help with the debugging process is to test every piece of your code (i.e. every new method/constructor you write) right after writing it so that you know it works and it makes it easier to narrow down the bug in your program later. The Checklist that accompanies the programming assignments is also extremely helpful and provides progress steps as well as frequently asked questions to guide you in the process of writing your program. Typically if you follow every progress step there is very little room for mistakes in terms of design because they will usually either strongly hint at or directly tell you which data structures, methods, etc. to use. Additionally, make sure to read and completely understand the program specifications before you try to start writing code, because otherwise you make take a lot of time writing code that does not answer/solve the right problem or does not meet the code/performance requirements. Above all, make sure you turn in a program that compiles and follows the specified API.
“Readme.txt” files, which are written responses students submit with each programming assignment, are vital for reflecting on the programming process. They typically ask questions about the program, how it is implemented, and how its performance runs. As a grader, I’ve found that this is one of the more often neglected parts of students’ assignments, but make sure to answer every question completely and thoughtfully not only because it is a part of your programming grade but also because it helps solidify your understanding of programming concepts through your reflection and analysis of your own program and how it works.
Make good use of the automated checks that they provide you. The tests from the autochecks are labeled so if you fail one you know what kind of test cases they are trying that are making your program crash or return incorrect results. Students often only look at the number of checks passed, but if you look at the specific test cases that are causing problems it is much faster to debug. Another part of the programming assignments many students overlook is “checkstyle,” and documenting the code (comments). Checkstyle is important because one of the most important properties of a good program is readability and clarity, not only because you need to be able to look back at your program and know what each part does, but because others need to be able to look at your program and know what the purpose of each method or part of your code is intended to do. Do not ignore the style guidelines and documentation - even if your program passes all the correctness checks it may fail checkstyle checks and you will still lose points because it is an important concept that COS 126 emphasizes and is still important later on in further COS courses and in programming in general.
The programming exams, one approximately halfway through the course and the other towards the end of the course, are much shorter than the programming assignments. The best way to prepare for these is to do practice programming exams under timed conditions. The programming exams are open-book and open course materials, but lectures and textbook are rarely helpful for programming exams in terms of concepts such as theory. The textbook and course materials may, however, be helpful if you are looking for what a specific method does or which methods a given class has. The second programming exam is harder than the first because it requires that you understand and use data structures such as queues, stacks, and symbol tables. It is advisable to download those classes beforehand and to know very well the methods of each.
The written exams primarily test that you’ve watched and processed the lectures and the concepts they cover. You are allowed a one-page cheat sheet so the best way to utilize it is to write down the things that are more memorization-heavy such as Java syntax specificities and some circuit elements and theory definitions. To practice for written exams do many of the practice exams provided on the website - they vary little from year to year so it is a good way to practice your application for the concepts, to assess how you’re doing in terms of understanding the concepts from lectures, and to identify the areas that need review or where you still have trouble understanding the concepts. A key difficulty with the written exams is the time constraint so it is a good idea to take the practice exams under exam-like conditions.
Piazza is a great resource for any questions you have on the lecture content, how to solve practice exam problems, specific issues or questions on the assignments, or general questions about the course logistics. It is also helpful in that you can see what other students are asking because often times their questions may also apply to you. If you have time you can also answer other students’ answers - it is good practice for making sure you understand the material well enough to explain it to other people.
Lab TAs are also available for help on programming assignments, but are typically more helpful when you can identify what specific problems you need help with. For example, if you know which test cases your program fails on, that is helpful for the Lab TAs to know in figuring out how to help you fix your program.
Aside from the textbook, the booksite (see syllabus) is a helpful guide - it is a very condensed version of the textbook, basically summarizing important concepts. It can also be helpful when reviewing for written exams and seeing which concepts you still need to figure out and what things you should put on your cheatsheet.
What Students Should Know About This Course For Purposes Of Course Selection
COS 126 is a requirement for all BSE students, satisfies a QR distribution requirement for AB students, and is a prerequisite for COS majors and for the following COS courses in the COS prerequisite sequence (226, 217). Many students from all disciplines take this course because it teaches useful skills widely applicable in any field. Moreover, as the course emphasizes, the effects and applications of computer science are ubiquitous in the modern world The course provides the foundational programming skills and knowledge that students can use Students who have any interest in software or are considering computer science as a major or minor should take this course.
COS 217 is taught in C, not Java, but draws from and relies on the basic underlying principles of programming that COS 126 teaches. COS 226 is quite a step up in difficulty from COS 126 but is also in Java and COS 126 provides the sufficient knowledge and skills to be able to take COS 226. COS 226 builds upon the data structures and algorithms that COS 126 introduces.
Students who have taken AP Computer Science will find that the first three to four weeks of COS 126 are essentially review, but moving forward the majority of the course is new and covers many things that the AP course did not cover, including data structures such as the queue, stack, and symbol table, as well as the basic concepts of theoretical computer science. The AP course is thus not sufficient preparation for the following COS courses (226, 217), although students who have extensive programming experience or have taken a more advanced computer science course before should consult the departmental representatives for information on placement.
This course is not graded on a curve, and although many of the students will have come in with prior knowledge, it is very accessible to beginners who have had no exposure to computer science or programming and with sufficient work and asking for help when needed, it is not difficult to obtain a good grade in the course.
COS 126 is not a very time-consuming course on average; aside from optional class meetings and precept and two hours of online lectures a week, most weekly programming assignments take 4-6 hours for the average student, and more or less depending on how comfortable a student is and becomes with programming logic.
The course does take a step up in difficulty from the third/fourth weeks on, so students shopping the course during add/drop should keep in mind that the first two weeks are substantially easier and lighter than the rest of the course.