BBM 101 - Introduction to Programming I
Drawing of Analytical Engine. Image: University of Cambridge
This course serves as an introduction to the fundamentals of computer science and programming. It aims to help students with little or no programming experience to gain necessary skills to work with abstract notions for solving computational problems. The course is structured around basic topics such as control flow, functions, lists, input and output, simple data structures (sets, dictionaries), testing and debugging, recursion and pointers. The class will use the Python and C programming languages as a medium to provide a basic understanding of basic concepts in computer science, and the students will gain hand-on experience via a set of programming assignments supplied in the complementary BBM 103 Introduction to Programming Practicum.
Time and Location
Section 1: Wednesday at 13:00-15:50 in Room D1
Section 2: Wednesday at 13:00-14:50 in Room D2, Thursday at 13:00-13:50 in Room D2
Section 3: Wednesday at 13:00-14:50 in Room D3, Thursday at 13:00-13:50 in Room D3
Section 1: Friday at 15:00-16:30 in Room D1
Section 2: Thursday at 14:00-15:30 in Room D2
Section 3: Thursday at 15:45-17:15 in Room D3
Fuat Akal (Section 1)firstname.lastname@example.org
Erkut Erdem (Section 2)email@example.com
Aykut Erdem (Section 3)firstname.lastname@example.org
Info. Sec. Lab. (Z06)
The course webpage will be updated regularly throughout the semester with lecture notes, programming and reading assignments and important deadlines. All other course related communications will be carried out through Piazza. Please enroll it by following the link https://piazza.com/hacettepe.edu.tr/fall2016/bbm101.
Students are not expected to have any prior programming experience.
Course Requirements and Grading
Grading for BBM 101 will be based on
- two midterm exams (25%+30%),
- a final exam (40%), and
- class participation (5%).
- a set of quizzes, and
- five programming assignments (done individually).
All work on assignments must be done individually unless stated otherwise. You are encouraged to discuss with your classmates about the given assignments, but these discussions should be carried out in an abstract way. That is, discussions related to a particular solution to a specific problem (either in actual code or in the pseudocode) will not be tolerated.
In short, turning in someone else’s work, in whole or in part, as your own will be considered as a violation of academic integrity. Please note that the former condition also holds for the material found on the web as everything on the web has been written by someone else.
Introduction to Computation and Programming Using Python, Second Edition, John V. Guttag, MIT Press, August 2016
The Python Tutorial (available from the Python website)
Think Python, 2nd edition, Allen B. Downey (freely available online)
The C Programming Language, 2nd Edition, Brian Kernighan and Dennis Ritchie, Prentice Hall, 1988
Practical C Programming 3rd Edition, Steve Oualline, O'Reilly Media, 1997
|1||Oct 5||Course Introduction [slides] [4-per-page] What is computation? [slides] [4-per-page]||Reading: Guttag 1, Downey 1
Video: The birth of the computer, George Dyson
|2||Oct 12||Binary representations and the Von Neumann architecture [slides] [4-per-page] Week 2 Lab Handouts [Using Piazza] [Linux Commands and Submit System]||PA1 out [Assignment1]|
|3||Oct 19||Introduction to Python and Programming [slides] [4-per-page], Control flow [slides] [4-per-page] Week 3 Lab Handouts [Programming in Python] [Python Example]||Reading: Guttag 2.2-2.4, Downey 5.1-5.7|
|4||Oct 26||Functions [slides] [4-per-page], Collections [slides] [4-per-page], Lists [slides] [4-per-page], Sets [slides] [4-per-page] Week 4 Lab Handouts [Programming Topics] [Exercises]||PA1 due
Reading: Guttag 4.0-4.2, 4.4, 5.1, 5.2, 5.4, 5.5, Downey 3, 10,12
|5||Nov 2||Dictionaries [slides] [4-per-page], File I/O [slides] [slides], Sorting [slides] [4-per-page] Week 5 Lab Handouts [Programming Topics] [Exercise]||PA2 out [Assignment2]
Reading: Guttag 5.6, 4.6, 10.2, Downey 11, 14
|6||Nov 9||Midterm exam 1 Week 6 Lab Handout [Programming Topics]||Reading:|
|7||Nov 16||Debugging [slides] [4-per-page], Exception Handling [slides] [4-per-page], Testing [slides] [4-per-page] Week 7 Lab Handout [Programming Topics]||PA2 due, PA3 out [Assignment3]
Reading: Guttag 6, 7, Downey Debugging sections of each chapter, Appendix A
|8||Nov 23||Development Strategies, Function Design [slides] [4-per-page], Algorithmic speed [slides] [4-per-page] Week 8 Lab Handout [Programming Topics]||Reading: Guttag 4.2, 9, Downey 3.12, Appendix B]|
|9||Nov 30||List comprehensions [slides] [4-per-page], Data Visualization [slides] [4-per-page], Statistics [slides] [4-per-page] Week 9 Lab Handout [Programming Topics]||PA3 due
Reading: Guttag 5.3.2, 11,14-16
|10||Dec 7||Recursion [slides] [4-per-page] Week 10 Lab Handout [Programming Topics]||PA4 out [Assignment4]
Reading: Guttag 4.3, 4.3.1, Downey 5.8-5.10, 6.5
|11||Dec 14||Midterm exam 2 Week 11 Lab Handout [Programming Topics]|
|12||Dec 21||C for Python programmers [slides] [4-per-page] Week 12 Lab Handout [Programming Topics]||PA4 due, PA5 out [Assignment5]
Reading: The Resurgence of C Programming: Do You Still Need to Write Code to Build Cool Machines?, Mike Barlow
|13||Dec 28||Pointers in C [slides] [4-per-page] Week 13 Lab Handout [Programming Topics]||Reading: Kernighan and Ritchie 5.6-5.11|
|14||Jan 4||Pointers in C (cont'd.)||PA5 due|
General purpose text editors
Setting up Python
PyCharm Edu Integrated Development Environment (IDE) will be used in laboratory classes for learning how to program with Python.
- PyCharm Edu and Python Installation Guide
- Getting Started with PyCharm Edu - a quickstart manual
- Guide to compiling your code on department servers
Resources for C language
Tools for C
The most efficient way of developing a C program is to use a Unix environment:
- Compiler: gcc
- Debugger: gdb, valgrind
- Editor: Vim, Emacs, or Sublime Text
To mimic a Unix programming environment on your own computer, you have the following options:
- On a Linux distribution:
sudo apt-get install build-essentialor equivalent.
- On Mac OS 10.6.6 or later: Install Xcode from the App Store, open it, go to Preferences > Downloads > Components and download "Command Line Tools".
- On Windows: Install cygwin. Please check the packages
IDEs for C
Your programs need to work in the standard environment as we evaluate them on
dev.cs.hacettepe.edu.tr. However, if you'd like to use a GUI, these are the IDEs that seem to work well:
- Code::Blocks (Linux, Mac OS X, Windows)
- Eclipse (Linux, Mac OS X, Windows)
- Xcode (Mac OS X)
- Visual Studio (Windows)