CSC 151.01, Class 41: Wrap Up
Overview
- Preliminaries
- Notes and news
- Upcoming work
- Extra credit
- Questions
- Comments on the final
- The subject matter(s) of the course
- Final PSA
- Final comments
Preliminaries
News / Etc.
- Sit where you’d like
- Today is my last day in CSC 151 this semester. (My son and the HS band
are playing at the Iowa Bandmasters’ Association meeting on Friday.)
- You are still expected to show up for class on Friday. Our mentors will take attendance.
- Friday: Fill out evaluation forms (required). Go over problems from the final (optional).
- We have review sessions for the final on Wednesday of finals’ week.
Details forthcoming. - Some people received necessary extensions on the exam. Please do not discuss the exam with anyone until you get them back.
- I do intend to get all grades to you by Tuesday of finals’ week.
- Thanks for the recommendations for next semester’s students. They range from two words (“Start early”) to extended paragraphs.
- Reminder: Sunday is Mother’s day.
- Thank you S*y.
Upcoming work
- Cover sheets due NOW.
- Epilogues due TONIGHT.
- Final: Thursday or Friday afternoon of Finals Week (2pm-5pm) in this room.
Extra credit (Academic/Artistic)
- CSC 322 project presentations, Friday, 2-4 p.m. in 3821.
- Quantifying the effects of skill-based immigration - a two-country approach. TODAY at 4:15 in JRC 209.
- The Data Science Pipeline in Action: From Lung Cancer to Customer Churn. Friday at 4:15 in JRC 209.
- Networks and Foreign Policy Analysis: Relations, position and structure within the Clinton State Department. Tuesday at 4:15 p.m. in JRC 226.
Extra credit (Peer)
Extra credit (Recurring peer)
- Listen to KDIC Wednesdays at 6pm - Witty banter with other
personalities and/or co-host. Also Indian, Arabic, and Farsi music.
(Up to two units of extra credit.) - Listen to KDIC Thursday at 7pm - Classic Rock. (60’s and 70’s)
- Peer editing with SS. Talk to SS about the details. Make your English Lit more literate.
Extra credit (Misc)
Other good things
- Sing happy birthday in class on Friday.
About quiz 13
- Problem 2 was confusing. I didn’t take off if you got it wrong or left it blank.
- People who did well on problem 2 got bonus points.
What are the parameters to the sorting routines?
- It varies. We’ve seen multiple implementations.
- Option 1: The list and a comparator.
(sort numbers <) - Option 2: The list, a get-key operation, and a comparator
(sort students car string-ci>=?) - For “sort in decreasing order”, I wanted either
(insertion-sort contacts car string-ci>=?)(sort contacts (lambda (a b) (string-ci>=? (car a) (car b))))(sort contacts (comparator string-ci>=? car))
- For sort by last name and first, I wanted either
(insertion-sort contacts (lambda (contact) (string-append (car contact) " " (cadr contact))) string-ci<=?)
Questions
Comments on the final
- Thursday at 2pm in this room.
- Different format than most exams: Paper (not computer), 4 problems (not 6),
…
- Kind of “extended quiz”
- But you do get to bring notes.
- We may include vectors, trees, analysis/efficiency, code reading, code writing, lists, sorting, etc.
- We will not ask you to deal with files.
- In the past, most students who took the final finished in 90 minutes or less.
The subject matter(s) of the course
Problem solving
- Decompose a complex problem into smaller problems and combine the solutions back together. (To make a sandwich, we might think about “spread substance on bread” as a smaller problem.)
- You can solve the same problem in multiple ways.
- Don’t accept your first solution as the only solution.
- Reflect on whether you can solve the problem better.
- We solve problems better when we can talk through the problems and solutions with a partner.
- You don’t solve every problem from scratch; there are patterns you develop and can apply to new problems.
- Don’t just jump in to your solution, plan ahead. Think about potential complexities or problems.
- Work backwards from goal to solution.
The Core of CS: Algorithms and data structures
- We’ve learned about sorting.
- Insertion sort.
- Um sort.
- Merge sort.
- Quick sort.
- Selection sort.
- Parameters to sorting, like the weird comparators we use for the built in sort.
- We cover about four more in 207.
- We’ve learned above binary search trees.
- We can (and should) generalize algorithms so that they work for a broader set of inputs. E.g., if you can sort a vector of integers, you should be able to sort a vector of any type of values.
- Basic data structures: List, vectors, tables (lists of lists, vectors of vectors, etc.), trees, files (text and CSV)
- Core parts of algorithms: naming, subroutines, conditionals, sequencing, input and output, basic operations,
Functional programming
A different approach to thinking about programming and problem solving: centers around a mathematical approach to program design.
- “Functions are first-class values”; they can be parameters to other
functions, they can be returned by other functions.
(o f g)-otakes two functions as input and returns a new function.
- Many common higher-order functions:
map,reduce,filter. - Side-effect-free programming. (Don’t change variables, don’t change the state of the system.)
- Anonymous procedures, created with
lambda.- E.g.,
(map (lambda (x) (+ x (square x))) (iota 10))
- E.g.,
- Other ways of building anonymous procedures with
section. - Recursion
- Direct
- Helper
- Tail
- Over lists, vectors, files, trees
Program and Software Design
- Test! Helps us identify errors. Helps us think more broadly about input and output.
- Program in pairs. It leads to more reliable code. (And usually ends up taking less time.)
- Untangling complex code. (Both the “Whatzitdo’s” and the complex code Sam sometimes inserts into readings. Also the code we wrote ourselves.)
- Document! It helps you figure out what the code will do. Good preconditions and postconditions not only explain your code to a client, they also help you learn more about the problem.
- We can write real programs. (Assignment seven.)
- Keeping your code readable.
- Recovering from errors/problems.
Scheme
- (you (need ((((lots)) of parentheses))))
- Evaluation strategy.
- How do do all of the six (seven?) key parts of algorithms.
- Between 50 and 100 different procedures (Sam thinks more.)
- You’ve learned most of core Scheme.
Data science
- Most data are messy; you need ways to clean your data
- Techniques for analyzing data.
- We can apply CS to other, more important, fields
- Manipulate complex data and present it
- Numerically
- Visually
- Work with real-world data which leads to useful understanding.
General thinking skills
- Practice thinking on your feet.
- Experience working with a wide variety of other people.
- Step-by-step approaches (back to the decomposition from problem solving)
- Ask for questions and ask for help.
And beyond
- Moral modeling: The value of family.
- “There’s more to life than CS (or any academic discipline)”
- Clarified that CS is not the right thing for me.
- Laugh.
- Support those around you.
- Be moderate.
Final PSA of the semester
- Don’t let the stress of finals’ week negatively affect you.
- Get enough sleep.
- If you decide to shut off your brain with substances, do so in moderation.
- Don’t let academic honesty become an issue; our decision-making becomes less good at this time of the semester.
- Consent is essential.