![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[community profile]](https://www.dreamwidth.org/img/silk/identity/community.png)
Readings and PS1
First, class business... I went poking around the website, and I found a suggested schedule for the problem sets. They actually correspond to the lectures, imagine that! Anyway, armed with this new info, I've made some tweaks to the problem set schedule.
PS2- 1/22
PS3- 2/5
PS4- 2/19
PS5- 3/5
PS6- 3/19
PS7- 3/26
PS8- 4/16
PS9- 4/23
PS10- 4/30
PS11- 5/14
PS12- 6/4
I also discovered that there are three quizzes associated with this course. So I'm putting the question to you all - do you want to do them?
I would like to include the quizzes in the course.
Yeah, sure, extra practice is good.
7 (100.0%)
No way, I've got enough on my hands with the problem sets.
0 (0.0%)
If you would like to do the quizzes, how should we incorporate them?
Add them on top of the lecture and reading in the week where they fit in the sylabus.
7 (100.0%)
Push the lectures back a week to make time for the quiz
0 (0.0%)
Some other idea which I'll tell you about in the comments
0 (0.0%)
Okay, that's out of the way, on to the readings.
I gotta say, this week kicked my ass, and these readings were right there with work and family issues, putting their prints on my bum. The wikibook chapters in particular just are not working for me. Is anyone else having that issue? My notes on those chapters are scattered with big red question marks and underlines with "What does this mean??" written off to the side. Part of this, I think, is that I really don't do numbers. I had to go look up the definition of a prime for the problem set...
Anyway, I've got some questions to toss out for discussion.
1- From the Data Structures reading, what are stacks and queues and why do we care about them? The reading just goes, 'This makes it easy to use lists in stacks and queues, whee!' (Or at least, that was my impression...)
2- From the same reading, why is it useful to be able to unpack a tuple?
Anyone else have questions for the class? This set of readings certainly provides fertile ground for questions. All of section 5.8 of the Data Structures had me going, "Bzuh?" And I just gave up on the wikibook...
I have...
Knocked it out of the park.
1 (100.0%)
Struck out.
0 (0.0%)
There's still another at bat to go!
0 (0.0%)
I thought problem set one...
Was easy peasy
0 (0.0%)
Was a pain, but achievable
1 (100.0%)
Was way too hard... when did we learn how to do this stuff, again?
0 (0.0%)
Now,
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
no subject
Stacks as books and queues as a line of customers... got it!
no subject
I get the visualization thing. I do it myself. :-) About the shark and remora analogy, just remember that the remora isn't attached to the shark at all. Here's another way to visualize the concept which works for any type of change, not just for appending:
Suppose you create a bouquet which contains a white carnation, a red rose, a yellow tulip and an orange lily. (Not very likely, but...) You tie a tag around the bouquet and label it bouquet (the tuple). Also, each flower has its own tag: bouquet[0], bouquet[1], etc. These are the elements of the tuple.
When you unpack the tuple, you add a second tag to each of those flowers. Maybe you name them by variety carnation, rose, etc.
Now, suppose you'd prefer a purple carnation and decide to use the old food coloring trick to change the color of the carnation. Whoops! Python says that you can't change the tuple (bouquet) or any of its parts. Instead, you have to get another white carnation and dye it. When you do that, Python moves the carnation tag from the white carnation in the tuple bouquet and gives it to the purple carnation. The white carnation is still bouquet[0], but the carnation tag is now around the purple carnation.
In other words, the tuple and its elements are "frozen." Using the unpacked names, you can make changes, but when you do, the changed data is completely independent of the original.
no subject
IHmxXLJBgmeS
(Anonymous) 2012-01-06 04:53 pm (UTC)(link)idQsIysXgWs
(Anonymous) 2012-01-09 05:34 am (UTC)(link)