![[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
Tuple unpacking... I don't know if this is the exact application for it in Python, but I know in Matlab, sometimes you get a big undifferentiated table of data, and so you have to go through and say, okay, column 1 is time, column 2 is heart rate, and so on; this seems like one way to do that.
I can post answers to ps1; would you like me to do it in this entry, or make another one?
(no subject)
aVJpUrWCqyvPAEXSF
(Anonymous) - 2012-01-09 05:34 (UTC) - Expandno subject
Re: stacks and queus: This isn't as complicated as the lack of information made it sound. It's just an order concept:
Stacks and queues are ways of adding and removing items from a list rather than objects in and of themselves.
Re: unpacking tuples.
jetamors gave one example. I can see where it would be especially helpful in a configuration case. Once set, configuration data should generally be immutable. This way, you don't have to worry about the data stored in the tuple being changed, but you can assign each piece of it its own meaningful name.
A trivial example: Suppose you had a tuple that stored a person's last name, first name and birth date:
If you don't unpack it, you have to refer to each of those things by index: person[0], person[1], person[2]. Most people find the typing of brackets rather awkward because of their location. It's a lot simpler to do this:
That way, you can use meaningful names to refer to each piece of data and they're simpler and quicker to type.
From a programming standpoint, since the tuple data can't be changed, if you want to change the data and use it several times in its changed form in the app, the only way to do that is to assign it to a variable that can accept the changes you want to make.
(no subject)
(no subject)
(no subject)
(no subject)
(no subject)
IHmxXLJBgmeS
(Anonymous) - 2012-01-06 16:53 (UTC) - ExpandidQsIysXgWs
(Anonymous) - 2012-01-09 05:34 (UTC) - ExpandHTYmoGQrlvgxPGKo
(Anonymous) - 2012-01-07 06:49 (UTC) - ExpandhonEoIGoyjzGr
(Anonymous) - 2012-05-03 13:50 (UTC) - ExpandUMLyqMpwYdsNtU
(Anonymous) - 2012-01-09 04:01 (UTC) - ExpandqRmEpuCBFsnrqoNoUj
(Anonymous) 2012-01-07 07:27 am (UTC)(link)pnXUfWHMsjOQ
(Anonymous) 2012-01-07 11:36 am (UTC)(link)