Welcome to office hours for week 4.
I'm here with Andy. >>Hi.
He's the assistant instructor for Sebastian's class, CS 373.
Today I'm going to take the role that Peter usually takes.
Dave is out of town.
Peter will be Dave, and I'm going to ask some questions. So let's get started.
I'll try to do my best Dave impression. >>I'm sure you can manage.
Before we get into content, let's talk a little bit about grading. >>Yes.
Over the last couple days we noticed some bugs
in actually the version of Python that we're using that would misgrade assignments
that ended in a comment, which is very unfortunate
because comments shouldn't affect how a program runs.
So we fixed that,
and, going forward, your assignments you submit won't be affected by that bug.
And we've also been working to address submitted code
that was copied from an external editor into our IDE
that had syntax errors going into it.
And we're going to regrade everything once we get the infrastructure to do so.
So we're going to go back, all of the faulty programming assignments will be regraded,
and your grade will be changed accordingly.
Just one point, though.
Make sure that when the assignment calls for, let's say, a function titled Search
that you title your function Search.
Otherwise when we try to call that function there's going to be an error.
Okay? >>Yeah.
All right. Let's move on to content.
The first question is one that I had, actually. >>Really? >>Yes.
I was going through 101, and I was curious about latency, networks,
bandwidth, and especially this thing called a packet. >>Hmm.
So what is a packet?
Okay, a packet.
A packet is kind of how we transmit data on the Internet,
and this was a design decision to address a pretty basic problem.
So let's imagine we're sitting in the Udacity office
and Andy is sitting across from me and he's streaming his music through his headphones
and I'm trying to download a file.
Over the air you can only send 1 thing at a time.
And so if you're streaming music constantly and I just want to download a file,
I can't do that at the same time.
So the solution is to not download your file all at once in 1 single stream
but to break it up in chunks.
And those chunks are called packets. >>Yes. >>Okay.
And so you download a chunk and then in between those chunks
I can still download my file, make requests, goof off on the Internet and whatnot
and occasionally answer questions on the forum. >>Get some work done, maybe?
Sometimes. >>Okay, thank you.
And on the head of each of those packets is a header, I think you were telling me.
Yeah. That's how the packets know where to go.
They have an address and it's an IP address--you've probably heard that before.
All that stands for is Internet Protocol address. It's just an address.
It's like an address when you mail a letter.
It says where it's going and if something goes wrong who to send it back to.
And the routers know what to do with those addresses to get it.
They know where. It's the same way that a mailman knows where they go, the address.
They just know where things are. >>Routers are little mailmen.
Little mailmen. >>Okay, great.
First content question from a user is from Splashes,
and he wants to know how important as a computer scientist
is it to learn multiple languages.
It's not as important as introductory students may think.
It becomes pretty--
You really should just choose the right language for whatever you're trying to do.
Different languages have advantages and disadvantages.
If you want your code to run everywhere, Python runs pretty much everywhere.
If you only are developing for an iPhone,
then you're probably just going to need to use the language the iPhone uses,
Objective-C or some derivation of that.
But yeah, it's a tool. >>Okay.
And so I guess one of the fears is that will we through learning Python
have the tools to learn about these new tools?
Will we be able to learn new programming languages? >>Yeah.
A lot of it transfers, because programmers need to learn new languages,
so a lot of the stuff between the languages is very similar.
And that's by design.
And pretty much all the skills you learn in this class
will apply to almost any programming language. >>Okay.
Malquan had a question about using Python code outside of the interpreter.
All of our programs have been run by clicking a Run button,
but normally when I run a program that's not how I do it. What can you say?
Yeah. You go down to the task bar and you click the little picture. >>Exactly.
All you do is to get that picture you run it through another program
that kind of packages it together and you give it the picture
and then it'll create an installer which you can then distribute to your users
that will install it on their machines.
But once you click that button, it's just going to your program.
Okay. So clicking the button is like calling a function that runs my program? >>Mm-hmm.
Okay, great. Thank you.
Last question for the day, and this is probably a challenging one for you,
but I think you're up to the task.
I want to know, and I think some of our students want to know, what is a database?
We've been talking a lot about data structures.
So 2 minutes or less. What's a database? >>2 minutes or less.
That's your target. >>Okay.
This is a challenge.
The way we've been storing our index is kind of just a big Python list,
but that can get unwieldy after a while.
Every time we want to update the way we're storing the list
we've got to kind of go through and write a program that changes the structure of our list
and then change all our functions to address this new list format.
And eventually, people got sick of doing that,
so you have dedicated programs that are built for storing and querying data,
and that's called a database. >>Okay, thank you.
All right. Well, that's all the questions for this time.
And we--well, I suppose Peter and Dave--will see you next week. >>Bye. >>Bye.