INF1339ComputationalThinking-Week7-Slides-Part1

.pdf

School

University of Toronto *

*We aren’t endorsed by this school

Course

1339

Subject

Computer Science

Date

Oct 30, 2023

Type

pdf

Pages

36

Uploaded by hsoidsf

Report
INF1339 Introduction to Computational Thinking WEEK 7 OCTOBER 23 AND 25, 2023 – PART 1 (LECTURE) 1
For thousands of years the University of Toronto has been the traditional land of the Huron- Wendat, the Seneca, and the Mississaugas of the Credit. Today, this meeting place is still the home to many Indigenous people from across Turtle Island and we are grateful to have the opportunity to work on this land. For more information, see the Final Report of the Steering Committee for the University of Toronto Response to the Truth and Reconciliation Commission of Canada and the Faculty of Information’s Commitment to the Findings and Call for Action of the Truth and Reconciliation Commission . 2
Agenda Introduction What people found most important / most challenging General questions Textbook objectives Manipulating Data and Exploratory Data Analysis Correctness and Software Testing Anonymous Midterm Feedback Next week 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Agenda Introduction What people found most important / most challenging General questions Textbook objectives Manipulating Data and Exploratory Data Analysis Correctness and Software Testing Anonymous Midterm Feedback Next week 4
Important Learning from Week 5 5 Margret Hamilton's The Language as a Software Engineer Sustainable Design Software Engineering History and evolution Early programmers were women! Importance of computational thinking in sustainable software design
Most Challenging from Week 5 6 Sustainable Design The invisible implications on the environment for our actions today Ambiguity Sustainable thinking in practice Manifesto Universal systems language (USL)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Important Learning from Week 6 7
Most Challenging from Week 6 8
Any Questions about the Course? Things I learned at the Canadian Celebration of Women in Computing How do we help make everyone feel welcome? How can we help students build resilience? How can we teach with kindness? “Fire side chat” with Prof. Wendy Powley and me: Learn from others Find a job that makes you wake up in the morning and think “I’m happy it’s a work day”! Learn about yourself You don’t have to be a super-geek to succeed in the tech world Don't be afraid to step outside your comfort zone Apply for jobs even if you don’t have all of the listed requirements Build your network Believe in yourself 9
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
10
Objectives (from Riley & Hunt Ch 7) To know that many, if not most, of so-called computer errors are really human errors, generally data entry errors To know that correctness is impossible without a specification defining what correctness means To be able to explain the difference between verification and validation, and the reasons that each is important To realize that it is possible to prove the correctness of some software, but that such proofs are only used in rare occasions due to their cost and complexity To know the limitations of software testing with respect to correctness To be able to diagram a basic test suite consisting of test cases defined in terms of input conditions and expected behavior To be able to explain the difference between white box and black box testing, and the advantages of each To be able to analyze a test suite for a given activity diagram and demonstrate statement coverage To be able to explain the difference between statement coverage and path coverage and why path coverage is typically impossible To recognize equivalence partitioning and its role in testing To be able to construct a test suite using boundary value testing for one or two simple inputs 11
Agenda Introduction What people found most important / most challenging General questions Textbook objectives Manipulating Data and Exploratory Data Analysis Correctness and Software Testing Anonymous Midterm Feedback Next week 12
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Manipulating Data Nice tutorial on regular expressions (8 minutes): https://www.youtube.com/watch?v=jCAyQ7C71m4&t=30s Regular expression “cheat sheet”: https://cheatography.com/davechild/cheat- sheets/regular-expressions/ Practice here: https://regex101.com/ Often used to clean data and get it ready for analysis 13
Key elements of Telling Convincing Stories with Data (Alexander 2023) 1. Communication 2. Reproducibility 3. Ethics 4. Questions 5. Measurement 6. Data collection 7. Data cleaning and preparation 8. Exploratory data analysis 9. Statistical modeling 10. Scaling 14
Key elements of Telling Convincing Stories with Data (Alexander 2023) 1. Communication 2. Reproducibility 3. Ethics 4. Questions 5. Measurement 6. Data collection 7. Data cleaning and preparation 8. Exploratory data analysis 9. Statistical modeling 10. Scaling 15
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Exploratory Data Analysis (EDA) Process of coming to understand the look and feel of a dataset Open-ended process An iterative process that involves producing summary statistics, graphs, tables Never formally finishes and requires a variety of skills Difficult to delineate where EDA ends and formal statistical modeling begins Has a central role in how we come to understand the story we are telling Critical that all the steps taken during EDA are recorded and shared 16 (Alexander 2023)
Tangerine: Towards Efficient Exploratory Data Analysis using Computational Notebooks ENMENG LIU , SEPEHR HOSSEINI KHORASGANI, YIXIN TIAN, SHURUI ZHOU , KELLY LYONS (UNIVERSITY OF TORONTO), OBIDUL ISLAM, ALAIN CHABRIER, DON BANKS, ZHIBO ZHANG, GANDHI SIVAKUMAR (IBM) 17
Correctness and Testing Proof of correctness Software testing: Test cases and test suites Equivalence partitioning Boundary value analysis White box testing and code coverage 18
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Correctness and Testing Proof of correctness Software testing: Test cases and test suites Equivalence partitioning Boundary value analysis White box testing and code coverage 19
Proof of Correctness Recall from Week 4: Models can be used in formal software verification to prove or disprove the correctness of a system with respect to its specifications by: Verifying that the models are correct with respect to the specification Verifying that the source code is correct with respect to the specification Analyzing both models and source code And we read Brian Cantwell Smith’s paper: “when you design a computer system, that you first develop a model of the world, as indicated in the diagram. But you don't, in general, ever get to hold the model in your hand: computer systems, in general, are based on models that are purely abstract.” 20
Proof of Correctness (Riley & Hunt) Cost : requires a lot of computer scientist time, expressing specifications in the most formal logic is time consuming Difficulty : only the “most gifted” computer scientists can prove software correctness reliably and even they can make errors in their proofs Accounting for execution : as programs execute, the state (facts) change which makes it more challenging to formally reason about computer programs 21
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
“Next Best Thing”: Software Testing (Riley & Hunt) Evaluating a software product or system: Does it do what it is supposed to do? Are the behaviours consistent with the specifications? Software testing cannot guarantee correctness Why not? 22
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Correctness and Testing Proof of correctness Software testing: Test cases and test suites Equivalence partitioning Boundary value analysis White box testing and code coverage 23
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Test Cases Consider a single test case: A single, detailed scenario that verifies a specific aspect or feature of the software Each test case consists of a single program execution under a single set of circumstances If the test case succeeds, what can be concluded? Example INF1339 Books-R-Us: Name: Test1 Add book to shopping cart Description: A test case that adds a book to a shopping cart Expected outcome: Shopping cart quantity increased by 1, catalog pending quantity increased by 1 24
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Test Suites Group test cases into test suites Test suites are maintained and applied to new builds and releases: regression testing Example INF1339 Books-R-Us: Name : TS1: Test Suite for Buying Items in Shopping Cart Description : This test suite tests buying items in shopping cart in different cart configurations (no books, multiple different books, multiple copies of different books, with and without shipping costs, …). It does not test credit card payment List of Included Test Cases : 1. TC1: Buys books when no books in cart 2. TC2: Buys books with total cost over $50 3. TC3: Buys books with total cost <= $50 4. TC4: … 25
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Equivalence Partitioning Helps select test cases to cover different scenarios without testing every possible combination Focuses on representative cases that have a high likelihood of uncovering issues, bugs, defects Separate all possible input conditions into separate groups in such a way that each group has a commonality with respect to the specifications Example INF1339 Books-R-Us: Scenario : The search functionality allows users to search for books by title or author name Equivalence Partitioning : Group searches into equivalence classes: searches with valid book titles, searches with non-existent book titles, etc. Example INF1339 Books-R-Us: Scenario : Shoppers can pay using a credit card Equivalence Partitioning : Divide credit card inputs into equivalence classes: valid credit card numbers, expired cards, invalid card numbers (with and without correct address), etc. 26
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Boundary Value Analysis Helps design test cases around the boundaries of input domains to identify potential defects or issues related to those boundaries Typically: One test case at each boundary One test case just within each boundary One test case just outside each boundary One test case that is more typical (well within boundaries) 27
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Boundary Value Analysis INF1339 Books-R-Us: Scenario : Impact on catalog when adding a book to shopping cart; there are 10 available copies of book B in the catalog; shopper can add multiple quantities of a book at a time; Test cases: Minimum : Add 1 copy of book B to the shopping cart; Expected outcome : quantity=1 in shopping cart; available=9 in catalog Maximum : Add 10 copies of book B to the shopping cart; Expected outcome : quantity=10 in shopping cart; available=0 in catalog Below minimum : Add 0 copies of book B to the shopping cart; Expected outcome : message to shopper; no change to shopping cart; or catalog Above maximum : Add 11 copies of book B to the shopping cart; Expected outcome : message to shopper; no change to shopping cart or catalog Typical : Add 2 copies of book B to the shopping cart; Expected outcome : quantity=2 in shopping cart; available=8 in catalog 28
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
White Box Testing and Code Coverage White Box Testing: Also known as structural testing, glass-box, or code-based testing Examines the internal structure, logic, and code of a software application Requires access to the application's source code Uses knowledge of the source code to design test cases that execute different paths, conditions, and code segments within the application Code Coverage: Quantitative measure of the amount of source code that has been tested Essentially measures the effectiveness of white box testing Measures how many lines of code, branches, and conditions have been executed by a set of test cases Usually expressed as a percentage 29
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Example: CodeCov 30 https://www.youtube.com./watch?v=RJcqskKhZY8
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Summary Proof of correctness Software testing: Test cases and test suites Equivalence partitioning Boundary value analysis White box testing and code coverage 31
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Agenda Introduction What people found most important / most challenging General questions Textbook objectives Manipulating Data and Exploratory Data Analysis Correctness and Software Testing Anonymous Midterm Feedback Next week 32
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Anonymous Mid-Term Feedback I am interest to learn: How the class is going What might be improved over the rest of the term What might be improved for future iterations 33
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Agenda Introduction What people found most important / most challenging General questions Textbook objectives Manipulating Data and Exploratory Data Analysis Correctness and Software Testing Anonymous Midterm Feedback Next week 34
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Week 8 (Oct 30 and Nov 1) Information Security (1.5 hours in the main classroom then to breakout rooms) Readings: Riley & Hunt, Chapter 12 “Information Security” Khan Academy, “Encryption and public keys” https://www.khanacademy.org/computing/code-org/computers- and-the-internet/internet-works/v/the-internet-encryption-and-public-keys Rjaibi, W. & Muppidi, S. (Dec. 1, 2022). “Transitioning to Quantum-Safe Encryption”, Security Intelligence, https://securityintelligence.com/posts/transitioning-quantum-safe-encryption/ Simplilearn, “Encryption Explained Simply | What Is Encryption? | Cryptography And Network Security” https://www.youtube.com/watch?v=LA3fah6i-4A Cao, W., Xia, C., Peddinti, S. T., Lie, D., Taft, N., & Austin, L. M. (2021). A large scale study of user behavior, expectations and engagement with Android permissions. In 30th USENIX Security Symposium (USENIX Security 21) (pp. 803-820). Deliverables: In class participation assignment Weekly quiz due Monday at 2:30pm for Section 101 Weekly quiz due Wednesday at 5:30pm for Section 102 35
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Move to your Breakout Room Mondays we start at 4:45pm 1. Breakout Room 1: Room 140: Ramsay Wright Laboratories, 25 Harbord Street 2. Breakout Room 2: Room 507: Claude T. Bissell Building, 140 St George St 3. Breakout Room 3: Room 538: Claude T. Bissell Building, 140 St George St Wednesdays we start at 7:45pm 1. Breakout Room 1: Room 126: Woodsworth College, 117/119 St. George Street 2. Breakout Room 2: Room 116: Claude T. Bissell Building, 140 St George St 3. Breakout Room 3: Room 728: Claude T. Bissell Building, 140 St George St 36
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help

