Who am I?

- Associate professor
- UCSD CSE since 2017
- PhD at ETH Zurich
- Postdoc at MIT
My Research
- Usability of AI programming assistants: how do programmers use AI assistants and how can we make them better?
- In the past: Program Verification: how to prove the program is doing the right thing?
- In the past: Program Synthesis: how to generate a program that does the right thing?
The Crew
Teaching Assistants
Lecture Format
In person
Recordings available on podcast
I do not take attendance, you are adults
but: you are expected to have attended or watched all previous lectures before asking questions on Piazza or OH
A Programming Language
Two Variables
x
,y
Three Operations
x++
x--
x = 0 ? L1 : L2
Example Program
(What does it do?)
L1: x++
--
y= 0 ? L2 : L1
y L2: ...
The above language is “equivalent to” every PL!
(See wikipedia)
But good luck writing
- QuickSort
- Fortnite
- Spotify
Two lessons:
- All Programming Languages share something fundamental
- But also: your Programming Language shapes your Programming Thought
What is CSE 130 not about?
Learning…
- JavaScript in October
- Haskell in November
- C++ in December
- etc.
New languages come (and go …)
There was no
- Python before 1991
- Java before 1995
- C# before 2000
- Rust before 2006
- WebAssembly before 2015
What is CSE 130 about?
- Concepts in programming languages
- Language design and implementation
Course Goals

Free Your Mind.
Goal: Learn the Anatomy of PL

- What makes a programming language?
- Which features are fundamental and which are syntactic sugar?
Goal: Learn New Languages / Constructs

New ways to describe and organize computation, to create programs that are:
- Correct
- Readable
- Extendable
- Reusable
Goal: How to Design new Languages
New hot languages being designed in industry as we speak:
- Hack, Flow, React @ Facebook
- Rust @ Mozilla (now The Rust Foundation)
- TypeScript @ Microsoft
- Swift @ Apple
- WebAsssembly @ Google + Mozilla + Microsoft
Buried in every large system is a (domain-specific) language
- DB: SQL
- Word, Excel: Formulas, Macros, VBScript
- Emacs: LISP
- Latex, shell scripts, build scripts (makefiles), …
If you work on a large system, you will design a new PL!
Course Syllabus
- Lambda calculus (2 weeks)
- The simplest language on Earth
- Haskell (3 weeks)
- A practical functional language
- Build your own language (5 weeks)
- How do we implement a new language (in Haskell)?
- Fun project: add new features to your language
QuickSort in C
void sort(int arr[], int beg, int end){
if (end > beg + 1){
int piv = arr[beg];
int l = beg + 1;
int r = end;
while (l != r-1)
if(arr[l] <= piv) l++;
else swap(&arr[l], &arr[r--]);
if(arr[l]<=piv && arr[r]<=piv)
=r+1;
lelse if(arr[l]<=piv && arr[r]>piv)
{l++; r--;}
else if (arr[l]>piv && arr[r]<=piv)
(&arr[l++], &arr[r--]);
swapelse r=l-1;
(&arr[r--], &arr[beg]);
swap(arr, beg, r);
sort(arr, l, end);
sort}
}
QuickSort in Haskell
sort [] = []
sort (x:xs) = sort ls ++ [x] ++ sort rs
where
= [ l | l <- xs, l <= x ]
ls = [ r | r <- xs, x < r ] rs
(not a wholly fair comparison…)
Course Logistics
- webpage
- calendar, lecture notes, programming assignments, …
- piazza
- announcements and discussions
- gradescope (code: GVYVKD)
- homework/exam submissions, grades
- classquestion (code: GXJVJ)
- anonymous questions during lecture
Grading
- 30% Homework assignments
- 30% Project (aka “the last assignment”)
- 20% Midterm quiz
- 20% Final quiz
- 05% Extra credit for Piazza discussion
- To top 20 best participants
Assignments
- 5 programming assignments
- Released online, at least a week before due date
- Due at 11:59pm
- Usually on a Wednesday, but not always, check the calendar
- No assignment Weeks 1 and 2
- 8 late days, no more than 4 late days per assignment
- used atomically (5 mins late = 1 late day)
- Submitted via Gradescope
- submission instructions in the assignment
- Solve alone or in groups of two
- use this piazza thread to find a partner
- AI assistants are discouraged for assignments
- because the purpose of assignments is to practice new coding skills on simple problems
- you are responsible for understanding all the code you submit
Project
- Bigger and more open-ended than the other assignments
- You will work in groups of 3-4
- You are allowed (and encouraged) to use AI assistants (e.g., Copilot, ChatGPT) in your project, but you must understand the code you submit.
- We will hold interview sessions during the final slot, where you will demo your project and answer questions about it.
Exams
- Midterm on October 30
- Final: December 4
- Gradescope multiple choice
- Individual
- Done in person during class
In-class Quizzes
We will do quizzes in class via ClassQuestion
- Make class interactive
- Help you and me understand what’s tricky
Protocol
- Discuss
- I show the quiz on screen
- Discuss with your neighbor
- Try to reach consensus
- Vote
- On the ClassQuestion website
- Class Discuss
- What was easy or tricky?
TEST QUIZ
How can you earn 5% extra credit for this class?
A do all my homework alone
B answers other students’ questions on Piazza
C submit all my homework on due date (without using late days)
D post snarky comments on zoom chat during lecture
Your Resources
- Office hours
- check calendar
- Piazza
- we might not answer every day (we are short-staffed this quarter)
- try to rely on each other and AI assistants
- but we will eventually read all posts and intervene if we see misconceptions
- No text
- online lecture notes and links
Academic Integrity
General policy: everything you submit for a grade should be your own work, or else you should cite the source
For details, please see academic integrity statement on the website
For programming assignments do not:
- search or post on Chegg, StackOverflow etc
- try to find solutions from previous years
For exams additionally do not:
- use AI assistants
- communicate with your classmates during the exam
- try to find past exams that are not publicly posted
Policy on using AI assistants (e.g., Copilot, ChatGPT): - using AI assistants is allowed for coding (not quizzes) - you are responsible for understanding all the code you submit - in the final project, you are encouraged to use AI assistants - in the assignments, you are discouraged to use AI assistants because the purpose of the assignments is to practice new coding skills on simple problems
Students with Disabilites
Students requesting accommodations for this course due to a disability or current functional limitation must provide a current Authorization for Accommodation (AFA) letter issued by the Office for Students with Disabilities (OSD).
Students are required to present their AFA letters to Faculty (please make arrangements to contact me privately) and to the CSE OSD Liaison in advance so that accommodations may be arranged.
Diversity and Inclusion
Goal
- Create a diverse and inclusive learning environment
- Where all students feel comfortable and can thrive
- If there is a way we can make you feel more included, please let one of the course staff know
Expectations
- We expect that you will honor and respect your classmates
- Abide by the UCSD Principles of Community
- Understand that others’ backgrounds, perspectives and experiences may be different than your own
- Help us to build an environment where everyone is respected and feels comfortable.
If you experience any sort of harassment or discrimination, please contact the Office of Prevention of Harassment and Discrimination. Students may receive confidential assistance at the Sexual Assault Resource Center at (858) 534-5793 or Counseling and Psychological Services (CAPS) at (858) 534-3755.