2018/2019, Semester 1
School of Computing (Computer Science)
Modular Credits: 4
The main website for CS1010 is
. You will find everything you need for CS1010 there. We will use IVLE only for class roster and Gradebook.
This module introduces the fundamental concepts of problem solving by computing and programming using an imperative programming language. It is the first and foremost introductory course in computing. It is also the first part of a three-part series on introductory programming and problem solving by computing, which also includes CS1020 and CS2010. Topics covered include problem solving by computing, writing pseudo-codes, basic problem formulation and problem solving, program development, coding, testing and debugging, fundamental programming constructs (variables, types, expressions, assignments, functions, control structures, etc.), fundamental data structures: arrays, strings and structures, simple file processing, and basic recursion. This module is appropriate for SoC students.
After taking the course, students should
be familiar with fundamental programming concepts and methodology (variables, assignments, conditions, branches, loops, functions, recursions, structures)
be familiar with and appreciate good programming practice, and apply it to follow-up courses,
be able to apply problem-solving knowledge and skills to write small, well-documented, effective C programs,
be able to appreciate the use of simple data structure such as array, know their limitations to pave way for more complex data structures in the next course, and
know the responsibilities of an ethical programmer.
be able to write simple programs in the corresponding programming language to solve a task, given the constraints on the inputs.
be able to manually trace through a program to identify logical errors
be able to differentiate between logical errors, syntax errors, and run-time errors
be exposed informally to the concept of code specification in the form of comments in the code, explaining what are the expected inputs and outputs and what are the assumptions.
know about what are some insecure functions to avoid
be able to generate test cases on their own, with a focus on boundary/special cases.
be able to debug with printf or equivalent functions.
be aware of common strategies and good practices of debugging with printf or equivalent functions.
be able to identify opportunities to modularize the code.
be exposed to a debugger
be able to write code following good programming style (clear comments, naming convention, indentation, etc.)
understand the different data types and that there exists a representation of each in the memory, as well as the limitation of the representations due to the limited number of bits.
develop a simple mental model of how a program is executed (CPU runs the code on data that is stored in memory, function call leads to the creation of call frames, which can explain recursion and variable scoping, etc).
be able to understand at a high level the compilation process (from pre-processing to compiling to linking), where applicable.
understand the concept of reusability and how a software application can be built on top of software libraries/packages (standard or third parties.
be able to implement bubble sort and insertion sort
be able to implement linear search and binary search (both iterative and recursive versions)
Every week, there will be a 2-hour lecture and a 2-hour small group discussion / in-lab activities.
The topics covered in CS1010 includes (not in order):
Computational thinking and problem solving
Functional abstraction and recursion
Variables and types
Looping and branching
Arrays, structure, and data abstraction
Pointers and memory
Searching and sorting
Input and output
Good programming practices
Environmental model for program execution
Assertion and invariant
Tools (editor, debugger, linter)
CG1101, CS1010E, CS1010FC, CS1010S, CS1101, CS1101C, CS1101S. Engineering and Science students who require this module for their majors/minors are not allowed to read it as ULR-Breadth.
Workload Components : A-B-C-D-E
A: no. of lecture hours per week
B: no. of tutorial hours per week
C: no. of lab hours per week
D: no. of hours for projects, assignments, fieldwork etc per week
E: no. of hours for preparatory work by a student per week