Skip to main content

Course Outlines

COMP 1510

Programming Methods

School School of Computing and Academic Studies
Program Computer Systems Technology Diploma
Course Credits 7
Minimum Passing Grade 50%
Start Date September 03, 2019
End Date December 13, 2019
Total Hours* 105
Total Weeks 15
Hours/Weeks 7
Delivery Type Lecture
CRN 44913

Acknowledgement of Territories

The British Columbia Institute of Technology acknowledges that our campuses are located on the unceded traditional territories of the Coast Salish Nations of Sḵwx̱wú7mesh (Squamish), səl̓ilwətaɁɬ (Tsleil-Waututh), and xwməθkwəy̓əm (Musqueam).

Instructor Details

Name Christopher Thompson
E-mail chris_thompson@bcit.ca
Location to be announced
Office Hours

Please contact me via email or Slack. Office hours will be announced.

Course Description

This hands-on course is the foundation for all future programming courses and complements COMP 1536 and COMP 1910. This course introduces the fundamental concepts of programming including design, development, testing, debugging simple programs, as well as error-handling, and problem solving.

Course Learning Outcomes/Competencies

Upon successful completion of this course, the student will be able to:

  • Design, implement, debug and test simple object-oriented programs in a modern high-level programming language.
  • Write programs using good software development processes including design before implementation, encapsulation, information hiding, message passing, decomposition and testing.
  • Analyze and explain behaviour of simple programs involving fundamental programming constructs.
  • Apply the techniques of decomposition to break a program into smaller modules with well-defined interfaces
  • Write automated tests to verify the correctness of their code.
  • Explain the representation and use of primitive data types and built-in data structures, including arrays and strings.
  • Explain the value of application programming interfaces (APIs) in software development.
  • Use variables, control statements, and input/output.
  • Use error handling to deal with exceptional circumstances.

Learning Resources

Textbook (Recommended but not required)

  • Gaddis, Tony. (2018). Starting out with Python 4th Edition. Pearson.

Software (Required)

  • Python 3.7.4 (or later)
  • PyCharm Professional IDE (most recent version)
  • A Free Student Developer Pack from Github

Evaluation Criteria

Criteria % Comments
Quizzes 10
Labs 10
Assignments 20
Midterm 25 Scheduled during midterm week
Final Exam 35 Scheduled during final exam week

Attendance Requirements

Regular attendance in lectures, seminars, and labs is seen as critical to student success, and may be monitored by faculty.

Unapproved absence of 2 or more classes may result in failure or forced withdrawal from the course or program.

Please see Policy 5101 - Student Regulations: https://www.bcit.ca/files/pdf/policies/5101.pdf

Course Schedule and Assignments

WEEK LECTURE 1 TOPICS LECTURE 2 TOPICS LECTURE 3 TOPICS ASSIGNMENTS
1 LABOUR DAY NO CLASS LABOUR DAY NO CLASS Intro; logistics; communicating with Slack; selected history of programming; programming language levels; programming language paradigms; introduction to Python; Zen of Python; commands and expressions
2 Data types and why we need them: int, float (including NaN and inf), None, bool, and the rest (starting with str); variables and assignment; CLI and paths; intro to text editors and IDEs; PyCharm; introduction to version control using git and GitHub Four cornerstones of problem solving using computational thinking: decomposition, abstraction, pattern matching, algorithms; structured code using control statements for sequence, selection, repetition, and indirection; flowcharts Programming lifecycle; sequence in Python; selection (branching) in Python using if, if-else, and if-elif-else statements; sys.args for command line arguments; Python keywords; naming conventions; operators and operands; operator precedence; () [] {} and <> A1
3 Strings in detail; ASCII, Unicode, and code points; mutability; dot syntax; basic input; data conversion and str(), int(), float(), etc.; indirection and functions; built-in functions like type() and len(); the anatomy of the function; comments and docstrings for functions and modules Functional decomposition; decomposition examples and techniques; readability, standards, and lint; argument passing semantics (pass by reference); compiling vs interpreting; duck typing (static vs dynamic) and strong vs weak typing Formatting output (f-strings, str.format, and %-formatting); the main function; passing command line arguments to the main function; scope; compound operators; constants
4 Python memory mode (variables, references, addresses, objects, interning, identity is/id() vs equality ==); passing functions to functions as objects; standard library; math module Errors, synax and semantics; debugging; debugging with PyCharm; testing; automated testing; assertions; doctests; unit testing; testing coverage; disjointed equivalency partitions More unit testing examples; boolean expressions; short-circuiting; floats and rounding; memory management and garbage collection A1 due; A2
5 Intro to data structures and containers; lists; working with lists; membership operators in and not in; intro to repetition (looping) with the for-loop Range function; slicing lists; copying (deep vs shallow copies); lists and identity vs equality; tuples; intro to dictionaries Working with dictionaries; iteration; iterables and iterators; ranges vs iterators vs views; itertools and zip(); using enumerate() instead of range
6 Syntactic sugar and list and dictionary comprehensions; nested data structures; repetition (looping) with while; sentinel values; breaking out of loops Infinite loops; exhaustive enumeration; sets; pass statement; syntatic sugar and conditional expressions; loops and user input More about unit testing (expected errors, fixtures; mocking; generating input for tests; testing printed output; creating 'predictable' random numbers) A2 due
7 THANKSGIVING NO CLASS THANKSGIVING NO CLASS More about functions: default values; variable length parameter lists; positional and arbitrary arguments; keyword arguments; annotations; function decorators; building good functions (a review) A3
8 MIDTERMS NO CLASS

