Vicci Ho is a writer, film programmer and producer. She has written for Variety and worked for film festivals across the globe, including Toronto International Film Festival, Zurich Film Festival and directed the Hong Kong Lesbian & Gay Film Festival.  She is the President of Janitor Interactive: a production company specializing in games.

This is her personal page.

building a class in python

This is the first week in this class where I felt truly stumped by the assignment. Building an object was not easy. I understand the fundamental concept of object oriented programming well, but I have always struggled to BUILD my own class, and sadly it was no exception with python.

I wanted to build a class that would allow me to build on the word swapping exercise I did a few weeks back, ideally allowing me to extract words with a certain number of letters from one file, and replace words with the same perimeters randomly in a second file. While I had a vague understanding of what needs to happen: i was stuck in not even really knowing how to begin. I wasn't even sure how to begin building the constructor.

Thankfully, I had some helpful advice from my classmate (Thanks Sam!) I decided to work on a function first, and tested it to see if it worked, then when it did, I added it back into the class.

I first hard-coded the file names and the length of the words in the class, and when I managed to make that work, I worked it into a system where they can be inputted from the command line (sys.argv!)

Here is the code:

Final idea / prototype

Cell phone networks, tracking devices, what is possible?