syllabus: Introduction to programming 1 [CM1010]

Description

Basic programming techniques. Learn how to use:

* variables
* conditionals
* functions
* loops
* basic OOP techniques
* how to create interactive, graphical computer programs

Goals
  1. Create and run interactive, graphical computer programs
  2. Use variables and conditionals to store and act upon changing program state
  3. Initialise and access arrays of variables, and use loops to work with arrays and iteration
  4. Write custom functions and event handling code
  5. Use encapsulation and constructors to define basic objects
  6. Debug pre-existing program code.

Readings

Programming language is javascript, with the p5js library used for graphical and interactive programming functionality. main external resource: set of online tutorials available from: https://p5js.org/learn/.

Course outline

10 topics divided into 20 weeks. last 2 weeks of the 22 week involve final assessment preparation.

TopicKey conceptsLearning Outcomes
Topic 1. Your development environmentthe toolkit we will use to develop programs; drawing using simple shapes and 2D coordinates; and the process and experience of writing code.Set up the programming tool kit and use it to edit and run programs.
Use built-in drawing functions and 2D coordinates to draw simple shapes on the screen.
Describe the process of writing code.
Topic 2. Drawing in 2Dset of 2D drawing functions in p5.js; colour representation and styles; and debugging with the console.Use the drawing functions to draw lines, ellipses and rectangles.
Use the fill, noFill, background, stroke and noStroke functions to apply styles and colours to shapes.
Use the browser console to identify and fix basic syntax errors.
Topic 3. Variables, objects and interactionvariables and data; simple interaction; and code organisation.Use variables to store program state and use operators to change variables.
Use built-in variables and events to create simple interactivity.
Use appropriately named variables and objects to organise code.
Topic 4. Conditionals and variable typesconditional logic and conditionals with types. You will also learn some new debugging techniques.Use if else blocks to control the flow of a program based on a test condition.
Define test conditions involving variables and logical operators.
Use isolation and printing to identify and repair buggy code.
Design test conditions which are appropriate for different types of variable.
Topic 5. For loops and arraysthe loops and using arrays to store collections of variables.Use arrays to store multiple values.
Use a for loop to run a block of code multiple times.
Use the index within a for loop to produce graphical patterns.
Access items from an array.
Control your workflow for optimal coding.
Topic 6. Advanced arrays and iterationusing arrays and for loops together and using nested for loops to draw grids to the canvas.Use for loops to iterate over an array storing information about scenery.
Use string processing functions to analyse the content of strings.
Explain why coding is an iterative process involving gradual improvement of the product.
Topic 7. User defined functions and scopewriting own functions and understand about their place in Javascript and variable scope.Use functions with parameters and return types to create program modules with well defined purpose.
Use the concept of scope to explain how different parts of a program see different variables.
Explain why modular programming leads to better organised and easier to read code.
Topic 8. Data structures and searches2D arrays that store other arrays. You will learn several coding techniques on how to find specific values in an array.Use nested loops to iterate through 2D arrays of numbers and generate images from them.
Use array push and splice functions to add to and combine arrays.
Use arrays of different types of objects to generate graphics for a game level.
Topic 9. Extending objectsadding functionality to the properties and using the P5 vector object.Differentiate between functions, variables, methods and properties.
Implement objects with methods and properties and use them to model specified problems.
Model enemies and platforms in a video game using objects and arrays.
Topic 10. Constructor functionsthe basics of object orientation and how to write applications that create their own objects using constructor functions and the factory pattern.Define constructor functions that can be used to create and configure new objects.
Differentiate between object literals and constructor functions and select which is the best to use in a given scenario.
Use the splice function to remove objects from an array, being aware of the problems this causes with iteration.

Learning activities

  • Sleuth crime adventure - This activity will teach you the fundamentals of programming. In the adventure, you are a fledgling private investigator working for Sleuth and Co detective agency. Your job is to use your programming skills to solve code crimes which are arranged into cases. During your adventure the chief will keep you on track. This assignment covers the Rookie stage of Sleuth where you can attempt to solve 9 cases. After the deadline you will go Pro and there will be another 7 cases for you to attempt. Your final grade is calculated as an average of your Rookie and Pro scores.
  • Lecture videos - In each topic the concepts you need to know will be presented through a collection of short video lectures. You may stream these videos for playback within the browser by clicking on their titles or download the videos. You may also download the slides that go along with the videos.
  • Practice Quizzes - Each topic will include one practice quizzes, intended for you to assess your understanding of the topics. You will be allowed unlimited attempts at each practice quiz. Each attempt may present a different selection of questions to you. There is no time limit on how long you take to complete each attempt at the quiz. These quizzes do not contribute toward your final score in the class.
  • Peer Reviewed Assignments - There will be one peer reviewed assignment for every part of the game project. You will read a short prompt, then answer several questions about the information provided. You will then be required to review three of your peers' submissions. Peer reviewed assignments will not contribute to your final grade, but will be valuable practice for your game project.
  • Discussion Prompt - Each topic may include one discussion prompt. You will see the discussion prompt alongside other items in the lesson. Each prompt provides a space for you to respond. After responding, you can see and comment on your peers' responses. All prompts and responses are also accessible from the general discussion forum and the module discussion forum.
  • Readings - Each topic may include several suggested readings. They are good supplementary materials for you to further understand the course topics.

How to pass

  • Coursework 1: this consists of two activities that you do on the Coursera platform and which will be assessed halfway through course (week 10 and week 12)
  • Coursework 2: this also consists of two activities that you do on the Coursera platform and which will be assessed in the end the course in week 22.
ActivityRequiredDeadline weekEstimated time per week% of final grade
Sleuth Rookie stageYes1-101-2 hours25%
The game project, parts 1-4Yes122 hour25%
Sleuth Pro stageYes221-2 hours25%
The game project, parts 5-8Yes222 hours25%

Comments

Popular posts from this blog

syllabus: Algorithms and Data Structures 1 [CM1035]

syllabus: Fundamentals of Computer Science [CM1025]

Introduction to Programming - Week 1 and 2 Summary