Stephen DeSalvo

PIC 10A Fall 2012 Introduction to Programming

Course Syllabus.

Homework 1.

Homework 2.

Hello, I've received a number of email questions so I've decided to put the answers here. In the future if you have a question please check the website before emailing me. My email address is {first-name-last-name}@math.ucla.edu. I will typically reply from an @gmail.com account with the same name since I have my email forwarded.

What to do with homework questions:

1. If your question involves me or someone else looking at code you have written, it does not belong as a question in an email. Office hours are the most appropriate time to get specific questions about your code. Office hours are open to any question you may have.

2. If your question is about the assignment, or some aspect of the assignment, or you think you found a typo, or you wish to obtain clarity on the assignment, etc., then please do not hesitate to email me those kinds of questions.

3. If your question is related to your grade on the assignment and where you lost points please do not ask via email; please come to office hours and I will discuss it with you.

What to do before emailing me:

1. Check the website to make sure your question isn't already answered

2. Make sure your question is appropriate for me and not the TA.

3. Have you thought your question through completely? Please don't email me impulsively. I am more than happy to answer questions you may have, and I will put a sincere amount of effort to make sure my answer is well-thought out. Please make sure your questions are equally well-thought out.

FAQ via email about the first midterm

Q0: Is the exam hand-written? Where will it be held?

A0: Yes, the exam is hand-written. The exam will take place in MS 5200 from 10am until 10:50am just like a normal Monday lecture, 50 minutes long, except instead of a lecture we will have an exam.

Q1: What does the first midterm cover?

A1: The first midterm will be based on the material covered during the lecture. The supplemental lectures posted online cover more topics than I did, but there is significant overlap of material, and I will only test you based on material covered during the lecture.

Q2: Which sections of the book does the midterm cover?

A2: I would emphasize the material from lecture more than anything else. The book will cover similar material and give lots of examples and expound more on the topics, but the lecture material is the focus. The relevant sections are Chapters 1 - 3, EXCEPT the sections on Classes and Windows based graphical programming, which I believe are sections 2.7 and 2.8 and were not covered during lecture.

Q3: The practice exam has material we didn't cover, are we expected to know it?

A3: The practice exam is an example of the type of exam to expect, but the material covered from year to year changes, and so this practice exam, which was a midterm from a previous year, is indicative of the style but not necessarily all of the material.

Q4: How do you suggest I focus my studies for the midterm?

A4: I would suggest two ways. One, look over the practice midterm exam so that you are used to the format. Second, I would just create lots and lots of code both on the computer and by hand and play around to make sure you understand what will happen in various scenarios.

Q5: Do we need to know about if and switch?

A5: The if statement is definitely something to know, but since switch wasn't covered during lecture and I never even mentioned it explicitly it won't be on the exam.

Q6: Do we have to know what is the default value of precision? For example, cout<<5/3.0 will output 1.66667, do we have to know precisely how many digits will appear in general?

A6: So in lecture I was less concerned about double precision and more concerned about understanding the difference between what cout<<5/3.0 and cout<<5/3 will output. The first will output 1.66667 but the second will output 1. Again, precision is something you would have seen before, but recognizing that 5/3 will produce a value of 1 is definitely something that is new for this course that I emphasized a lot in lecture.

Frequently asked questions

Q1: Which version of the textbook?

A1: I was told that the UCLA course website has three different versions of the same textbook posted (there's a regular textbook, which is quite large, an eBook, and a loose-leaf version), with one version listed as required and the other two listed as optional. To my knowledge these versions contain the same content. For PIC 10a Fall 2012 I am planning to cover Chapters 1 - 7, so having the loose-leaf version offers the advantage of only bringing those parts around with you.

Q2: Can I get a PTE number? Can you squeeze me into the class?

A2: Not right now. I am told the best way to get into the course is to get on the waiting list. If that is not possible, then I would suggest keeping up with the class and the homework assignments in case you are able to eventually enroll in the class.

Q3: I am not officially enrolled in the class, can I still attend the lecture?

A3: As long as there are seats, yes that's fine. However, I ask that you keep a low profile while in class.

Q4: I am not officially enrolled in the class, how can I access the homework assignments in order to keep up?

A4: I will post the first couple homework assignments on this website so that everyone has access to them.

Q5: When is the first homework assignment due?

A5: The first homework hasn't been assigned yet. I will post it soon on this website and it will be due on Friday October 12th by 5pm, uploaded to Moodle (coincidentally the PIC lab closes at 5pm on Fridays).

What to do if your code doesn't compile

1. Read the error message! Do not just email the TA or me right away!! If you can't figure out why it is not compiling then copy and paste the error message into google and see what search results appear. This method of problem solving is pretty robust, since it will be useful even after the course is over. This is also what most of us do when we see an error we don't understand.

2. If you find the answer online, but still don't understand it (this may happen more often than you think), then feel free to email us with a very specific question and a link to the response you think would solve it but you can't understand.

3. Do not expect the lab assistants to be able to help you. They can help you find the compiler but they won't necessarily know anything about C++.