All labs will be online. Please see our guide to online labs to find out how to participate.

Labs are where you will work on practical programming skills, under the guidance of experienced tutors.

Read the tasks for the week before you attend the labs, and make a plan on how to approach and solve the tasks ahead of time. The tutors will be are there to help and give you feedback for your ideas (not to do the job for you).

The lab documents are finalised by close of business Friday in the week before the lab — otherwise they are just a sneak preview (and can still change).

Acknowledgements

Material in these labs was developed in 2019 and 2020 by Debashish Chakraborty, David Quarel, Joshua Corner, and Ranald Clouston, building on previous labs developed by Uwe Zimmer, James Barker, Clem Baker-Finch, Tony Hosking, Ekaterina Lebedeva, and many others. Copyright © 2020 The Australian National University, All Rights Reserved.

Schedule and Tutors

Please only email your tutor for non-general or personal questions that cannot be posted on Piazza. You must include the course code (e.g., COMP1100) in the subject of the email along with a useful title, e.g., COMP1100 - Lab 1 Mark missing

» read more

Week 0: Before you start

It is essential that you use StReaMS to enroll in a lab session before Week 1 (this will be available from Week 0).

» read more

Week 1: ANU environment, Linux, Haskell

Due to COVID-19, this course is being delivered mostly (if not entirely) online. Working remotely comes with challenges, but there are a number of ways for you to do your work. For details please see our guide to working remotely. Here we will quickly walk you through one way of working remotely.

  1. If you are on-campus and already connected to the ANU network you can skip this step. Otherwise if you are off-campus, you must be set up to use ANU’s Virtual Private Network (VPN) solution called GlobalProtect. Follow the instructions at https://services.anu.edu.au/information-technology/login-access/remote-access/download-globalprotect-for-windows-or-mac to download and install GlobalProtect on your computer, and then follow the instructions there to connect to GlobalConnect. Students should use the portal student-access.anu.edu.au to connect to ANU’s network.
  2. Click on the following link to access the lab environment: https://linuxvdi.anu.edu.au. For now, we will work entirely within the browser, but you will likely find it best to go back after this lab and follow the remote working instructions to install and configure the VMWare Horizon client for your device. For now, click on the “VMWare Horizon HTML Access” option to bring up the login window for our lab environment, and begin work as follows.

» read more

Week 2: Gitlab, VSCodium and More Haskell

This week’s lab will introduce you to more important parts of the computing environment of this course, particularly Gitlab, which will be used every time you submit work. We will then further introduce you to programming with Haskell.

» read more

Week 3: Algebraic Data Types, Pattern matching, and Guards

In this lab we will look at algebraic data types, pattern matching with the case command, and guarded expressions.

» read more

Week 4: Cabal and CodeWorld

In this lab, we will meet the Cabal package manager, which helps us work on projects with dependencies between multiple files. We will then program with the codeworld-api library, which provides us with types and functions for drawing and transforming various shapes.

» read more

Week 5: Recursion and Lists

In this lab we learn about the concept of recursion, which gives us the ability to “loop”, or repeat the same instruction many times over. We also investigate our first recursive data type, lists, that can pack many instances of a type together. We will write recursive functions over integers and lists.

» read more

Week 6: More Lists, Parametric polymorphism, Recursive Data Types

This lab covers more recursive functions over lists, the concept of parametric polymorphism, and how it can be used to write functions that operate on more general types than before. We will see some examples of custom recursive data types, and how to write recursive functions over them.

» read more

Week 7: Style and Testing

This lab covers two aspects of code quality: style, which is the way to write readable code; and verifying correctness via testing.

» read more

Week 8: Higher Order Functions

In this lab we cover higher order functions - particulary, functions that can take other functions as input. These can be used to avoid rewriting common code patterns, and generalise many patterns of recursion that we’ve already seen.

» read more

Week 9: Trees

In this lab we cover the concept of trees, how they differ to lists, and how we can write recursive functions that operate on trees.

» read more

Week 10: Type Classes, Ad Hoc Polymorphism, Binary Search Trees

In this lab, we cover type classes and ad hoc polymorphism, and how we can use these concepts to generalise functions that require some assumptions about the input type. We also continue the topic of trees from last lab, and introduce binary search trees, which are trees with a special ordering constraint that gives them a great advantage over binary trees in terms of computational efficiency.

» read more

Week 11: Complexity

In this lab we discuss the topic of algorithmic complexity is, and learn how to determine the complexity of a particular algorithm. We also learn how to use big-O notation to describe complexity.

» read more

Week 12: Exam Prep

In this lab we recap the course, and provide lots of exercises for you to work on with your peers to help prepare for the final exam.

» read more

Updated:    02 Feb 2021 / Responsible Officer:    Director, RSCS / Page Contact:    Course Convenor