Exploration Sessions
Exploration session time/place:
Tuesdays, 3:30 - 4:20pm, room
EEB 045
Fill out this survey about what you thought of the exploration sessions! (Skip questions 1&2 unless you're doing Homework 9.)
Check out interesting homework results for the HCI assignment
Send (anonymous) feedback about the sessions
Each week we will offer a different opportunity to explore extra topics in
computer science. There will be a homework assigned each week. You will
accumulate one "exploration point" for each week that you attend the lecture
and do the homework. At the end of the quarter, your total exploration points
will be divided by 3 and will be added to your homework points. There will be
170 homework points total, so this isn't adding a lot to your potential score.
As an example, if you were to participate in 3 exploration sessions, you would
have 1 point added to your homework points, which is like getting one more
point on a weekly programming assignment. The idea is to give people a small
reward, but not something that is so large that people feel obligated to
participate in these optional sessions.
We will discuss software engineering and how different large-scale development often is from what we've done in this course: teamwork, software development methodology, design patterns, testing, maintainability.
More information:
Homework: (due by Friday, 12/10 midnight via the link above)
Fill out the survey about a software engineering article and exploration sessions in general!
With Jordan Nakamura!
We looked at a third-party application which uses Python 2.6. SAGE is open-source mathematical software similar to mathematica or maple.
More information:
Homework: (due by Tuesday, 12/7 11 pm via the link above)
Follow the instructions in this pdf to create your own fractals! (Ignore the part about extra free late days - the normal 1/3 homework point will be given as credit!)
Turn in a Sage.py
file of your code with the link above.
With Allison Obourn!
We covered some functional programming language features that are included in Python, namely map, reduce, and filter. Each of these functions takes a function and a list as a parameter, applies the function to each element of the list, and combines them in different ways. We also discussed anonymous (lambda) functions and using functions as parameters to other functions. We briefly looked at list comprehensions, a neat shorthand for applying functions to lists.
More information:
Homework: (due by Tuesday, 11/23 11 pm via the link above)
Download the homework file with function headers and comments, similar to the one used in lecture. Use python's map, reduce, and filter functions to write solutions for each function. Make sure to look at the provided tests to make sure that your code works, and feel free to make your own test cases as well! You are encouraged to use anonymous functions (see the session code), but you may have extra functions defined if you prefer.
Turn in a homework7.py file of your answers with the link above.
With Steve Geluso!
We covered how to create and use classes in Python, along with discussing Python's multiple inheritance (using Python 2.7).
More information:
For fun:
Homework: (due by Tuesday, 11/16 11 pm via the link above)
For your assignment this week, create a Python file called sortedlist.py
that contains a class called SortedList with the following methods.
Define the following operations in your list:
__init__(unique)
- constructs the SortedList object with the given uniqueness setting (should initialize the instance variables of an empty list and the uniqueness setting)
size()
- returns the number of elements stored in the list
max()
- return the maximum element from the list; if list is empty, raises an exception
min()
- return the minimum element from the list; if list is empty, raises an exception
remove(index)
- removes the value at the given index; if index is not valid, raises an exception
indexOf(value)
- searches the list for a value using binary search. Returns an index of the value if the value is in the list, or -1 if it is not.
contains(value)
- searches the list for a value using binary search. Returns True if the value is in the list, False if it is not.
add(value)
- adds given value in sorted order. If the value is a duplicate and the list is set to only accept unique values, the value should not be added.
removeDuplicates()
- removes all duplicate values from a list so that the resulting list has only unique values. For example, for list = [1,1,2,2,2,3,4,4]
, a call removeDuplicates(list)
will result in list storing [1,2,3,4]
And additionally...
getUnique()
- returns true if the list is set to only store unique values, false otherwise
setUnique(unique)
- sets the uniqueness of the list to the given values. If the list is being set to only include unique values, removes duplicate values
Most of the methods are the same as last week's sortedlistmethods.py
, so you can copy them into this assignment. Note that the methods for this assignment are instance methods for the class. This means that instead of passing a list parameter to each method, you will pass the "implicit paramater" self
and use the list as a field of the object.
Since the provided testlist.py
is not a very good or exhaustive test, you are encouraged to write your own testing code to make sure your list works. If you like, you can turn in your own testlist.py
. You should make sure that your code works with our testlist.py
though.
Files:
- testlist.py (updated with to fix false test and list size test - thanks to those who pointed it out!)
Turn in sortedlist.py with the link above.
With
Alyssa Harding!
We covered how to do 142 material in the Python language, including basic syntax, functions, loops, if/else, parameters, tuples, file I/O, and lists (using Python 2.7).
More information:
For fun:
Homework: (due by Tuesday, 11/9 11 pm via the link above)
For your assignment this week, create a Python file called sortedlistmethods.py
that contains the following methods.
Define the following operations on your list:
size(list)
- returns the number of elements stored in the list
max(list)
- return the maximum element from the list; if list is empty, raises an exception
min(list)
- return the minimum element from the list; if list is empty, raises an exception
remove(list, index)
- removes the value at the given index; if index is not valid, raises an exception
indexOf(list, value)
- searches the list for a value using binary search. Returns an index of the value if the value is in the list, or -1 if it is not.
contains(list, value)
- searches the list for a value using binary search. Returns True if the value is in the list, False if it is not.
add(list, value)
- adds given value in sorted order
removeDuplicates(list)
- removes all duplicate values from a list so that the resulting list has only unique values. For example, for list = [1,1,2,2,2,3,4,4]
, a call removeDuplicates(list)
will result in list storing [1,2,3,4]
To throw ("raise") an exception in Python, write the following:
raise Exception("your error message here")
The list methods discussed in the documentation may be useful for deleting values (del) and working with lists. Also check out bisect.
Feel free to look back at your
SortedIntList.java
for the algorithms to do these operations. Next week, when we learn about classes, you will make a
sortedlist
class using these methods as the basis.
To do a binary search in Python, use the bisect
, bisect_left
, or insort
functions. Documentation for these functions is at the link below. To use them, remember to write: from bisect import *
Since the provided testlistmethods.py
is not a very good or exhaustive test, you are encouraged to write your own testing code to make sure your list works. If you like, you can turn in your own testlistmethods.py
. You should make sure that your code works with our testlistmethods.py
though.
Files:
Turn in sortedlistmethods.py with the link above.
We discussed artificial intelligence and tried to answer Alan Turing's question "can machines think?" We have an idea of what a machine is, but had to discuss what thinking means. For instance, was the Terminator intelligent? We looked at several examples of chatbots and the Turing test, games and Deep Blue, statistics and DARPA's Urban Challenge, and RoboCup.
More information:
For fun:
Homework: (due by Tuesday, 11/2 11 pm via the link above)
-
- Have a chat with ALICE.
- Give a few examples of sentences you typed where ALICE responded in a human-like way. How do you think ALICE was able to respond that way?
- Give a few examples of sentences you typed where ALICE responded in an unnatural way. What do you think made it difficult for ALICE to respond to you?
- Answer the question "Can computers think?" Write at least 3 sentences!
Turn in a .doc, .txt, or .pdf file of your answers with the link above.
We discussed human computer interaction (HCI), the practice of making applications that are intuitive and unobtrustive for people to use. We looked at the 10 Heuristics for user interface design, and used them to discuss several examples of websites and applications. We also created our own designs and evaluated them.
More information:
For fun:
Homework: (due by Tuesday, 10/26 11 pm via the link above)
-
- Read through the Ten Usability Heuristics.
- Find a website which you think is poorly designed. Record the url and explain which heuristics it violates and why.
- Find a website which you think is well designed. Record the url and explain which heuristics you think it does well and why.
Turn in a .doc, .txt, or .pdf file of your answers with the link above.
Interesting homework results:
Here's some lists of websites you thought were good, and what design heuristics they followed, as well as the sites you thought were bad, with the heuristics they violated.
- Good websites:
- Facebook - visibility of system status; helps users recognize, diagnose, and recover from errors
- Google maps - minimalistic and aesthetic; flexibility and efficiency of use
- Google docs - consistency; visibility of system status; real world analogy
- KiwiBank - consistency and standards rule; match between system and the real world
- Bad websites:
- art.yale.com - consistency and standards
- HuskyJobs - consistency; efficiency and flexibility
- Havenworks.com - minimalistic and aesthetic; efficient; documentation
- Yahoo! sports - consistency and standards; sign in difficult
- DPGraph - *warning may cause seizures* aesthetic and minimalistic design; efficiency of use
- GotMilk.com - user control; aesthetic and minimalistic design
We discussed computer security, protecting information's privacy, availability, and integrity. We talked about getting into the security mindset by creating attack trees and brainstorming ways of gaining access to Alyssa's computer. We also looked at vulnerabilities in enhanced drivers licences, ORCA passes, and Facebook quizzes.
More information:
For fun:
Homework: (due by Tuesday, 10/19 11 pm via the link above)
- Create an attack tree one of the following situations*:
- Stealing a car
- Breaking into a house
- Reading email in someone's Gmail account
- ...something else you want to hack!
Make sure your tree is fairly complete and has at least node one with four branches, and a path of length at least three.
Turn in a .doc, .jpg, or .pdf file of your attack tree with the link above. Your "tree" can be either a picture like we did in class, or a numbered outline. Let Alyssa know if you have trouble with the file!
*Note that we don't condone actually performing these attacks and will not give extra credit for doing so.
This week we discussed a brief history of computing, from the abacus and human computers to the analytical engine and enigma machine. We looked at the quote "There is no reason anyone would want a computer in their home." from the president of Digital Equipment Corp. in 1977. We also discussed two trends that are considered the future of computing - ubiquitous computing (post-desktop computing with devices that are present everywhere) and cloud computing (computing through shared resources on the internet).
More information:
For fun:
Homework: (due by Tuesday, 10/12 11 pm via the link above)
-
-
Choose one of the historical computers listed at History of Computing Hardware or find another description somewhere else. Record the amount of RAM, processor speed, hard disk size, approximate size (and approximate cost if available) of the machine.
-
Look up and record the amount of RAM, processor speed, hard disk size, and approximate size of your home computer (or use a computer in the IPL).
-
Write down your thoughts - how do the values compare?
-
-
Find and read an article or watch a short video about ubiquitous computing or cloud computing. Record the link to it and give a (very brief) summary. Some possibilities are:
-
Write down your thoughts - do you think the technology sounds useful to you today? Would it make your life easier? Can you think of potential downsides to the technology?
Record your answers in a file named Homework1.doc or Homework1.pdf and turn it in with the link above.