Lecture 1: Programming, an introduction
Before I say anything, I’d like you to fill in these three questionnaires.
It’s split into three so that I can’t reverse engineer the data and find out information about you personally. We’ll talk about why I’m doing that in more detail in the lecture on data ethics.
This one takes up a bit more space, so if you want to complete it in it’s own tab, then here’s the link.
OK, once you’re done close your laptop, and let’s get started. (This lets me know how many of you are done.)
If you are incredibly impatient they these are the slides for this lecture:
Course timetable and mark breakdown
This week’s reading :green_book:
Graham, P. (2009). Maker’s Schedule, Manager’s Schedule.
Case, N. (2016). Simulating The World (In Emoji 😘).
Davis, D. (2015). Why Architects Can’t Be Automated.
Doherty, B. (2015). Architects getting automated?
Nielsen, M. (2016). Thought as a Technology
Extra reading :books:
These are important pieces, but not directly related to the course. It’d be good for your development as a human to read these:
In the Lab :microscope:
Get settled in somewhere you can see the big screen, get connected to the internet, and we’ll begin.
Some more admin
A lot of this course is automatically marked. This means that we can spend more time talking to you and solving interesting problems. This does mean that you need to be very precise with some things.
First off, make sure you have a real, grown up, adult email address. [email protected]
isn’t going to look very cool on your CV when you are 40. You exist as a continuous thing. You’ll have various work and uni emails over your life, but it’s important to have a continuous email address. That way you can register yourself as yourself, then associate yourself with your work. When you sign up for Stack Overflow, Medium and Github, use this email address. Speaking of that, sign up for all of them now!
You can also redirect your UNSW email to that address if you like, but make sure you read up on the implications of that.
Getting registered.
We need some details from you so that we can actually know that you exist!
:fork_and_knife: Fork the base repo and rename your fork to not have base in the title.
You can write your name any way you want, that’s just a check. Your student number and clone path must be exactly correct. Your student number starts with a z, and you can find your clone path here:
Now fill in these details:
Back on topic
Because you’ve cloned my version of the base repo, it’s got all of my details in it. You need to change this to have your details. Click the pencil :pencil2: and edit aboutMe.yml
so that it’s got your details.
What you are looking at here is in the YAML format. It’s got keys on the left and values on the right. They are separated by a colon :
so make sure that you don’t use any colons in your values. If you need a colon for some reason then you can put the whole value into quotes. E.g. name: "Vlad: the impaler"
and that’ll behave itself.
That information should be enough for us to make a table of all the information we need to mark your work and to help you achieve greatness this semester!
…and with that:
Finally some programming!
First thing we’re going to do is to practice thinking computationally, before we get caught up in syntax.
Mess about with this, make a letter. The first letter in your name is a good start, but if we can somehow find a way to coordinate making all the letters of the alphabet that’d be extra good!
This week’s homework
- Read the readings, it’s good for you! Constant learning is the most important skill you can have. Think of this as part of a transition. At school, they make you learn. Here, we offer you things that you might like to learn. In the rest of your life you need to find things to learn all by yourself.
- Read the assignment descriptions and the course outline. It might feel dorky, but it’s good to know what you’re getting into! Put all the dates onto your calendar—prepare yourself!
- Buy a notebook. I like Clairefontaine paper1, but you can buy anything. I don’t like Moleskine; they are expensive and the paper is junk.
- Write your first lab book post. You might want to write about your first forays into programming. Maybe about how this week’s lecture and lab is different to any programming you’ve learned before. You could write about things that you encounter in life that you see in a new way after what you’ve learned today. Maybe even put in a photo of your new notebook! Remember to submit it to the publication once you are invited.
- Do this course: try.github.io to get your Git skills up to speed. I found this to be really useful too.
-
Make sure that your VM is working.
This is going to take a few steps.
- Install Virtual Box
- Import the appliance
- Start the VM
- It’ll take you into install mode. Give it your name and a good password.
This will put you into a fresh install of Ubuntu, but with all the things you need for the course pre-installed.
-
Set up Git for to have your variables.
- Open a terminal window. Either do it through the top icon on the toolbar and type
terminal
, or [ctrl]+[alt]+[t], or click the terminal icon in the side bar. -
Type
ls
to list the contents of the current directory. - Check that
variables
andgitSetup.sh
are listed. - To open the variables file in Atom, type
atom variables
. Change the contents to be your name and the email address that you signed up to GitHub with. Save the file and close Atom. - In the terminal type
bash githSetup.sh
and press enter. - …nothing should happen. This is normal. In Unix systems you (usually) only get a message if something goes wrong. Type
git config --list
and press enter. That prints a list of the git config variables so that you can check that they are right.
- Open a terminal window. Either do it through the top icon on the toolbar and type
- Pull your repo. Earlier you forked the course repo on the GitHub web page. We need it to be on your computer.
- In your fork of the base repo, find your clone path:
- in the terminal, type
git clone https://github.com/
yourName/code1161base.git
and press enter. - This will pull down the repo. If you type
ls
to see what’s in the directory. You should seecode1161base
listed. - You need to go into the directory to do things, so
cd code1161base
toc
hanged
irectory. You’ll see your prompt update to match. - You are now in the position that you’ll spend most of the course in, take a deep breath and get comfortable here.
- Run a little check; this is going to be important for your sanity. Make sure you have wifi!
- Type
python week1/pytest.py
and see what happens.
- Submit week 1’s homework!
- Nothing I say now will make sense if you haven’t done the try.github.io course. If you haven’t, do it now.
Add
the two new files created by runningpytest.py
- Then
commit
them with a good message bygit commit -m "a short, descriptive message"
- Then
push
your changes to your repo.
I haven’t given you enough information here to complete this section. There is enough information in the try git course. Remember that you need to do this before 7pm on Thursday or my cold, unfeeling algorithms will give you a zero.
This is a lot of work. The first few weeks of this course are going to have quite a heavy load, but the focus will shift over from doing to thinking as the course progresses.
If you get stuck, slack is the first place to look.
Get your work done, eat a good meal, sleep well, do some exercise, party a bit and we’ll see you next week.
-
I use a Clairefontaine basic clothbound notebook It’s robust so it lasts well, and the paper is a joy to write on. In the past I’ve also used school exercise books, they are basically the same, so don’t stress about it! Don’t get anything that you feel too precious about writing in. I had an expensive notebook once and I never used it because I was ‘saving it’, idiot! ↩