Becca's MOAR Dictionaries

by Becca Greenstein

06 Apr 2016

Exercise 1:

Exercise 1 Reflection:

I felt like I was not making much progress on this in class, so I gave myself yesterday evening to not think about it/have my subconscious think about it and picked it up again today. I think the part I was getting hung up on in class was where you needed to make a list before you made a dictionary. And then the subsequent looping through the list to make the dictionary, specifically in terms of syntax. Commenting every line of this code was a helpful exercise after I got it to print what I wanted it to - this ensured that I really understood what I was doing.

Exercises 2-5:

Exercise 2-5 Reflections:

Exercise 2: For this one, you needed the text to be in a list, rather than in a string like Exercise 1. A table with only the lines that start with From was the next step, which was a bit counterintuitive for me (I’m not sure why), but useful. The subsequent for loop was similar to what we’d done over the weekend with the sales.csv and homes.csv files, so that was more straightforward.

Exercise 3: This wasn’t as hard as I thought it would be. A few number and variable changes from what I had in Exercise 2 were all it took. Emboldened, I moved on to Exercise 4…

Exercise 4: And got stuck. I worked on this for a while, but couldn’t find a way to use the maximum function appropriately. I tried using the .sort dictionaries method for putting things in numerical, rather than ABC order, but that didn’t work. I wanted to cycle through the dictionary created in the previous exercise and find all of the values while keeping the keys with the values. I couldn’t figure out how to do this.

Exercise 5: I was stuck on this one also. I started a new list and cycled through the email addresses, using .split as discussed in class, but I couldn’t figure out how to “.split again on @ sign,” which is what I wrote down in class yesterday. How do you do this?

General Reflection:

Not being able to save my work in Trinket makes me nervous and unwilling to shut my computer down until each pull request is submitted. Is this fear grounded?

This was the first time (I think) that I have turned in code that I know is incomplete. I feel like I’m spending a fair amount of time on the exercises and accomplishing less than I used to in the same amount of or less time. I’m not sure what to do differently. I feel like I understand the concepts but the code isn’t embedding (pun intended) itself in my brain the way it used to, so I need to look things up constantly. I do like this approach more than the paired programming we were doing. I’m spending more time on it so I learn more, but I am also more frustrated than I have been.

Becca is a second-semester MSLS student in SILS. She likes science, words, the outdoors, and helping people. Find Becca Greenstein on Twitter, Github, and on the web.