ECS 132 news items:
Somehow the quiz for Sec. 2 is not up. We will do two quizzes for Sec. 2 next week.Friday, January 22, 2:25 pm
As noted before, even if a homework problem asks you to find a probability, expected value etc. analytically (i.e. math), you should still write simulation code for your own benefit, to check your math.
In Problem 4, I have the opposite advice: Use an analytical solution to check your simulation code. I've added a couple of examples to the problem writeup.Friday, January 22, 2:20 pm
Homework submission information on CSIF, per Arnav. Use the handin app:
handin acharyya hwk1
In order to give you exposure to more examples involving expected value and variance (Problem 5), I'm moving the due date of Hwk 1 back to 1/27.Wednesday, January 20, 11:20 pm
Keep in mind, the quiz policy is just like that of the homework. If a problem asks for a probability, expected value etc., it means the exact answer is required; do not do simulation unless it is specifically requested.
Please MAKE SURE you are mindful of the blog post of Thursday, January 14, 7:45 pm, especially the point about NOT simplifying math answers.Wednesday, January 20, 7:10 pm
In a discussion of Problem 1a in the OH today, a student said his solution steps led him to finding
P(X1 + X2 ≥ 4 | X1 ≤ 3 and Y1 ≤ 3)
where Xi and Yi are Jill's and Jack's ith rolls, respectively. (Note that for instance X2 is undefined if Jill wins on the first turn.) He was unsure where to go next.
Well, first, we have that
P(X1 + X2 ≥ 4 | X1 ≤ 3 and Y1 ≤ 3) = P(X1 + X2 ≥ 4 | X1 ≤ 3)
Now, what to do with that? Rewrite it as
P(X1 + X2 ≥ 4 | X1 = 1 or X1 = 2 or X1 = 3)
Then use P(B | A) = P(A and B) / P(A) etc.
The message is, Don't give up! Persistence is key! Your solution may turn out to be rather lengthy in some cases.Wednesday, January 20, 7:10 pm
I'm still seeing a lot of students try to intuit their way into solutions to the probability problems. Yes, intuition is highly important, but it will often lead you astray if you don't couple it with detailed, step-by-step use of the mailing tubes.Wednesday, January 20, 7:00 pm
Someone asked whether numerical values will be announced for the math problems in the homework, so you can check your work. As I explained a couple of times in the blog and in class, what I prefer is that you write simulation code for the purpose of such checks (even if the problem doesn't ask for simulation code).
It may be that you find that your math and simulation answers don't match. Carefully go through each, and if you can't find the reason for the discepancy, contact a TA or me.
Note that simulation gives only approximate answers, so the math and simulation answers will not match perfectly. Try a much larger value of nreps if you are concerned that the difference may be due to a logical error. The discepancy should diminish.Tuesday, January 19, 9:40 am
The problem asks for three probabilities; for concreteness, let's consider P(2 fail to board). Once again, the road to clarity comes from the notebook idea. There would be a column in the notebook labeled "2 passengers fail to board." This column would be filled with Yes's and No's. Neither the column's label nor its contents say anything about whether any passengers alight. Of course, in computing the requested probabilities, you will probably need to break events down by the number of alighting passengers, but the P(2 fail to board) probability itself does not mention such passengers.
As explained in the course syllabus and the ethics group meetings, it is imperative that you work closely with your group. Please, MAKE THIS WORK. I have found repeatedly that students who are in relatively inactive groups tend to do poorly in the class.
If a group finds that one of its members is devoting little or no time to the group's work, the group needs to let me know right away.
P(Jill wins on 1st try) or P(Jill doesn't win on 1st try and Jack wins on 1st try)
This is nonsense. You are OR-ing together two numbers, when OR should only combine booleans.
What you should write is
P(Jill wins on 1st try or Jill doesn't win on 1st try and Jack wins on 1st try) = P(Jill wins on 1st try) + P(Jill doesn't win on 1st try and Jack wins on 1st try)
Now you are +ing together two numbers, the appropriate role for .
This point is made in the book (first bullet, p.17).
This coming week we will have Quiz 1, which will cover all of Chapter 2.
As explained in our course syllabus, all my files recording your grades on quizzes, homework and the term project are indexed by your official UCD e-mail address (which is the address I've been using in my e-mail messages to you). If you use some other e-mail address, in effect we have no record of your work! This is not good. :-(
Keep in mind that this is an issue not just for quizzes, but also for homework and term projects. Note that in the latter two cases, you work in groups. For instance, your group makes just one submission for the group, not one for each group member. That means that the person who submits the homework or term project must make sure that the e-mail address for each group member is correct.Friday, January 15, 3:55 pm
There has been a change in office hours. Arnav will take over for Shubham. See our "course at a glance page for details. Shubham is still one of the TAs, so you can still e-mail him etc.Friday, January 15, 2:05 pm
Make sure you understand R's *apply() functions. None is absolutely necessary, but they can simplify your work quite a lot.
Reminder: All blog posts are considered part of your official course materials. Be ready to use the *apply() functions on quizzes.Thursday, January 14, 7:45 pm
Some tips to remember for Quiz 1 next week and all subsequent quizzes:
(1/2) * (4/5) + 1/3
to 11/15. By submitting your un-simpllfied answer, you will be showing your work. Remembe, yur answer will be evaluated by R, so there is no need for simpllfication. And leaving things un-simpllfied is important in case you are partly wrong but deserve partial credit. And even if fully correct, SIMPLIFIED ANSWERS MAY NOT GET CREDIT.
Someone asked whether it's OK to use '=' instead of '<-' as your assigment operator. The answer is "usually." There are situations, e.g. this one, where it may give you the wrong result or even generate an error message.
On the principle of "better safe than sorry," I do urge you to use '<-' for assigment. And I urge you to put a shortcut into your text editor's startup file. For instance, I have this line in my vim startup file:
map! eqq <-
Then every time I want the "left arrow" assignment operator, I simply type 'eqq'. No hunting on the keyboard for '<','i, '-' or even '='.Wednesday, January 13, 2:50 pm
Shubam will hold a special OH today re OMSI, 4 pm.Tuesday, January 12, 11:00 pm
Concerning office hours (TAs and myself):
CRUCIAL instructions for taking quizzes. Follow these TO THE LETTER!
ECS 132 news items:
This post will be about LaTeX.
LaTeX is a standard typesetting language in tech and the sciences. It was invented by a computer scientist, the Turing Award winner Leslie Lamport. It consists of a number of macros for the more basic typesetting language, TeX, invented by another Turing Award winner, Stanford CS professor Donald Knuth . It is used by most CS professors in their research. If you do research with a professor, you probably will use it. It is also the basis for math typesetting in the Wikipedia.
What tools might you use to write LaTeX?
But I merely type
Here 'msp' is the name of my macro ("Math SuPerscript"), and it is automatically expanded as I type. I have 'msb' for subscripts etc. This is very, VERY fast to type once you get used to it.
I use Evince as my PDF viewer on my Linux desktop machines (home, office), and Skim on my Mac laptop. Both have the advantage of automatically updating the PDF file when one compiles the .tex file (which by the way I have triggered by a Makefile). Not quite as good as the continuous updating of Lyx, but on the whole the best solution for me.
How can you learn how to do a certain LaTeX trick, e.g. having a column of equations with the = signs lined up?
I corrected the time for the last ethics meeting (earlier blog post today). It is 11:45.Monday, January 11, 10:10 am
I've mentioned that as CS students, you should be good at using Unix (i.e. Unix-family OSs, notably Mac or Linux). This is NOT required for our course, but it's something that you should do simply as a tech expert. Note again that Intel once complained that UCD CS grads don't know Unix well.
The only way to get good at Unix is to use it in your daily life. Just because you, say, did well on Unix exam questions in ECS 36B doesn't mean you know Unix, not at all. The only way to know Unix on a practical level is to USE it, learning along the way as issues arise to be solved. If you have a Mac, fine (but use the command line a lot). Otherwise, run Linux.
And that means using REAL Linux. Any emulator, virtual machine etc. will fall short in one way or another. That includes the Windows Subsystem for Linux.
A student tried to run OMSI on WSL, and got an error message, "no $DISPLAY environment variable." That was apparently due to this problem with WSL, a great example of why WSL is not the "real" Linux, even though Linux has been installed.
But the incident shows more than just the failings of WSL. The important thing is that, as a CS student, you should know what this error message means. In fact, it was discussed briefly in my blog post of January 4, 7:15 pm, so you can see it is a common error, thus something any CS student should know about. This is an example of what I meant above in my "learning along the way" remark; this kind of daily life stuff will NOT be on an ECS 36B exam.
Using Unix on a daily basis will improve your productivity. Same for a using a debugging tool. If you learned, say, gdb in ECS 36B but are still using print statements to debug your code, you are doing yourself a disfavor. The purpose of including a debugging tool in the ECS 36B topic list is to prepare you to do effective debugging in every course from then on, NOT just to have one more topic for your final exam.
If you have a Windows machine, I recommend that you set it up to dual-boot Windows and Linux.Monday, January 11, 10:00 am
The last ethics meeting will occur at the end of class this Wednesday, at 11:45 am. If you are in the list in the blog post below (1/10, 11:30 am), you must participate at that time. A Zoom invitation will be e-mailed to you later today.Sunday, January 10, 11:30 am
Here is a list of students, by last 4 digits of student ID, who we believe have not yet participated in the ethics meeting:
7264 6580 7488 8351 3884 8815 1526 4619 7484 7793 9171 8729 1502 0394 5729 7446
If you did participate, please let me know as soon as possible.Friday, January 8, 2:20 pm
I fixed a typo in the homework: d> should be just d.
On p.12 in the book, there is reference to node A and node B. This is confusing, as readers may think this is related to events A and B in, e.g., Equation (2.6). So, instead, say that we have two terminals, at which John and Mary are typing. Call the nodes Node John and Node Mary.
So, between (2.15) and (2.16), "A" means Node John and "B" means Node Mary.Thursday, January 7, 10:55 pm
The first two problems for Hwk 1 are now on our class Web site. There may be some small changes made in the next day or so, but basically the problems are ready and you should get started now.Thursday, January 7, 9:30 pm
Important news items:
Ethics meetings: Those who added the course late, or who miss their assigned meeting, will be handled separately.Wednesday, January 6, 12:15 pm
Reminder: We have our "ethics meetings" this week, during your assigned discussion sections.
You were e-mailed Zoom invitations. (In class today I mistakenly said it was via Canvas, which is not true. For this particular meeting, it is on my personal Zoom room.)
It is crucial that you JOIN THE ZOOM SESSION ON TIME. I will create breakout sessions and meet with you one group at a time, and the way I have it set up, Zoom will form breakout room groups AMONG THOSE PRESENT AT THE TIME. (Breakout rooms can be pre-assigned, but I didn't do it this way.)
After your group's meeting is done, you are free to leave.Tuesday, January 5, 9:55 pm
Office hours for the TAs and me have now been posted, as recurrent meetings on Zoom via Canvas.
If you were enrolled in the course as of early afternoon today, you have been e-mailed an invitation to the ethics meeting for your discussion section THIS WEEK. Please read the instructions immediately.
As has been mentioned, this meeting is REQUIRED. You will not be able to take any quizzes (70% of the course grade) if you have not attended. Since this is your regular discussion section, you should not have a time conflict, but if you do, please contact me immediately.
Those on the class Waiting List will be handled separately, if/when you are admitted to the course.Monday, January 4, 8:45 pm
Sorry for all the blog posts today. We of course will have more now at the start of the quarter, but once things settle down there will usually between 0 and 2 per day.
The purpose of the current post is to announce that the course syllabus is ready
Yes, it is absurdly lengthy, but it is your user manual for the course. It gives you full information on homework, quizzes, the term project, group work and grading.
Note these points in particular:
The importance of following directions correctly cannot be overemphasized. A sad example occurred one time concerning the term project, which is due at 11:59 pm the day of the scheduled final exam. (We don't have a final.) At 12:03 a.m. I received a message from a frustrated, very panicky student saying that he didn't know how to submit the project to CSIF. His teammate had been the one to submit the homework to CSIF, but he was already on a plane home. Of course, I explained what to do and didn't impose a penalty, but this student had gone through a lot of avoidable anguish.
Anyway, that's the last of the numerous messages this evening. See you Wednesday!Monday, January 4, 7:40 pm
More on OMSI:
As you know, our first quiz will be held in Week 2. It will be a "warmup" quiz. EVERYONE should get an A+.
And MOST everyone will. Here is the distribution from my teaching the course last year:
> z <- read.table('Quiz0Grades') > table(z$V7) A A+ B C D D+ F 1 106 20 1 9 5 1
As you can see, more than 2/3 of the class did get an A+, but about 10% got D or F grades. Those in that latter group simply didn't prepare. Some did recover and eventually get A or B grades in the course, but it certainly is a bad way to start the quarter. :-)
Remember, OMSI helps YOU get a better grade, because you can test your code and revise it if it doesn't work right. One time (pre-pandemic days), a student forgot his laptop and had to take the quiz on paper. He was very upset with himself, saying "That puts me at a disadvantage."
I've been using OMSI for 5 years now, and it works well. It's not fancy, e.g. no code syntax highlighting, but it does its job. You may wish to browse through the source code; it's complex but hopefully well organized. Good example of network and threaded programming.
Suggestions for new features etc. are always welcome, but unless they are quick to implement, they may just be filed away.
OMSI is simple to use, but you do need to read through the entire documentation. Please be patient.Monday, January 4, 7:15 pm
During quizzes, please run OMSI on your own laptop, not CSIF (stated here, which is linked to from the OMSI docs). I have several reasons for this, but now I'd like to use this as a "Unix lesson."
A student tried running the OMSI on CSIF, and get an error message, "no $DISPLAY environment variable." Here's why:
When you use ssh to connect to CSIF remotely, you can only run text applications, not GUI. That error message is saying the CSIF machine has nowhere to display the OMSI window.
My point in bringing this up is to show an example of what "knowing Unix" means. I mentioned today in class that Intel recruiters once complained that UCD grads don't know Unix well. As you can see here, it's a lot more than just knowing the ls and cd commands. And the only way to gain this knowledge is to use Unix (Mac or Linux) in your daily life.
BTW, one can run GUIs with ssh if one uses the -Y command line option.Monday, January 4, 2:50 pm
Student: Anyone know how to do Problem 1 in the homework?
Student, 5 minutes later: Oh, never mind, I see it. But what about Problem 2?
Student, 5 minutes later: Oh, I see it. But what about Problem 3?
Problems 1 and 2, especially Problem 1, in most quizzes will be very easy. I do this because I want to make sure every student who has been keeping up with the class gets some points. Thus, don't try to overinterpret a problem that you might feel is "too easy."Monday, January 4, 2:00 pm
In sending e-mail to me or the TAs, please put '[ECS 132]' in the Subject line.Monday, January 4, 12:10 pm
Sorry I didn't see the Chat messages. They weren't visible to me once I did screen sharing. I'll see about fixing this. Meanwhile, let's see if I can address them here.
The URL for the textbook was in one of the pre-quarter e-mail messages I sent. Those messages are archived here. If you haven't read those messages yet, read them NOW; they are crucial to your success in the course.
Re CSIF: You will need to use CSIF only for submitting the homework and term project. Make sure everyone in your group knows how to do this, to avoid disaster, e.g. unsubmitted term project and failed course grade.
Note: As mentioned over the break, as CS experts, you all should know Unix (Linux or Mac) well; Windows is for non-techies. Knowing ssh is part of that.
Nicholas asked whether the main computer in the example would hold a queue of messages in a buffer. Not in our very simple example here. And even a buffer can fill, with other messages being discarded.Monday, January 4, 10:40 am
My office hours will be MW 4:30-5:30 pm (starting in Week 2) and by apppointment. TA office hours will be announced soon.Sunday, December 27, 11:20 pm
Starting January 4, all course announcements will be made here.