Home

Programming Practice (CS109)

This webpage is designed not only for the CS109 course that I teach but also to allow you to study programming in Scala on your own. See the self-study section below.

Programming Practice (CS109)

Spring Semester 2015

Students must bring their own laptop computer to this course. Students cannot enroll in this course if they do not have a computer that they can bring to the classroom.

This course introduces basic concepts of programming and computer science, such as dynamic and static typing, dynamic memory allocation, objects and methods, binary representation of numbers, using an editor and compiler from the command line, running programs with arguments from the commmand line, using libraries, and the use of basic data structures such as arrays, lists, sets, and maps.

This course is particularly meant for students who did not learn programming in high school, but who enjoyed programming in CS101 and who want to develop their programming skills.

There will be no lectures in this course, just one four-hour lab each week. I will provide materials (lecture notes and on-line tutorials) that students need to study before coming to the lab. We will start each lab by reviewing and answering questions about these materials, then we will have a short quiz, and we spend the rest of the time on a fun programming project. The difficulty of the projects will slowly increase over the semester. There will be no separate homeworks or projects.

CS109A and CS109B: The only difference between these two sections is that the TAs in CS109B will only speak Korean. In CS109A, you can ask the TAs questions in English or Korean.

Note that both sections start together, and all explanations by the instructor will be in English in both sections.

Self-study

I'm trying to make this webpage and the materials suitable for self-study, for students who cannot take CS109 or who quickly want to improve their programming skills (for instance during the semester break).

I have made a complete written tutorial that walks you through all the material in the course. Read the tutorials on The command line, Introduction to Scala, and Incremental testing, then start working on the programming projects. The difficulty of the projects increases slowly during the course. You'll need to read more of the tutorials as you progress through the projects.

Programming language

In this course we will use the Scala programming language.

In my experience, students develop a style of programming in their first programming language. They find it difficult to learn a different style later, even if they switch to a different language. This means that students should start early to use a modern language that encourages writing clean and elegant code, and supports a good object-oriented and functional style.

We will therefore use Scala in this course. Scala is not yet a popular or successful language (although I believe it will be), and so most students will have to learn C++ and/or Java later during their studies—but I believe that after getting programming practice in Scala, they will be able to write better code in those languages as well.

Course information

Lecturer:
Otfried Cheong Office: E3-1 3434, Phone: 3542.
Teaching assistants

CS109A: 이윤진, 김재명, 문성수.
CS109B: 류연희, 강남용, 천민재.

Office hour

Youjin is offering an office hour every Thursday from 16:00 to 17:30 in room 402 of building N1, where you can ask questions about the self-study material or the projects (or anything else related to the course).

Labs

The class meets Friday from 13:00 to 17:00 in classrooms 111, 103 and 201 in building N1.

At 13:00, all CS109 students should come to classroom 111 to review the material and discuss the project. After that, students separate into two classrooms: 103 for CS109A, and 201 for CS109B.

In CS109B, TAs will only speak Korean. If you do not speak Korean, you must register for CS109A!

Grading policy

Programs will not be graded, because programming is part of the learning experience (it is not an exam).

However, students must submit all programming projects they have done. Grades will be deducted for missing labs without excuse, or for not submitting programs done during the lab. (It is not required to submit all the programs, since different students program with vastly different speed and enter at different levels. You are expected to upload the programs that were marked as done by the TAs.)

The final grade will be composed as follows (small changes reserved):

  • Participation (30%), Midterm (30%), Final (40%).
Again: Students must upload their lab projects to the course submission server. The programs will not be graded, but uploads will count for lab participation, and I can see if students are making progress.
Exams

There will a midterm exam and a final exam. Very probably we will have these as quizzes during the normal lab time (not in the exam weeks).

The midterm exam will be on April 17, from 13:00 to 14:00, in the following classrooms: CS109A takes the exam in room #111, CS109B takes the exam in room #201 of the N1 building.

The final exam will be on June 5, from 13:00 to 14:00, in the following classrooms: CS109A takes the exam in room #111, CS109B takes the exam in room #201 of the N1 building.

Syllabus

Here is a rough list of what we will cover in each week of the semester.

Week 1 Introduction, command line tools
Week 2 Basic scala, command line arguments
Week 3 Types of objects, dynamic and static typing
Week 3 Number types
Week 4 Dynamically allocated objects, stack frames, garbage collection
Week 5 Arrays and lists
Week 6 Sets and maps
Week 7 Strings and text processing
Week 8 Midterm exam
Week 9 Function objects
Week 10 Higher-order functions
Week 11 Compiled programs
Week 12 Objects
Week 13 Object-oriented programming I
Week 14 Object-oriented programming II
Week 15 Reserve
Week 16 Final Exam

Piazza

This term we will be using Piazza for class announcements, discussion, and asking questions.

Here is our Piazza class page.

You are responsible for checking the announcements on our Piazza class page regularly (if you make a Piazza account and enroll for the course, announcements will be mailed to you automatically.)

If you do not understand something, it is important that you ask questions. Piazza allows you to ask questions and get answers from the instructor, the teaching assistants, and your classmates. You can ask questions anonymously, so don't be shy and ask!

Both Korean and English are acceptable on Piazza :-). You make it easier for me if you write in English, but if the TAs can answer your question, then Korean is just fine.

To ask questions, you need to register on Piazza and enroll as a student for CS109. To do so, go to the CS109 enrollment page. Select "Join as student". You will then need to use your KAIST email address (ending with @kaist.ac.kr) to create an account.

Tutorials

Every week you will be assigned to read about certain topics in the course tutorials. You will find each week's assignment posted on Piazza:

It is important that you do not just read through the tutorials briefly. Turn on your computer, and follow the steps of the tutorial on your own computer. That way the material will become active knowledge that you can apply yourself when you program.

Programming projects