COMP1007 - Principles of Programming

Note: Whilst every effort is made to keep the syllabus and assessment records correct, the precise details must be checked with the lecturer(s).

Code
COMP1007
Year
1
Prerequisites
None.
Term
1
Taught By
Graham Roberts (50%)
David Clark (50%)
Aims
This course introduces two different programming styles, imperative and functional programming. Its primary intention is to develop key programming and problem solving skills but it has a secondary aim, which is to build students' confidence in their ability to take on and learn new programming languages within a short space of time. In order to achieve these aims, this is an intense and practical course that relies on dedicated and active engagement of the student both within and outside lectures. To provide support for this self-learning, the course has accompanying problem classes that are compulsory.
Learning Outcomes
To be able to: (a) Design, implement, debug and test small programs using at least two different programming paradigms, given simple specifications; (b) Develop simple algorithms to solve a wide range of common programming problems; (c) Use compilers, editors and debuggers; (d) Compare and contrast the different paradigms, understanding the relative advantages and disadvantages of each.

Content:

Introduction to Programming
What is programming? Programs and algorithms.
Compilers and interpreters.
Debugging programs.
Introduction to Functional Programming
Core functional programming ideas.
Programming with relations.
Recursion and recursive data structures such as lists.
Lazy evaluation.
Inference rules.
Unification and resolution.
Negation as failure.
Searching.
Role of types.
Higher order functions.
Introduction to Imperative Programming
Core imperative programming ideas: sequence, selection, iteration, recursion, assignment and variables.
Methods, parameters, scope and lifetime.
Arrays and files.
Program design in the small
Developing small programs using methods and functions.
Designing and implementing simple algorithms and data structures.
Good programming practice and defensive programming.

Method of Instruction:

Lecture presentations, problem classes, programming lab classes, exercises and questions.

Assessment:

The course has the following assessment components:

  • Written Examination (2.5 hours, 80%)
  • Coursework Section (20%)

To pass this course, students must:

  • Obtain an overall pass mark of 40% for all sections combined

The examination rubric is:
Answer BOTH questions from SECTION A, ONE question from SECTION B, and ONE question from SECTION C (FOUR questions in total).

All questions carry equal marks. Note that the coursework is composed of several items.

Resources:

The C Programming Language (2nd Edition) by Brian Kernighan and Dennis Ritchie, published by Prentice Hall, 1988, ISBN-13 978-0131103627

Programming in C by Stephen Kochan, published by SAMS, 2004, ISBN-13 978-0672326660.

Learn You Haskell for Great Good! by Miran Lipovaca, published by No Starch Press, 2011, ISBN-13 978-1593272838

Head First C, David Griffiths and Dawn Griffiths, O'Reilly Media, 978-1449399917, 2012

Two courses can be found on Moodle, one for C, one for Haskell