BBM 101 - Introduction to Programming I (Fall 2015)

Lectures: Wednesdays 13:00-15:50 @D1 (Sec. 1), @D2 (Sec. 2), @D3 (Sec. 3), @D4 (Sec. 4)
Practicum (BBM103): Thursdays 13:00-14:50

When human beings acquired language, we learned not just how to listen but how to speak. When we gained literacy, we learned not just how to read but how to write. And as we move into an increasingly digital reality, we must learn not just how to use programs but to make them.

In the emerging, highly programmed landscape ahead, you will either create the software or you will be the software. It's really that simple: Program, or be programmed. Choose the former, and you gain access to the control panel of civilization. Choose the latter, and it could be the last real choice you get to make.
Douglas Rushkoff, in Program or Be Programmed: Ten Commands for a Digital Age (2010)

Instructors:

Aykut Erdem (Sec. 1)

aykut-at-cs-hacettepe.edu.tr
111
+90 312 297 7500, 146

Erkut Erdem (Sec. 2)

erkut-at-cs-hacettepe.edu.tr
114
+90 312 297 7500, 149

Fuat Akal (Sec. 3)

akal-at-cs-hacettepe.edu.tr
202
+90 312 297 7500, 129

Vahid Garousi (Sec. 3)

vahid-at-cs-hacettepe.edu.tr
201
+90 312 297 7500, 128

Teaching Assistants:

Levent Karacan

karacan-at-cs-hacettepe.edu.tr
HUCVL
+90 312 297 7500, 152

Burcak Asal

basal-at-cs-hacettepe.edu.tr
122
+90 312 297 7500, 166

Selim Yilmaz

selimy-at-cs-hacettepe.edu.tr
INFOSEC
+90 312 297 7500

Feyza Nur Cubukcuoglu

feyza.cubukcuoglu-at-hacettepe.edu.tr
121
+90 312 297 7500

Course Description

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.

Schedule (Tentative)

:
Week Date Topic Notes
1 Sep 16 What is computational thinking? Introduction to Python [slides] [4-per-page] Reading: Guttag 1, Downey 1
Video: The birth of the computer, George Dyson
2 Sep 23 No class (Religious holiday)
3 Sep 30 Control flow [slides] [4-per-page], Functions [slides] [4-per-page] PA1 out
Reading: Guttag 2.2-2.4, 4.0-4.2, Downey 3, 5.1-5.7
4 Oct 7 Collections [slides] [4-per-page], Lists [slides] [4-per-page], Sets [slides] [4-per-page], Dictionaries [slides] [4-per-page], File I/O [slides slides] Reading: Guttag 5.4, 4.6, 5.1, 5.2, 5.5, Downey 10-12, 14
[Exercise 1, Solution] [Exercise 2, Solution] [Exercise 3, Solution]
5 Oct 14 Sorting [slides] [4-per-page] PA1 due
Reading: Guttag 10.2
6 Oct 21 Midterm exam 1 PA2 out
Reading:
7 Oct 28No class (Republic day)
8 Nov 4 Exception Handling [slides] [4-per-page], Debugging [slides] [4-per-page], Testing [slides] [4-per-page] PA2 due, PA3 out
Reading: Guttag 6, 7, Downey Debugging sections of each chapter, Appendix A
[Exercise 4]
9 Nov 11 Development Strategies, Function Design [slides] [4-per-page], Algorithmic speed [slides] [4-per-page] Reading: Guttag 4.2, 9, Downey 3.12, Appendix B
[Exercise 5]
10 Nov 18 List comprehensions [slides] [4-per-page], Data Visualization [slides] [4-per-page], Statistics [slides] [4-per-page] PA3 due
Reading: Guttag 5.2.2, 11-14, 16
RiseSetData.zip [Exercise 6, Solution]
11 Nov 25 Recursion [slides] [4-per-page] PA4 out
Reading: Guttag 4.3, 4.3.1, Downey 5.8-5.10, 6.5 [Exercise 7, Solution]
12 Dec 2 Midterm exam 2 Reading:
13 Dec 9 C for Python programmers [slides] [4-per-page] PA4 due, PA5 out
Reading:
[Exercise 8, Solution]
14 Dec 16 Pointers in C [slides] [4-per-page] Reading: Kernighan and Ritchie 5.6-5.11
[Exercise 9, Solution]
15 Dec 23 Pointers in C (cont'd.) PA5 due

Acknowledgements

The materials used in this class largely rely on lecture notes by Ruth E. Anderson taught in CSE 140 Data Programming, Computer Science & Engineering at the University of Washington (as credited within).

Grading

2 Midterm exams 55% (25 + 30)
Final exam 40%
Class participation    5%

Reference Books

  • The Python Tutorial (available from the Python website)
  • Think Python, 2nd edition, Allen B. Downey (freely available online)
  • Introduction to Computation and Programming Using Python, revised and expanded edition, John V. Guttag, MIT Press, 2013
  • 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

Important Dates

Programming Assignment 1    1 October, 2015
Programming Assignment 2 22 October 2015
Programming Assignment 3 5 November 2015
Programming Assignment 4 26 November 2015
Programming Assignment 5 10 December 2015
Midterm Exam 1 21 October 2015
Midterm Exam 2 2 December 2015
Final Exam To be announced later..

Setting up Python

Resources for C language

  • The C Library Reference Guide
  • ISO/IEC 9899 Committee Draft
  • Learning C with GDB
  • C Language Tutorial
  • C FAQ

Tools for C

Standard Environment

The most efficient way of developing a C program is to use a Unix environment:

  • Command-line
  • 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-essential or 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 gcc-core, gcc-g++, gdb.

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)

General purpose text editors

  • Vim (Linux, OS X, Windows)
  • Emacs (Linux, OS X, Windows)
  • Sublime Text (Linux, OS X, Windows)

Communication:

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/fall2015/bbm101

For the BBM 103 related communications, you should also enroll that course in Piazza through the link https://piazza.com/hacettepe.edu.tr/fall2015/bbm103

Policies:

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.

Fall 2014 version


© 2015 Hacettepe University