1 / 16

CS3 Fall 2005

CS3 Fall 2005. Lecture week 15. Administrivia. The final survey will be up tomorrow: you NEED to do this to receive a grade on your project! Final: Saturday, Dec 17 th , 8-11 a.m. 155 Dwinelle Practice final in reader Study help:

rosalindar
Download Presentation

CS3 Fall 2005

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS3 Fall 2005 Lecture week 15

  2. Administrivia • The final survey will be up tomorrow: • you NEED to do this to receive a grade on your project! • Final: • Saturday, Dec 17th, 8-11 a.m. • 155 Dwinelle • Practice final in reader • Study help: • Final review session: Thursday, Dec. 15th, 8 pm – 11 pm. • Wozniak Room, 430 Soda Hall • Check the course portal announcements for additional office hours the week before the final. • Send questions to Bobak, James, or Nate.

  3. The project • Checkoff #3 is the next lab. The TA will run your code. • Project is due at midnight on the day of your lab, this Thursday/Friday. • Any questions about anything?

  4. So, what have we done in CS3? • Consider the handout of topics • Common topics • Pre-recursion • Recursion • Higher order procedures • Lists • Case studies • Working with large programs

  5. Another list… • Functional programming • Functions as data • Recursion • Abstraction • Managing large programs

  6. Another list continued • Functional Programming • All that can matter to a procedure is what it returns. • Small functions can be easily tested (isolated) • In other languages, you typically: • Perform several actions in a sequence • Set the value of a global or local variable. • Print, write files, draw pictures, connect to the internet, etc. • Other "paradigms": sequential, object-oriented, declarative

  7. Another list continued 2) Functions as data • Higher order procedures will take functions as parameters. • It is useful to return functions • Lambda is quite useful

  8. Another list continued 3) Recursion • Linear (simple) to quite advanced • In contrast to iteration and looping (where counters or state define looping constraints) • Knowledge of recursion will help these simpler cases.

  9. Another list continued 4) Abstraction • The big idea that is related to everything! • A design practice that makes it possible to carve up a problem, and therefore focus on only part of it. • Makes working collaboratively more efficient

  10. Another list continued 5) Managing large programs • Style: commenting, naming conventions, etc. • Abstraction: for maintenance and collaboration • Iterative testing • Reading the specifications, and communicating often with colleagues

  11. How are you going to study for the Final?

  12. The language Scheme • Scheme allows you to ignore tedium and focus on core concepts • The core concepts are what we are teaching! • Other languages: • Generally imperative, sequential • Lots and lots of syntactic structure (built in commands) • Object-oriented is very "popular" now

  13. CS3 concepts out in the world • Scheme/lisp does show up: scripting languages inside applications (emacs, autocad, Flash, etc.) • Scheme/Lisp is used as a "prototyping" language • to quickly create working solutions for brainstorming, testing, to fine tune in other languages, etc. • Recursion isn't used directly (often), but recursive ideas show up everywhere

  14. Java and PHP • Java is a very popular programming language • Designed for LARGE programs • Very nice tools for development • Gobs of libraries (previous solutions) to help solve problems that you might want solved • PHP • Popular course for web development (combined with a web-server and database) • Lots of features, but little overall "sense" • Because programs in PHP execute behind a web-server and create, on the fly, programs in other languages, debugging can be onerous.

  15. SQL (structured query language for databases) resembles HOFs • query: “Tell me the names of all the lecturers who have been at UCB longer than I have.” select name from lecturers where date_of_hire < (select date_of_hire from lecturers where name = 'titteton'); • query: “Tell me the names of all the faculty who are older than the faculty member who has been here the longest.” select L1.name from lecturers as L1 where L1.age > (select L2.age from lecturers as L2 where L2.date_of_hire = (select min(date_of_hire) from lecturers) );

More Related