MIDTERMS NO CLASS

MIDTERMS NO CLASS
9 Modules and packages; refactoring; code smells and the refactoring catalog: 1. the basics 2. encapsulation 3. moving features around 4. organizing data 5. clarifying logic 6. refactoring simple APIs Exceptions; try-except-else-finally; guard clauses are wasteful (LBYL vs EAFP); file IO; opening, reading from, writing to, closing, deleting files; context managers and else blocks; file-like objects Unit testing: testing for expected exceptions and file existence; intro to classes; attributes; class-level variables; instance initializers, validation, and invariants; methods; classes vs objects; state
10 Designing good classes: responsibility-driven design, design before implimentation, decomposition and Abbot's heuristic; visibility; encapsulation and information hiding Message passing; UML and simple relationships between objects; coupling and cohesion; unit testing classes Introducing OO Python APIs for desktop, web, and data science; Python API exploration (GUI and pygame) A3 due; A4
11 REMEMBRANCE DAY NO CLASS REMEMBRANCE DAY NO CLASS Python API exploration (Regular expressions; random numbers; working with JSON)
12 Python API exploration (Keeping time, scheduling tasks, launching programs) Python API exploration (matplotlib) Python API exploration (Manipulating images) A4 due; A5
13 Python API exploration (Serving Python from Raspberry Pi) Python API exploration (Serving Python from Raspberry Pi) Python API exploration (Serving Python from Raspberry Pi)
14 Python API exploration (Serving Python from Raspberry Pi) Python API exploration (Serving Python from Raspberry Pi) Final Exam review: three pillars (code, tests, version control) four cornerstones (decomposition, abstraction, pattern matching, algorithms) four structures (sequence, selection, repetition, indirection) A5 due
15 FINAL EXAMS NO CLASS FINAL EXAMS NO CLASS FINAL EXAMS NO CLASS

BCIT Policy

The following statements are in accordance with the BCIT Policies 5101, 5102, 5104, and 7507, and their accompanying procedures. To review these policies and procedures please click on the links below.

Attendance/Illness:
In case of illness or other unavoidable cause of absence, the student must communicate as soon as possible with his/her instructor or Program Head or Chief Instructor, indicating the reason for the absence. Students who are seeking accommodation for a medical absence must have a BCIT approved medical certificate submitted to the department, substantiating the reason for absence. For other absences, the student should be prepared to provide appropriate supporting documentation. Unapproved absence in excess of the prescribed regulations within this outline may result in failure or forced withdrawal from the course or program. Please see Policy 5101 - Student Regulations, and accompanying procedures.

Academic Integrity:
Violation of academic integrity, including plagiarism, dishonesty in assignments, examinations, or other academic performances are prohibited and will be handled in accordance with Policy 5104 - Academic Integrity and Appeals, and accompanying procedures.

Accommodation:
Any student who may require accommodation from BCIT because of a physical or mental disability should refer to BCIT's Policy on Accommodation for Students with Disabilities (Policy #4501), and contact BCIT's Accessibility Services (SW1 2360, 604-451-6963) at the earliest possible time. Requests for accommodation must be made to Accessibility Services, and should not be made to a course instructor or Program area.

Any student who needs special assistance in the event of a medical emergency or building evacuation (either because of a disability or for any other reason) should promptly inform their course instructor(s) and Accessibility Services of their personal circumstances.

Human Rights, Harassment and Discrimination:
The BCIT community is made up of individuals from every ability, background, experience and identity, each contributing uniquely to the richness and diversity of the BCIT community as a whole. In recognition of this, and the intrinsic value of our diversity, BCIT seeks to foster a climate of collaboration, understanding and mutual respect between all members of the community and ensure an inclusive accessible working and learning environment where everyone can succeed.

Campus Mediation Services is a supportive resource for both students and employees of BCIT, to foster a respectful learning and working environment. Any student who feels that they are experiencing discrimination or harassment (personal or human rights-related) can confidentially access this resource for advice and support. Please see Policy 7507 – Harassment and Discrimination and accompanying procedure.

Students should make themselves aware of additional Education, Administration, Safety and other BCIT policies listed at https://www.bcit.ca/about/administration/policies.shtml

Guidelines for School of Computing and Academic Studies

Attempts:
Students must successfully complete a course within a maximum of three (3) attempts at the course. Students with two attempts in a single course will be allowed to repeat the course only upon special written permission from the Associate Dean. Students who have not successfully completed a course within three attempts will not be eligible to graduate from their respective program.

Approved

I verify that the content of this course outline is current.
Christopher Thompson, Instructor
August 28, 2019

I verify that this course outline has been reviewed.
D'Arcy Smith, Program Head
August 29, 2019

I verify that this course outline has been reviewed and complies with BCIT policy.
Aaron Hunter, Acting Associate Dean
August 29, 2019

Note: Students will be given reasonable notice if changes are required to the content of this course outline.

*Course hours and credits are calculated per Policy 5012 and the associated procedure.

Total hours – Example of 3 credit lecture/lab course:

  • Full-time course: 45 hours of scheduled learning
  • Flexible Learning course: 36 hours of scheduled learning plus 9 hours of independent (non-scheduled, non-instructional) learning