CSSE221: Software Dev. Honors Day 17 Announcements Announcements Fifteen and CarsTrucksTrains coming back Fifteen and CarsTrucksTrains coming back Note:

Slides:



Advertisements
Similar presentations
CSE 113 Introduction to Computer Programming Lecture slides for Week 10 Monday, October 31 th, 2011 Instructor: Scott Settembre.
Advertisements

Recursion Great fleas have little fleas upon their backs to bite 'em, And little fleas have lesser fleas, and so ad infinitum. And the great fleas themselves,
CSSE221: Software Dev. Honors Day 10 Announcements Announcements Fifteen due Monday 11:59 pm. Monday will be a workday. Fifteen due Monday 11:59 pm. Monday.
CSSE221: Fundamentals of Software Development Honors Matt Boutell Olin 169 Don’t plug in your laptop just yet… And think of something memorable about yourself.
CSSE221: Software Dev. Honors Day 16 Announcements Announcements Markov due Wednesday 11:59 pm Markov due Wednesday 11:59 pm Homework 6 due next Tuesday,
CSSE221: Software Dev. Honors Day 4 Pass in Runtime Assignment now to assistants Pass in Runtime Assignment now to assistants Announcements Announcements.
CSSE221: Software Dev. Honors Day 25 Announcements: Announcements: Now returning programming mini-exam feedback, HW7, and some capsule quizzes. Now returning.
CSSE221: Software Dev. Honors Day 2 Announcements Announcements Homework due now Homework due now Any problems committing JavaEyes to Subversion? Any problems.
CSSE221: Software Dev. Honors Day 5 Announcements Announcements Homework 2 written portion due now Homework 2 written portion due now You survived the.
CSSE221: Software Dev. Honors Day 13 Announcements Announcements Contractions throughout the night… Contractions throughout the night… Late day assignments.
CSSE221: Software Dev. Honors Day 23 Announcements: Announcements: Pass in yesterday’s capsule quiz Pass in yesterday’s capsule quiz Homework 7 electronic.
CSSE221: Software Dev. Honors Day 7 Announcements Announcements HW2 and inheritance quiz returned now. HW2 and inheritance quiz returned now. Solutions.
CSSE221: Software Dev. Honors Day 29 Announcements Announcements Any questions on strings? Any questions on strings? Section 2: pass in quiz after question.
CSSE221: Software Dev. Honors Day 20 Announcements Announcements Homework 7 due beginning of next class. Homework 7 due beginning of next class. 6 short.
CSSE221: Software Dev. Honors Day 11 Pass in HW4 now Pass in HW4 now Fifteen due 11:59pm Fifteen due 11:59pm Announcements Announcements Questions on Fifteen?
CSSE221: Software Dev. Honors Day 9 Announcements Announcements HW3 passed back, follow link from HW3 to its solution. HW3 passed back, follow link from.
COMP4710 Senior Design Richard Chapman. Outline What is Senior Design? What is Senior Design? Course Structure Course Structure End of Cycle Binder End.
CSSE221: Software Dev. Honors Day 18 Announcements Announcements Markov, some capsules coming back Markov, some capsules coming back Due this week: Due.
PLEASE HELP US OUT WITH THIS: When you go to the open lab next door in 203, please make sure you sign in on the log sheet and enter your instructor’s.
BIT 115: Introduction To Programming1 Sit in front of a computer Log in –Username: 230class –password: –domain: student Bring up the course web.
COMP 111 Programming Languages 1 First Day. Course COMP111 Dr. Abdul-Hameed Assawadi Office: Room AS15 – No. 2 Tel: Ext. ??
Prof. Matthew Hertz SH 1029F /
ENHANCING STUDENT ENGAGEMENT AND UNDERSTANDING THROUGH VIDEO LECTURES AND QUIZZING AMY RUTLEDGE, SPECIAL INSTRUCTOR OF MANAGEMENT INFORMATION SYSTEMS OAKLAND.
Prof. Matthew Hertz WTC 207D /
Teaching Thermodynamics with Collaborative Learning Larry Caretto Mechanical Engineering Department June 9, 2006.
Computer Science and Software Engineering University of Wisconsin - Platteville 9. Recursion Yan Shi CS/SE 2630 Lecture Notes Partially adopted from C++
BIT 142:Programming & Data Structures in C#. BIT 142: Intermediate Programming2 Today Quizzes Exam Review Catch-up Work.
How to start Milestone 1 CSSE 371 Project Info There are only 8 easy steps…
Problem of the Day  Why are manhole covers round?
Select ‘myVCU’ Select ‘eServices’ Select ‘Student’
Matter and Interactions 1 Fall 2006 Matter & Interactions I Physics Professor & Lecturer: Dr. Reinhard Schumacher Teaching Assistants: Ms. Elisa.
Fall 2010 UVa David Evans cs2220: Engineering Software Class 28: Past and Future.
1 Daily Announcements CS 202, Spring 2007 Aaron Bloomfield.
Agenda for the week of 1/28: You should be finished your midterm exam! It had three sections: Multiple Choice, Short Answer was completed in session #1.
1 IELTS Listening & Speaking Fall 2012 Meet twice a week (106FB meet W,F. 108AC meet Th,M.) Website:
IST 210: Organization of Data
1 1.Log in to the computer in front of you –Temp account: 231class / 2.Update your in Cascadia's system –If I need to you I'll use.
Iteration Statements CGS 3460, Lecture 18 Feb 20, 2006 Hen-I Yang.
Please CLOSE YOUR LAPTOPS, and turn off and put away your cell phones, and get out your note- taking materials.
Format of the Final Project. Final Project The Final project is due 1 week from today. To complete the project students must prepare the following – A.
CSS 290: Video Games and Computer Programming. CSS 2902 Reading: Conditional Statements PLAD Ch 4 –The objective for this book is to provide you with.
CSC 213 – Large Scale Programming Prof. Matthew Hertz WTC 207D /
Introduction to Methods Shirley Moore CS 1401 Spring 2013 cs1401spring2013.pbworks.com April 1, 2013.
INDEPENDENT PRACTICE AND CLOSURE Lesson Planning.
BIT 143: Programming – Data Structures It is assumed that you will also be present for the slideshow for the first day of class. Between that slideshow.
REMINDER: If you haven’t yet passed the Gateway Quiz, make sure you take it this week! (You can find more practice quizzes online in the Gateway Info menu.
1. PLEASE HELP US OUT WITH THIS: When you go to the open lab next door in 203, please make sure you sign in on the log sheet and enter your instructor’s.
BIT 143: Programming-Data Structures1 Before Class Begins: Sit in front of a computer Log in –IF you don’t yet have an account, you can use the guest account.
U.S. History Group Project.  In the remaining weeks of school, you, the students, will be put in the position of teacher. You will be broken up into.
1 IELTS Listening & Speaking Fall 2012 Meet twice a week (106FB meet W,F. 108AC meet Th,M.) Website:
08/29/2006 Introduction INTRODUCTION Instructor: Petru S. Fodor Class webpage: PHYSICS 243H.
IST 210: ORGANIZATION OF DATA Introduction IST210 1.
Recursion in Java The answer to life’s greatest mysteries are on the last slide.
1 Required , Google Group 1.Send the professor (This is also listed in the –In the Subject,
REMINDER: If you haven’t yet passed the Gateway Quiz, make sure you take it this week! (You can find more practice quizzes online in the Gateway Info menu.
1 1.Log in to the computer in front of you –Temp account: 210class / 2.Update your in Cascadia's system –If I need to you I'll use.
CS 360 Lab 1 Professor: Krzysztof Nowak TA: Mark Boady.
Responsibilities CS 4501 / 6501 Software Testing
IST256 : Applications Programming for Information Systems
Recursion Great fleas have little fleas upon their backs to bite 'em, And little fleas have lesser fleas, and so ad infinitum. And the great fleas themselves,
Training Students at ICDC
CMSC201 Computer Science I for Majors Lecture 16 – Recursion
Jeff Offutt SWE 637 Software Testing
CSE 303 Concepts and Tools for Software Development
Responsibilities CS 4640 Programming Languages for Web Applications
Recursion Great fleas have little fleas upon their backs to bite 'em, And little fleas have lesser fleas, and so ad infinitum. And the great fleas themselves,
Recursion Great fleas have little fleas upon their backs to bite 'em, And little fleas have lesser fleas, and so ad infinitum. And the great fleas themselves,
Yan Shi CS/SE 2630 Lecture Notes
BIT 115: Introduction To Programming
BIT 143:Programming & Data Structures in C#
Presentation transcript:

CSSE221: Software Dev. Honors Day 17 Announcements Announcements Fifteen and CarsTrucksTrains coming back Fifteen and CarsTrucksTrains coming back Note: depending on complexity of code, you should use // internal comments as well as javadoc Note: depending on complexity of code, you should use // internal comments as well as javadoc Javadoc is for the user of the program; internal comments are for programmers; both are important Javadoc is for the user of the program; internal comments are for programmers; both are important Markov due Wednesday 11:59 pm Markov due Wednesday 11:59 pm I may post a more complete grading script when I finish it. I may post a more complete grading script when I finish it. Homework 7 posted, due next Thursday. Homework 7 posted, due next Thursday. 6 short written problems on data structures 6 short written problems on data structures Sierpinski gasket Sierpinski gasket Fibonacci exercise on recursion and tail recursion (will discuss today) Fibonacci exercise on recursion and tail recursion (will discuss today) Schedule updated, some capsules shifted (threads next Tuesday, animation next Thursday) Schedule updated, some capsules shifted (threads next Tuesday, animation next Thursday)

Statistics Exam 1 Exam Average: 79.5% Average: 79.5% Midterm averages: (4 B+) (4 C+) Midterm grades submitted

This week: Markov Monday: Monday: Eclipse’s Debugger Eclipse’s Debugger Recursion, Sierpinski Recursion, Sierpinski Tuesday: Tuesday: Review simulation project. Review simulation project. Capsule round 3: choose groups, discuss expectations Capsule round 3: choose groups, discuss expectations Wrap up recursion Wrap up recursion Some time for Markov? Some time for Markov? Thursday: Thursday: Fall Break! Fall Break!

Simulation Project An educational simulation or animation of some process An educational simulation or animation of some process Must include non-trivial use of 2 non-array data structures Must include non-trivial use of 2 non-array data structures The best ones are interactive The best ones are interactive If yours coincides with a capsule topic… If yours coincides with a capsule topic… Don’t just copy one of the zillions of simulations out there that are pretty. but aren’t educational. Could you make yours actually help someone’s understanding? Don’t just copy one of the zillions of simulations out there that are pretty. but aren’t educational. Could you make yours actually help someone’s understanding?

How to do a capsule? Round 3: +Lecture Now you get to teach the whole topic to the class. Now you get to teach the whole topic to the class. 45 minutes 45 minutes Lecture (whiteboard or slides) Lecture (whiteboard or slides) Demo Demo Hands-on activity Hands-on activity Quiz: integrated with your slides and demo/activity Quiz: integrated with your slides and demo/activity Summary (If your slides contain details, then you may skip this) Summary (If your slides contain details, then you may skip this)

Capsule Deliverables By 7:30 am on the day you are presenting: By 7:30 am on the day you are presenting: the summary or slides, quiz, and key to me (as before) the summary or slides, quiz, and key to me (as before) Commit your demo to csse public Commit your demo to csse public Include your section number in the project name: csse221 Include your section number in the project name: csse221 Bring to class printed versions (as before): Bring to class printed versions (as before): 1 copy of summary 1 copy of summary 2 copies of key 2 copies of key Enough copies of quiz for the class (20) Enough copies of quiz for the class (20)

Other ideas Still need roles (demo-driver, rover, questioner) Still need roles (demo-driver, rover, questioner) Add 1 or more people to present the slides Add 1 or more people to present the slides You’ll need to multi-task You’ll need to multi-task You may move freely between modes (slides/live coding/activities) You may move freely between modes (slides/live coding/activities)

How to give a great presentation! Prepare! Prepare! Research: Know your stuff Research: Know your stuff Summarize: what are the 2-3 most important things I want them to get from this capsule? Summarize: what are the 2-3 most important things I want them to get from this capsule? Spend some time thinking about the flow Spend some time thinking about the flow Rehearse the whole thing together Rehearse the whole thing together Delivery Delivery Face your classmates Face your classmates Make eye contact Make eye contact Enunciate clearly and slowly Enunciate clearly and slowly

Capsule Rubric New: New: Context and motivation Context and motivation Summary  Explanation/correctness/organization Summary  Explanation/correctness/organization Presentation skills Presentation skills Time (OK to go slightly under, but if you don’t rehearse, this could really bite you!) Time (OK to go slightly under, but if you don’t rehearse, this could really bite you!)

Preference survey In Angel > Lessons > Other. In Angel > Lessons > Other. Give choices for: Give choices for: Capsule topic Capsule topic Simulation ideas Simulation ideas Teammates for simulation project Teammates for simulation project

Tail Recursion int fact(int n) { if (n<=1) { return 1; return n * fact(n-1); } Once we reach the base case, we need to do all the multiplications as we empty the call stack. Once we reach the base case, we need to do all the multiplications as we empty the call stack. int gcd(a,b) { if (a % b == 0) return b; return gcd(b, a % b); } Here, once we reach the base case, we are done. This is called a tail-recursive function. In a tail-recursive function, the info that needs to be stored on the call stack is much smaller. In a tail-recursive function, the info that needs to be stored on the call stack is much smaller. Can we make factorial tail-recursive? Can we make factorial tail-recursive?

Tail Recursion Template We can make many methods tail-recursive, by using a helper method with a second parameter to hold a partial solution. Template: We can make many methods tail-recursive, by using a helper method with a second parameter to hold a partial solution. Template: int foo(int n) { return fooHelper(n, {initial_solution}); } int fooHelper(int n, solution) { if (base case) { if (base case) { return solution; } return fooHelper(n-1, {new solution}); }

Factorial Direct recursion: int fact(int n) { if (n<=1) { return 1; return n * fact(n-1); } Tail-recursive: int fact(int n) { return factHelper(n, ???) } int factHelper(int n, soln) { if (n<=1) { return soln; } return factHelper(???, ???); } See how once we get to the base case, we are done? See how once we get to the base case, we are done? 1 n-1, soln * n

Homework The direct version makes 2 recursive calls. The direct version makes 2 recursive calls. The tail-recursive version only uses one call (with 2 extra parameters): huge performance boost! The tail-recursive version only uses one call (with 2 extra parameters): huge performance boost! 0, 1, 1, 2, 3, 5, 8, 13, … 0, 1, 1, 2, 3, 5, 8, 13, …

Tail Recursion Verbiage A recursive function is said to be tail recursive if there are no pending operations to be performed on return from a recursive call. A recursive function is said to be tail recursive if there are no pending operations to be performed on return from a recursive call. Tail recursive functions are often said to "return the value of the last recursive call as the value of the function." Tail recursive functions are often said to "return the value of the last recursive call as the value of the function." Tail recursion is very desirable because the amount of information which must be stored during the computation is independent of the number of recursive calls. Tail recursion is very desirable because the amount of information which must be stored during the computation is independent of the number of recursive calls. Some modern computing systems will actually compute tail-recursive functions using an iterative process. Some modern computing systems will actually compute tail-recursive functions using an iterative process. Source:

Break Then Markov time Then Markov time I’ll pass back exams during this time I’ll pass back exams during this time