CIT 590 Intro to Programming Lecture 12. Agenda More stuff with classes Few more thoughts on unit testing/coding in general Summarizing Python.

Slides:



Advertisements
Similar presentations
INFIX, PREFIX, & POSTFIX EXPRESSIONS. Infix Notation We usually write algebraic expressions like this: a + b This is called infix notation, because the.
Advertisements

Regular Expressions, Backus-Naur Form and Reverse Polish Notation.
Computer Science 2 Data Structures V section 2 Recitation 1.
Intro to CIT 594
Week 5 - Friday.  What did we talk about last time?  Repetition  while loops.
Stacks.
Reverse Polish Notation (RPN) & Stacks CSC 1401: Introduction to Programming with Java Week 14 – Lecture 2 Wanda M. Kunkle.
Reverse Polish Expressions Some general observations about what they are and how they relate to infix expressions. These 9 slides provide details about.
Postfix notation. About postfix notation Postfix, or Reverse Polish Notation (RPN) is an alternative to the way we usually write arithmetic expressions.
CSC 212 – Data Structures Prof. Matthew Hertz WTC 207D /
Python November 18, Unit 7. So Far We can get user input We can create variables We can convert values from one type to another using functions We can.
Class 1: What this course is about. Assignments Reading: Chapter 1, pp 1-33 Do in Class 1: –Exercises on pages 13, 14, 22, 28 To hand in in Class 2: –Exercises.
Reading.
CIT 590 Unit testing. Agenda Debugging attempt 2 (because I am stubborn) What is unit testing Why? Unit testing framework in Python.
Terms: Test (Case) vs. Test Suite
CIT 590 Intro to Programming Last lecture on Python.
The preprocessor and the compilation process COP3275 – PROGRAMMING USING C DIEGO J. RIVERA-GUTIERREZ.
COMP 465W: Software Engineering Fall Components of the Course The three main components of this course are: The study of software engineering as.
CSC207 Software Design Summer 2011 Lecturer: Hesam C. Esfahani
CIT 590 Intro to Programming Last lecture on Python.
Welcome Parents All images were purchased from Scrappin’ Doodles and may not be redistributed.
  Target: I can identify new literary terms.  Agenda:  Share summaries and record a sentence for each  Review new literary terms  Read chapter 17.
