Unit 1: Intro and OOP

Credit: Gavin Taylor for the original version of these notes.

Beginning of Class 1

1 What is a Data Structure?

What is a Data Structure?

In your rooms in Bancroft, you have a large amount of stuff that has to fit into a small amount of space. While the organization of some of that stuff might have been dictated to you, at some point, somebody had to decide on the placement of things in your room. When they and you made these decisions, they were balancing some tradeoffs. Does it look neat? Does it conserve space? Are the things you have to access the most often easy and quick to reach?

Organizing data in a computer is no different; we have to be able to make decisions on how to store data based on understanding these tradeoffs. How much space does this method of organization take? Is the operation I want to perform fast? Can another programmer understand what the heck is going on here? Is it worth using more memory if the program will be faster? Is it worth making one operation take longer, if a separate one we use more often will be faster?

This class is about these tradeoffs, and how they apply to the cyber domain. First, though, we need to review or learn some programming topics.

Object-Oriented Programming and Python

Your notes and book from SY201 will remain a useful reference, as we're going to do a lot of OOP this semester. I'm not going to reteach all this stuff, but if you've forgotten, or could use some extra help, feel free to ask.