Welcome to PIC16B! I’m Phil Chodrow, your instructor, and I’m grateful that you’re here. Before we dive into the details, I want to lay out some guiding principles for this course:
- I want you to succeed. The purpose of this course is for you to build a set of skills that can support you in your studies, hobbies, and careers. You (yes, you) are able to learn some cool stuff and get a good grade in this course.
- It’s still a challenging time. Starting the first two weeks online is not what anyone wanted. Our need to do this reflects the pandemic’s influence on our wellbeing and learning. While I want this course to be a bright spot in your quarter, I also hope we can all recognize that it may not be a totally smooth ride. If you’re struggling with the online learning environment, or with moving rapidly between online and in-person, remember that you have support from your instructors, your classmates, and various student resources to help you navigate.
- Your wellbeing comes first. If at any time during this course, you require accommodations in order to ensure your own wellbeing or that of a loved one, please reach out to me. We will make it happen.
- We’ve got your back. I’ll be available to you through multiple channels. Additionally, you have an amazing support team – your TA and peers will all be helping you in your learning journey.
Ok, now on to the usual syllabus stuff.
Python offers a wide array of tools for solving problems in modern computational science. In this course, we will apply some of the most important such tools, with a focus on applications in applied mathematics, data analysis, and machine learning. Along the way, we will use industry-standard workflows for versioning, revising, and sharing code. We will also practice communicating our code to broader audiences. This offering of PIC16B places special emphasis on project-based learning and technical communication.
Primary Learning Goals
- Core Programming: You will create complex Python programs for solving a range of problems in computational science.
- Code Analysis: You will collaboratively analyze and revise Python programs to improve clarity, robustness, and performance.
- Code Communication: You will analyze and explain Python programs to nontechnical audiences in clear and engaging prose.
- Self-Teaching: You will grow as an effective autodidact (self-teacher) of programming tools and techniques.
- Online Presence: You will maintain a public portfolio of coding projects using industry-standard tools for code management.
The only formal prerequisite for this course is PIC16A. In practice, I am expecting you to have working knowledge of the tools from PIC16A, including object-oriented programming, basic
pandas, and basic machine learing using
scikit-learn. Feeling a little rusty? That’s ok! You might want to consult some lecture notes and videos from PIC16A.
There is no mathematics prerequisite for PIC16B. That said, PIC16B handles a variety of technical topics, such as linear algebra, optimization, and machine learning, for which math up to MATH 33A or 115A is helpful.
If you haven’t taken these courses, then that’s ok! You’ll have a slightly rougher ride in a couple weeks of the course, but I promise that we will get through together just fine.
Official course description
Lecture, three hours; discussion, one hour. Requisites: Course PIC16A or equivalent. In depth application of the Python programming language to problems arising in a variety of areas of current interest such as machine learning, computer vision, statistical analysis, numerical analysis, and data acquisition. Advanced Python programming techniques to improve computational efficiency. P/NP or letter grading
Here is some of the stuff that you will be able to do by the end of PIC16B.
- You will deploy existing Python packages to solve problems in applied mathematics, such as differential equations; numerical linear algebra; optimization; and symbolic computation.
- You will evaluate and compare alternative methods in machine learning and computer vision, and deploy them on complex data sets using existing Python packages.
- You will improve the performance of your computational software using database programming and multithreading.
- You will work collaboratively to identify strengths and weakness of proposed coding solutions.
- You will identify multiple alternatives for solving given problems, and evaluate these alternatives based on performance, robustness, and clarity.
- You will independently navigate the Python ecosystem, identifying and deploying new tools suited to domain-specific problems.
- You will identify Python packages not directly discussed in class, evaluate their reliability, and use them to solve problems of interest.
- You will use resources such as StackExchange to learn about best practices for solving various coding problems and to obtain examples of effective communication about programming.
- You will create your own Python packages, and carefully document them.
- You will explain your solutions to complex computational challenges in engaging English via a weekly blog.
- You will have and maintain a professional website that showcases your coding achievements and hosts your blog.
- You will use the popular version control tool
gitto manage both your coding projects and your website.
Note: Lecture and Discussion meet online during Weeks 1 and 2.
- MWF, 2pm-2:50pm PT, Dodd Hall 154
- TR, 2pm-2:50pm PT, Mathematical Sciences 5118
- Phil Chodrow (he/him/his, website )
- John Zhang
- Mondays at 12:30pm PT, in person
- Wednesdays at 6:30pm PT, via Zoom
- and by appointment
- via Zoom, TBD
All students on the waitlist at the end of Week 2 will be automatically enrolled in the course.
In PIC16B, we’ll relatively traditional lecture periods, in which I’ll present on a topic. These will take place during the scheduled lecture periods, although I’ll record the lectures and post them to BruinLearn afterwards. You’ll have a quarter-long project and a series of blog posts (homeworks) in which to practice your skills.
I believe that:
Your learning takes place primarily outside of lecture.
Your learning takes place when you are actively solving problems and writing code.
I plan my lectures in PIC16B to give you a high-level view on a set of topics. You’re not going to become a strong programmer just by attending lectures. So, make sure that you leave yourself plenty of time to research topics, work on your project, and grapple with the homework problems.
DiversityYou deserve to be welcomed and celebrated by our community. We embrace diversity of age, background, beliefs, ethnicity, gender, gender identity, gender expression, national origin, religious affiliation, sexual orientation, and other visible and non-visible categories. Discrimination is not tolerated in my classroom.
Title IXYou deserve a learning environment free from discrimination, sexual harassment, sexual assault, domestic violence, dating violence, and stalking. If you experience these behaviors or otherwise know of a Title IX violation, you have many options for support and/or reporting. The UCLA Title IX Office can help you navigate your options.
AccessibilityYou deserve to fully and equitably participate in our learning environment. I am actively putting effort into ensuring that course materials are screen-reader accessible, and welcome feedback on where I can do better. The UCLA Center for Accessible Education and Disabilities and Computing Program may be able to help remove barriers to learning.
Names and PronounsYou deserve to be addressed in the manner that reflects who you are. I welcome to tell me your pronouns and/or preferred name at any time, either in person or via email. Conversely, please address your classmates according to their expressed preferences.
Grading is broken. Grades are used in higher education to both (a) give you feedback on how you can grow and (b) assess your “merit” or “mastery” of course content. This latter purpose is especially broken. There’s no pedagogical justification for these so-called “formative assessments.” The results are not predictive of future success or “merit,” and academics are, on average, bad at designing assessments that equitably measure meaningful competency. Professor Amy J. Ko at the University of Washington has an excellent reflection on the deep flaws of grading, which you might wish to read.
If I could drop grades and simply give you feedback on how you can grow, I would in a heartbeat. Unfortunately, the policy of the Department of Mathematics and UCLA is that I must give grades. The system below does not overcome the fundamental flaws of grading, but I hope that it can at least be less opaque and inequitable than many other systems.
There will be 7 blog posts (homeworks) and a series of project assignments throughout the quarter. Here’s how to earn letter grades:
A : Earn credit for 5.5 out of 7 blog posts and all project assignments
A- : Earn credit for 4.5 out of 7 blog posts and all project assignments
B+ : Earn credit for 3.5 out of 7 blog posts and all project assignments
I do not anticipate any grades lower than a B+. Keep reading for what it means to “earn credit.”
To earn an A+, you must meet the requirements for an A and submit a course project that displays an exceptional level of curiosity, ambition, and learning.
Note: there is an optional essay which can be substituted for one blog post.
Now let’s talk about how to earn credit.
I’m going to say something now that will sound scary. I promise it’s ok though, keep reading. Here goes:
There is no partial credit in PIC16B.
On-time assignments can receive either full credit or no credit – there’s nothing in between. Late assignments can receive either half or no credit.
When does an assignment get credit? For each assignment, I will give you a relatively detailed list of specifications (“specs”). These specs are the requirements for the assignment. If your submission fully meets all the specs by the required deadline, then your assignment gets full credit. This mode of grading is often called standards-based, mastery, or specifications grading.
If you don’t get credit on an assignment, all is not lost! On most assignments, you’ll have a second submission opportunity. If you improve your assignment to meet all the specs, then you’ll again get full credit.
Most on-time assignments can be in one of two states:
The assignment fully meets specs and has received full credit.
The assignment has been submitted by the deadline, demonstrates significant effort, and is mostly up to spec. If submitted up to spec by the second deadline, the assignment will receive full credit.
Assignments that I find particularly impressive may receive a “Complete Plus” . This is just there to let you know that I think you’re doing great work, and that you should be proud of yourself! There’s no difference between and for grading purposes.
An assignment is considered late if it was submitted after but within one week of the stated deadline; if it does not display significant effort to meet all specs; or if it is entirely missing required components. Late assignments can be resubmitted, for half credit.
The assignment fully meets specs and has received half credit.
In Progress (Late)
The assignment was not submitted by the deadline; fails to meet multiple major specs; or is entirely missing required components. If submitted up to spec by the second deadline, the assignment will become Complete (Late).
Two assignments that are Complete (Late) count for one assignment in the context of your letter grade. So, for example, one way to earn an A is to complete 5 blog posts on time and 2 late.
All assignments that allow resubmissions will be submitted and assessed in Gradescope. The initial submission will be a PDF printout of your assignment. If your assignment is assessed as In Progress
, you’ll have the opportunity to revise and resubmit the assignment. To do this, just submit a regrade request on Gradescope with a URL link to the assignment. It is not necessary to submit another PDF.
Assignments Without Resubmissions
A very small number of assignments in this course will not allow resubmissions. The most important examples of these are project presentations, of which there will be several throughout the quarter. These will be graded with relatively relaxed specifications. Presentations that show collaboration, effort, and progress will receive full credit.
Why Specifications Grading?
There are a number of reasons why I have chosen to adopt specifications grading in PIC16B. Here are a few:
- Career preparation. In your professional career, there won’t be any such thing as a 92% grade. Projects either meet the required specifications or they don’t. When they don’t, there’s often a chance to improve them so that they do. The lack of partial credit, combined with multiple assignment opportunities, is meant to prepare you for this kind of experience.
- Control. I’ve tried to give you more control over your grade in this course. You shouldn’t really have to guess about what grade you’re going to get on an assignment. Check the specs – did you meet them fully? If so, you should expect full credit. If not, you should expect a clear explanation of what needs to be improved, and an opportunity to act on that to receive full credit.
- Communication. I want you to know exactly what I’m looking for in an assignment. Specs grading gives me a responsibility to articulate my expectations as clearly and operationally as possible.
Blog posts play the role of homework assignments in PIC16B. Early in the course, you will create a blog like this one. This blog will host the blog posts you write for your homework submissions.
Each blog post will have detailed specs. One of the specs common to all blog posts is writing.
Specification: Your blog post should be structured and written as a tutorial so that a PIC16A student could learn how to solve the problem by reading your post.
Please note that the writing spec is not optional; posts cannot receive (any) credit unless they are written in tutorial format.
The usual method for preparing blog posts is to solve the problem in a Jupyter notebook, and then convert that notebook into a post. We’ll go over this process early in the course.
Note that you can skip a blog post and still earn an A, or even an A+. Think of this like a “drop” in a more traditional grading scheme.
All blog posts can be resubmitted once, within one week of receiving a first assessment. We’ll do our best to get you your first assessments quickly so as to minimize the amount of time you’re waiting to find out whether you need to resubmit or not.
Erin works hard on Blog Post 3, and submits it ahead of the deadline on Friday. They meet almost all the specs, but they didn’t completely solve the very last part of the problem. The following Tuesday, they receive their first assessment: In Progress. This assessment reflects that they clearly put effort into the entire assignment and met the majority of specs. They also receive feedback on what revisions are necessary. They successfully incorporate these revisions, and turn in a revised version before the end of instruction. Their revised blog post is fully up to spec, and their revised assessment is Complete. They earn full credit for the assignment.
Zenith had a really rough week, and wasn’t really able to put enough effort into Blog Post 3. By the time she turns it in on Friday, her assignment is below spec in several ways and is not written in a tutorial format. Because she didn’t not put sufficient effort into her assignment by the deadline, the assessment she receives on Tuesday is In Progress (Late). She can now decide whether she wants to bring it up to spec in order to get a Complete (Late) for half credit or whether her time would be better spent focusing on the next assignment.
One of the most important components of PIC16B is the project. Over the course of the quarter, you will:
- Identify an interesting and relevant problem that can be solved using computational methods.
- Acquire data relevant to your problem.
- Design and implement a computational solution to your problem.
- Give periodic progress updates to your classmates.
- Revise your project in response to feedback.
- Host your project in a public repository as part of your code portfolio.
You are expected to work in a group of 2-3 students on the project. If you would like to work in a larger group, or if you would like to work on your project solo, you must first request approval from me.
Your overall project grade contains a number of components. These include:
- A project pitch.
- A project proposal (with your group).
- Project updates in Weeks 6 and 8.
- An initial project submission in early week 10 (optional).
- A project presentation in Week 10.
- Final project submission during Finals week.
Each of these individual components will have their own specs. The specs for each component will be here, not all of them are posted quite yet.
At any time during the quarter, ou may submit an essay on a topic broadly related to themes of algorithms, equity, and justice. Here’s the essay prompt and specs.
This essay is worth one blog post. So, one way to earn an A in the course is to earn credit for 5 on-time blog posts and the essay.
If your essay fully meets specs, you’ll immediately earn that credit. If not, I’ll send you some feedback on what you can do to meet specs, and you’ll be able to resubmit.
Note: my expectations for this essay, and the corresponding specifications, are considerably higher than they were in PIC16A.
Advice: How to Earn an A
I fully expect that most or even all students will earn As in this course. To get an A in the course, you will need to:
- Manage multiple, sometimes overlapping deadlines.
- Make long-term plans with your group members.
- Put substantial effort into helping your peers.
- Persevere in solving problems whose solution may not be obvious.
- Seek help when you need it.
I believe that all students here can show these skills. If you do, you’ll finish the quarter with an A in the course and some exceptionally impressive achievements in computational science with Python.
One of the primary learning goals of this course is to build your ability to learn independently. I want you to teach yourself new programming ideas and tools, now and in the future. The reason is not because I don’t want to teach you myself – I do! Rather, the reason is that what I know is limited, and what I can share in a quarter is even more limited.
If you stick to what you can learn from me directly, you will hold yourself back.
Throughout the course, I will ask you to practice self-teaching – taking charge of your own learning journey, to grow beyond what I can offer you directly.
Corollary: I want and expect that, by the end of this course, you will know more about certain Python topics than I do!
What does this look like in practice?
Finding The Tools
In this course, much more than in PIC16A, I will ask you to perform a task for which we have not discussed all the tools in class. It will be your responsibility to help each other and find the right ones for the job.
Asking for Help
You can still ask for help, from me, the TA, and each other! Now that you’re an advanced programming student working on self-teaching, there are a few things that you should try first:
If you’re debugging:
- Carefully read your error message, if there is one.
- Google your error message and see whether others have encountered a similar issue (trust me – they have).
- Simplify: start removing parts of your code until you are able to construct a minimal working example (MWE) of your issue.
- Now that you have checked around a bit and created a MWE, it’s the right time to post a public question on Campuswire. Show your MWE code, the output of your MWE, and carefully describe what you’ve already done in the previous steps.
- Generally, if you’ve completed the above steps and haven’t received an answer on Campuswire within 48 hours, I’ll then make my best attempt to address your question directly.
Corollary: you are more likely to get help from others and from me if you start early.
“How do I do X”
- Try to describe X fairly specifically, and Google it. Adding the names of packages can be helpful. Example: You want to encode a qualitative column of a Pandas data frame with an integer label. A good search for this is “pandas convert qualitative column,” for which the top result (in my browser) is a helpful guide to precisely this kind of task.
- If you know how to achieve a task that is similar to X, check the documentation of the associated tools to see whether there might be keyword arguments or methods that might help you achieve X.
- If you’ve done the above, now is a good time to post on Campuswire. Describe what you’ve already tried, including any relevant resources you may have found.
- Generally, if you’ve completed the above steps and haven’t received an answer on Campuswire within 48 hours, I’ll then make my beset attempt to address your question.
You can always ask me questions in OH. Be ready for me to ask you which of the above steps you’ve completed. If you haven’t done many of them, then we may walk through some of the steps together.
PIC16B has a fair number of long-term deadlines, including your project and multi-week homeworks. I expect you to manage your schedule accordingly, and to plan ahead.
The primary form of accommodation in this course is the fact that there are more than 100 points worth of assignments. If, for example, you skip a homework assignment, you can still finish the course with 100 points and a solid A. Additionally, up-to-spec homework can be submitted up to one week late to receive a half-credit Complete (Late).
Because of this, I do not expect to grant extensions to individual students in this class. Exceptions will be made for students with disabilities or other long-term situations that may impact their learning.
You may encounter non-emergency conditions that make it difficult to complete your assignments by the stated deadline. In this age of disease, isolation, and political unrest, that is very normal! If you are struggling with your physical or mental health, please approach me early and we will have a conversation. The earlier we can talk, the more I will be able to do for you.
I am always happy to talk with you about your future plans, including courses, internships, REUs, and graduate school applications. Because I am a creature of the academy, I am less knowledgeable about industry jobs, although you are welcome to ask about those too. If you’d like to set up a chat, please use the Calendly link provided on BruinLearn.
Letters of Recommendation
If you have completed a course with me or are currently enrolled, you are welcome to request a letter from me. If I feel that I am not able to write you a strong letter, I will tell you – but if you still want a letter from me, I will still write it.
Please keep in mind that I can write stronger letters for students whom I see more frequently, such as in lecture or office hours. If you’d like a letter, talking to me in these contexts, or scheduling another meeting time, is highly recommended.
To request a letter, fill out this request form! Please give me at least one month of advance notice when possible.
When I Won’t Write a Letter
As a matter of moral principle, I will not write letters of recommendation for programs or jobs involving any of the following:
- Policing (including but not limited to predictive policing, development of algorithms that predict recidivism, etc.);
- Military applications (such as internships at the Department of Defense or any of its international counterparts);
- Weapons manufacturing, broadly construed;
- Intelligence gathering (such as internships at the NSA, FBI, or any international counterpart).
I am very happy to discuss this policy with any student who has questions. Conversations about when and how mathematics, data science, and programming should be used are lacking in our community. If you’d like to engage me in such a conversation, that would be great! However, this policy is non-negotiable. Therefore, if I refuse to write you a letter on these grounds, please know that it doesn’t reflect on your ability to succeed in PIC16B, your career potential, your worth as a person, or whether I like you.
The Just Mathematics Collective has compiled a list of resources for students on making ethical career decisions, which is available here. The text of this section is lightly modified from their suggested text on letter-writing.
You are always welcome to speak with me about any experience or aspect of your life that may effect your safety, ability to learn, or ability to participate equitably in the UCLA community.
- I commit to welcoming and celebrating you, as you are.
- I commit to making time for you.
- I commit to listening to you actively and sympathetically.
- I commit to believing you.
- I commit to helping you find the resources that best meet your needs.
- I commit to respecting your privacy to the extent consistent with my reporting obligations under Title IX (see below).
- UCLA’s Sexual Violence Index, including definitions, more thorough descriptions of available resources, and suggested safety measures.
- Title IX Office.
- Office of the Dean of Students.
- UCLA Police Department (UCPD)
- Crisis support available 24 hours a day: (310) 206-2465
- Counselors available by phone 24 hours a day: (310) 825-0768
- Support available 24 hours a day: (424) 259-7208
- Available Monday-Friday, 9am-12pm and 1pm-5pm
- $10 initial consultation fee, currently waived due to COVID-19.
My Obligations under Title IX
I am a Responsible Employee, which means that I am required by the University to report incidents of sexual harassment or sexual violence to the Title IX Coordinator. If you disclose such an incident to me, I will report it to the Title IX Coordinator. This may lead to follow-up from the Title IX office and a possible investigation into the incident. If you would like to speak to a resource who will maintain strict confidentiality, see Confidential Resources.
- Counselors available by phone 24 hours a day: (310) 825-0768
Students with Disabilities
- Provides academic support services for students with documented permanent or temporary disabilities, at no cost to students. Example services include readers, adaptive equipment, sign language interpreters, test-taking arrangements, transportation, and much more.
- Provides services related to accessible computing technology, including support for students and training for faculty.
Equity, Inclusion, and Access
- Resources for Racial Trauma
- Resources on Immigration Policy Changes
- Resources on Native American and Indigenous Affairs
The Community Programs Office offers several student-run programs aimed at the development of an inclusive and diverse community of scholars and leaders on and off campus.
- The Student Retention Center offers several programs supporting students who may be experiencing difficulties in their academic or social lives. Specific populations served include students within the Afrikan diaspora, Raza students, Native and Indigenous students, Pilipino students, and Southeast Asian students.
- Academic Advancement Program (AAP) Peer Learning (serving AAP students).
- List of resources related to visas, arrival in the US, housing, and other important topics.