Mrs. Fagan– Language Arts. Bellringer Tell me about your child. Complete now or when you have a chance. Send it with your student (sealed if need be or.
What does it take to make the most of Your Math Homework ?
Lecture 4 Introduction to Programming. if ( grade ==‘A’ ) cout
CIT 590 Intro to Programming Lecture 4. Agenda Doubts from HW1 and HW2 Main function Break, quit, exit Function argument names, scope What is modularity!
Back to School Night Welcome to Ms. Brown’s 8 th grade History class. Please take a handout. Examples of the work we will be doing this year are included.
TEAMWORK & BACKLOGS GAME CAPSTONE – WINTER 2014 BRIAN SCHRANK – DEPAUL UNIVERSITY.
Conditions. Objectives  Understanding what altering the flow of control does on programs and being able to apply thee to design code  Look at why indentation.
1. Finding your seat - grab your name tent from the basket 2. Match the number written on your name tent to the seat number in our class 3. Take out your.
Science Andrea’s Student Led Conference. Cover Letter This year in science I have learned about many things. We learned a ton of important information.
INFIX, PREFIX, & POSTFIX EXPRESSIONS Saurav Karmakar Spring 2007.
AP Agenda for Sept. 16/17, 2013 Daily Objective: To understand the vocabulary to be successful on the AP Exam Daily Assignments: Assign Literary Terms.
CURRICULUM NIGHT 2 nd Grade. WHAT ARE WE LEARNING? Reading: Comprehension, Accuracy, Fluency, Expanding Vocabulary Math: Numbers, Operations, Measurement,
Welcome to IST331 S1 Main concepts today Introduction to team, processes The user Cognitive ergonomics, design Examples of things about the user that are.
INTRODUCTION TO PROGRAMMING ISMAIL ABUMUHFOUZ | CS 146.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 36: Modeling Computing.
The one thing I need to continue to work on the most is socialization. I don’t purposely talk to my friends during class, but sometimes I look up and.
CS5103 Software Engineering Lecture 02 More on Software Process Models.
Intro to CIT 594
Student Perceptions of Hybrid Courses. Like about Hybrid Format Course 1 For a few weeks, can take things at your own pace Can cover more topics in less.
  Target: I can identify new literary terms.  Agenda:  Share summaries and record a sentence for each  Review new literary terms  Read chapter 17.
CSC 107 – Programming For Science. Science Means Solving Problems  Physics – How does an atom work?
Partner Book Analysis How is this different from a book report?????
Date: These are things I think I do well. 1. I think I read at a level that suits me. 2. I think that I always try my best in gym class. 3. I think that.
CIT 590 Intro to Programming Lecture 4. How are assignments evaluated Pay attention to what the HW says it is trying to teach you about ‘modular programming’
College Essay Final Polish Almost there!. Do you have … Your final copy? Your revised rough draft? Your rubric?
CIT 590 Intro to Programming Lecture 10 (object oriented programming)
Instructor: Alexander Stoytchev CprE 185: Intro to Problem Solving (using C)
CompSci 101 Introduction to Computer Science November 11, 2014 Prof. Rodger CompSci 101 Fall Review for exam.
End of Key Stage 1 Assessments Tuesday 1 st April pm.
PROBLEM SOLVING AND PROGRAMMING ISMAIL ABUMUHFOUZ | CS 170.
Getting Started With Python Brendan Routledge
Computer Science I ISMAIL ABUMUHFOUZ | CS 180. CS 180 Description BRIEF SUMMARY: This course covers a study of the algorithmic approach and the object.
Quiz 1 A sample quiz 1 is linked to the grading page on the course web site. Everything up to and including this Friday’s lecture except that conditionals.
By Manish Shrotriya CSE MS 4 Point Agile Manifesto 1.Individuals and interactions over processes and tools 2.Working software over comprehensive.
Regular Expressions, Backus-Naur Form and Reverse Polish Notation
CSE 374 Programming Concepts & Tools
Stack as an ADT.
Decomposition.
Courtesy xkcd.
Infix to Postfix Conversion
Learning to Program in Python
Infix to Postfix Conversion
Computer Science 2 5/17/2016 Finish the Queue Program
CMSC201 Computer Science I for Majors Final Exam Information
Reading.
Stacks A stack is an ordered set of elements, for which only the last element placed into the stack is accessible. The stack data type is also known as.
451 Operating Systems Section 8
Review and Instructions
Presentation transcript:

CIT 590 Intro to Programming Lecture 12

Agenda More stuff with classes Few more thoughts on unit testing/coding in general Summarizing Python

Administrivia Midterm on Oct 21 In class Write answers in space provided style question paper Closed book Syntax is implicitly going to be tested, but we will only use syntax that you have probably had to use in your HWs Questions like What does this program do Debug the program What does this list comprehension give me Short answers and usually only 1 correct answer

HW grading HW1 is all done HW2 mostly done. Should be done by tonight HW3 will be done over the fall break HW4 – we just changed the grading scheme to the more lenient one so all TAs should be using that HW5 – expect it to be done by the Friday of next week.

Continuation of the stacks / RPN calculator >>> calc = CalculatorEngine() >>> calc.pushOperand(5) >>> calc.pushOperand(3) >>> calc.performBinary(math.pow) >>> calc.currentOperand() But no non insanely geeky user is going to use my calculator

Wrapping an interface around the calculator engine RPNCalculator.py But even this requires the user to remember to write everything in the postfix/reverse polish notation

Can we write an infix calculator? If we can convert an infix expression into the equivalent reverse polish notation expression we are done RPN was nice in that we did not have to worry about order of precedence. Now we do. How do we convert an infix expression to a postfix expression? Stacks!! Consider * 7 versus 3*4 + 7

More unit testing How do I write a test without having written any code? Write some minimal code? Best practice in industry is to write the method signature and say def get_blackjackrank(self): raise NotImplementedError The more you use modular programming, the more testable your code will be Writing unit tests is actually almost like writing code. Sometimes the unit test file is bigger than the code file Do not hesitate to have a bunch of test cases.

How code is written (agile paradigm) PM comes with specs Make me a blackjack game Dev team sits and writes ‘user stories’ A user should be able to place a card on the table A user should be able to discard a card A user should be able to get his/her score User story split up into tasks Now we start talking data structures/representation etc Maybe the table is a list of lists? Maybe the table is a dictionary? Maybe the table is some fancy matrix? top-down Each dev looks at the list of functions they have to write Make a decision about which functionalities go together = class

How code is written (agile paradigm) Start writing stubs with raise NotImplementedError Write unit tests for the simplest of those methods Watch unit test fail Write code to make unit test pass Repeat unit testing process Talk to other devs about the classes they are writing Hook the classes up together Write tests that test the integration - sometimes these tests are no longer in our unit test form. Front end tests, regression test suite, manual tests

What do I do next with Python? Python has tons of libraries If you use a lot of numerical methods Consider numpy/scipy Numpydemo.py sillyLittleGraph.py If you thought the Harry Potter assignment was interesting or if you are interesting in understanding linguistics from a CS perspective Data science Use it in a hackathon! Get good at it and work at Youtube (well ok it is Google now…)

After fall break …