Summary and Setup
This site holds the Practical “worksheets” for COMP1005 Fundamentals of Programming
COMP1005 Practical Worksheets are being updated, and will be linked below when available:
- Practical 00 - Introduction to Linux
- Practical 01 - Introduction to Python
- Practical 02 - Lists and Strings
- Practical 03 - Arrays and Plotting
- Practical 04 - Multi-dimensional Arrays and Functions
- Practical 05 - Files and Grids
- Practical 06 - Modelling the World with Objects
- Practical 07 - Object Relationships and Exception Handling
- Practical 08 - Scripts and Automation
- Practical 09 - Quality and Testing
- Practical 10 - Applications: Data Processing and Analytics
- Practical 11 - Applications: Engineering and Science
Setup instructions for home machines and mydesktop are given below.
Software Setup
Details
During class, we provide access to Virtual Machines https://mydesktop.curtin.edu.au. You can also use these from home via any web browser (Firefox, Chrome, Safari etc.).
A local setup is often faster, and does not rely on using the Internet. See below for options…
You will need a terminal emulator - an application that looks and works like the termainl in Linux. We recommend Gitbash, but you have quite a few options:
- Gitbash - an interface for the git version control system, but also a highly functional terminal program
- Windows Sybsystem for Linux - Developers can access the power of both Windows and Linux at the same time on a Windows machine. Requires Windows 10 or higher
- mobaxterm - MobaXterm provides all the important remote network tools (SSH, X11, RDP, VNC, FTP, MOSH, …) and Unix commands (bash, ls, cat, sed, grep, awk, rsync, …) to Windows desktop, in a single portable exe file which works out of the box.
- Powershell - PowerShell is a modern command shell that includes the best features of other popular shells. Unlike most shells that only accept and return text, PowerShell accepts and returns .NET objects. (I found the autocomplete unpredictable, so stopped using it)
If you don’t have Python version 3 installed, visit either of:
- Python Software Foundation - the official home of Python
- Anaconda Distribution - a curated set of Python tools
Use Terminal.app (type terminal
in search/spotlight) and
check to see that you have python installed, by typing
python
or python3
.
If you don’t have Python version 3 installed, visit either of:
- Python Software Foundation - the official home of Python
- Anaconda Distribution - a curated set of Python tools
Use Terminal and check to see that you have python installed, by
typing python
or python3
.
If you don’t have Python version 3 installed, visit either of:
- Python Software Foundation - the official home of Python
- Anaconda Distribution - a curated set of Python tools
Customising Mydesktop
Terminal window themes
There is a lot of customisation possible with the
terminal
window in Linux, but we will just look at “light”
and “dark” themes. In the terminal menu, select
edit/prefs
.
![Select edit/prefs in the terminal menu](fig/P01pref.png)
Then choose General
and click on Theme variant to select
dark
.
![Select dark then close](fig/P01theme.png)
To go from dark to light…, in the terminal menu, select
edit/prefs
.
![Select edit/prefs in the terminal menu](fig/P01pref_d.png)
Then choose General
and click on Theme variant to select
light
.
![Select dark then close](fig/P01theme_d.png)
Changing the sleep settings
It may get annoying to keep putting the password in each time the
virtual machine goes to sleep. The default timeout is 5
minutes, which can be increased to 15 minutes, or to “never”
(probably not a good idea). Select Preferences
at the top
right of the Virtual Machine and then Power
to change this
setting.
![Select preferences and then Power at the top right of the Virtual Machine](fig/P01timeout.png)