Browse Popular Homework Q&A

Q: After eating a doughnut, your pancreas produces [ Select] [Select] [Select] " After intense…
Q: The solubility of Glucose (CH42O.) at 25.00°C is 90.90 g in 100.0 g of H2O. Which of the following…
Q: I already solve a-d which is A-115 B- -95 C-20 D-0 Just need help solving the rest
Q: The temperature inside a Carnot refrigerator is8.34°C. What is the high temperature, Th, in Celsius…
Q: While the life of a truck driver is not for everyone, there are thousands of drivers who find the…
Q: Match each function name with its equation. I I ≈ f(x) = ✰ f(x) = ✨ ƒ(x) = x² ≈ ✨ 1 X ✨ f(x) = ³√x…
Q: describe in detail regarding the labor history of indian immigrant group.
Q: Find all complementary functions of the equation x³y"" + xy'-y=0, x>0 1, x, x³ 1, xlnx, x2lnx x,…
Q: 0°, 3.6 cm Left 150°, 2.9 cm Right 30°, 4.6 cm What distance and heading returns you back to the…
Q: A semicircle of radius R has charge lining its outer edge, with a charge +q uniformly distributed on…
Q: buffer is made up of 0.3 L each of a 0.5 M KH2PO4 and 0.317 M K2HPO4. assuming that volumes are…
Q: use the function lnx. find the area under y=1/x and above the x axis from x=1 to x=4
Q: GLYCOLYSIS: 1A) Starting with glucose (in the open-chain Fisher projection), draw out the molecular…
Q: A) What is the alternative hypothesis? a. The population mean is equal to 7.2 points. b. The…
Q: three months of operations are as follows: Sales Budget Cash Sales Sales on Account April May June…
Q: How does Critical race theory influence urban problems (educational discrimination and racial…
Q: Solve the equation x" + 4x = 8(t), x(0)=0, x'(0) = 0 a. x(t)=sin(2t) b. x(t)=[1-e-²¹-2te-²¹] + µ(t −…
Q: Table 3 X 0-9 10-19 20-29 30-39 40-49 f 3 4 1 1 1 c% 30% 70% 80% 90% 100%
Q: Thy decides bring her team cupcakes to eat together to celebrate a recent team success. In doing so,…
Q: H2S (g) can be generated by the following reaction: 2 HCl(aq) + FeS(s) → FeCl2(aq) + H2S(g) What…
Q: Unpolarized light with an intensity Io passes through a linear polarizer. It then passes through a…
Q: An arc of charge is in the first quadrant. It has a charge of 0.05nC uniformly distributed along its…