Software. Is

Size: px
Start display at page:

Download "Software. Is"

Transcription

1 Software Is

2

3

4 Any program is a model of a model within a theory of a model of an abstraction of some portion of the world or of some universe of discourse. Meir M Lehman "Programs, Life Cycles, and Laws of Software Evolution"

5 The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise. Edsger W Dijkstra

6

7 Details count. Peter Weinberger

8 Geeks are people who love something so much that all the details matter. Marissa Mayer

9 We're talking about a very specific mindset that is crucial when it comes to the act of creating. Will Gompertz Think Like an Artist

10 It is an attitude that can be encapsulated in a simple but demanding rule: always think both big picture and fine detail. Will Gompertz Think Like an Artist

11 software

12 software architecture

13 code

14 implementation

15 implementation details

16 design details

17 design decisions

18

19 Architecture represents the significant design decisions that shape a system, where significant is measured by cost of change. Grady Booch

20 We propose [...] that one begins with a list of difficult design decisions or design decisions which are likely to change. Each module is then designed to hide such a decision from the others. David L Parnas On the Criteria to Be Used in Decomposing Systems into Modules

21 Programming is a design activity. Jack W Reeves What Is Software Design?

22 Coding actually makes sense more often than believed. Often the process of rendering the design in code will reveal oversights and the need for additional design effort. The earlier this occurs, the better the design will be. Jack W Reeves What Is Software Design?

23

24 If a plot works out exactly as you first planned, you're not working loosely enough to give room to your imagination and instincts.

25 / WordFriday

26 pantser, noun Writer who writes by the seat of their pants. In contrast to a plotter, a pantser doesn't work to (or have) an outline.

27

28

29 16-bit

30 32-bit

31 64-bit

32 <windows.h>

33 LLP64

34 LP64

35 Ophelia: 'Tis in my memory locked, and you yourself shall keep the key of it. William Shakespeare The Tragedy of Hamlet [Act I, Scene 3]

36 Hamlet: Yea, from the table of my memory I'll wipe away all trivial fond records. William Shakespeare The Tragedy of Hamlet [Act I, Scene 5]

37

38 Unshared mutable data needs no synchronisation Unshared Mutable Shared mutable data needs synchronisation Shared Unshared immutable data needs no synchronisation Immutable Shared immutable data needs no synchronisation

39 Mutable The Synchronisation Quadrant Unshared mutable data needs no synchronisation Unshared Shared mutable data needs synchronisation Shared Unshared immutable data needs no synchronisation Immutable Shared immutable data needs no synchronisation

40

41 All computers wait at the same speed

42 Savings in time feel like simplicity

43 ... premature optimization is the root of all evil (or at least most of it) in programming. Donald Knuth

44 ... premature optimization is the root of all evil (or at least most of it) in programming. Donald Knuth

45 ... premature optimization is the root of all evil (or at least most of it) in programming. Donald Knuth

46 Command-line tools can be 235x faster than your Hadoop cluster Adam Drake

47 sort

48

49 O(n log n)

50 O(n 2 )

51

52

53 O(n!)

54

55 OMG!

56

57 O(n)

58

59 Remember that there is no code faster than no code. Taligent's Guide to Designing Programs

60 Write code that is easy to delete, not easy to extend.

61

62

63 function leftpad (str, len, ch) { str = String(str); var i = -1; if (!ch && ch!== 0) ch = ' '; len = len - str.length; while (++i < len) { str = ch + str; } } return str;

64 zfill

65 rjust

66 var cache = [ '', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' ]; function leftpad (str, len, ch) { // convert `str` to `string` str = str + ''; // `len` is the `pad`'s length now len = len - str.length; // doesn't need to pad if (len <= 0) return str; // `ch` defaults to `' '` if (!ch && ch!== 0) ch = ' '; // convert `ch` to `string` ch = ch + ''; // cache common use cases if (ch === ' ' && len < 10) return cache[len] + str; // `pad` starts with an empty string var pad = ''; // loop while (true) { // add `ch` to `pad` if `len` is odd if (len & 1) pad += ch; // divide `len` by 2, ditch the remainder len >>= 1; // "double" the `ch` so this operation count grows logarithmically on `len` // each time `ch` is "doubled", the `len` would need to be "doubled" too // similar to finding a value in binary search tree, hence O(log(n)) if (len) ch += ch; // `len` is 0, exit the loop else break; } // pad `str`! return pad + str; }

67 I have yet to see any problem, however complicated, which, when you looked at it in the right way, did not become still more complicated. Anderson's Law

68 function leftpad(content, length, pad) { content = String(content) pad = String(pad pad === 0? pad : ' ')[0] var left = Math.max(length - content.length, 0) return pad.repeat(left) + content }

69 test({ "Padding an empty string to a length of 0 results in an empty string": () => assert(leftpad("", 0, "X") === ""), "Padding a non-empty string to a shorter length results in the same string": () => assert(leftpad("foobar", 3, "X") === "foobar"), "Padding a non-empty string to a negative length results in the same string": () => assert(leftpad("foobar", -3, "X") === "foobar"), "Padding a non-empty string to its length results in the same string": () => assert(leftpad("foobar", 6, "X") === "foobar"), "Padding to a longer length with a single character fills to the left": () => assert(leftpad("foobar", 8, "X") === "XXfoobar"), "Padding to a longer length with surplus characters fills using only first": () => assert(leftpad("foobar", 10, "XY") === "XXXXfoobar"), "Padding to a longer length with an empty string fills with space": () => assert(leftpad("foobar", 8, "") === " foobar"), "Padding to a longer length with no specified fill fills with space": () => assert(leftpad("foobar", 9) === " foobar"), "Padding to a longer length with integer 0 fills with 0": () => assert(leftpad("foobar", 7, 0) === "0foobar"), "Padding to a longer length with single-digit integer fills with digit": () => assert(leftpad("foobar", 10, 1) === "1111foobar"), "Padding to a longer length with multiple-digit integer fills with first digit": () => assert(leftpad("foobar", 10, 42) === "4444foobar"), "Padding to a longer length with negative integer fills with -": () => assert(leftpad("foobar", 8, -42) === "--foobar"), "Padding a non-string uses string representation": () => assert(leftpad(4.2, 5, 0) === "004.2") })

70 function assert(condition) { if(!condition) throw { name: "AssertionError", message: "assertion failed" } } function testpasses(totry) { try { totry() return true } catch (failure) { return false } } function report(testname, passed) { document.write(testname.fontcolor(passed? "green" : "red") + "<br>") } function test(testcases) { for (var testname in testcases) if (testcases.hasownproperty(testname)) report(testname, testpasses(testcases[testname])) }

71 Padding an empty string to a length of 0 results in an empty string Padding a non-empty string to a shorter length results in the same string Padding a non-empty string to a negative length results in the same string Padding a non-empty string to its length results in the same string Padding to a longer length with a single character fills to the left Padding to a longer length with surplus characters fills using only first Padding to a longer length with an empty string fills with space Padding to a longer length with no specified fill fills with space Padding to a longer length with integer 0 fills with 0 Padding to a longer length with single-digit integer fills with digit Padding to a longer length with multiple-digit integer fills with first digit Padding to a longer length with negative integer fills with - Padding a non-string uses string representation

72 Padding an empty string to a length of 0 results in an empty string Padding a non-empty string to a shorter length results in the same string Padding a non-empty string to a negative length results in the same string Padding a non-empty string to its length results in the same string Padding to a longer length with a single character fills to the left Padding to a longer length with surplus characters fills using only first Padding to a longer length with an empty string fills with space Padding to a longer length with no specified fill fills with space Padding to a longer length with integer 0 fills with 0 Padding to a longer length with single-digit integer fills with digit Padding to a longer length with multiple-digit integer fills with first digit Padding to a longer length with negative integer fills with - Padding a non-string uses string representation

73 Simple Testing Can Prevent Most Critical Failures An Analysis of Production Failures in Distributed Data-Intensive Systems

74

75 Schiaparelli s Inertial Measurement Unit (IMU) went about its business of calculating the lander s rotation rate. For some reason, the IMU calculated a saturationmaximum period that persisted for one second longer than what would normally be expected at this stage. When the IMU sent this bogus information to the craft s navigation system, it calculated a negative altitude.

76 That fateful miscalculation set off a cascade of despair, triggering the premature release of the parachute and the backshell, a brief firing of the braking thrusters, and activation of the on-ground systems as if Schiaparelli had already reached the surface. This all happened while the vehicle was still two miles (3.7 km) above ground.

77 A majority of the production failures (77%) can be reproduced by a unit test.

78

79 Your Customers Do Not Mean What They Say Nate Jackson

80 I ve never met a customer yet that wasn t all too happy to tell me what they wanted usually in great detail. The problem is that customers don t always tell you the whole truth. Nate Jackson

81 They generally don't lie. They use their terms and their contexts. They leave out significant details. They make assumptions. Nate Jackson

82 This is compounded by the fact that many customers don t actually know what they want in the first place! Nate Jackson

83

84

85

86

87 Software Is Details

Software. Is

Software. Is Software Is Details @KevlinHenney Any program is a model of a model within a theory of a model of an abstraction of some portion of the world or of some universe of discourse. Meir M Lehman "Programs,

More information

Turning Development Outside

Turning Development Outside Turning Development Outside In @KevlinHenney What We Talk About When We Talk About Development @KevlinHenney What We Talk About When We Talk About Requirements @KevlinHenney Too often we push the problem

More information

Procedural Programming. It's Back? It Never Went

Procedural Programming. It's Back? It Never Went Procedural Programming It's Back? It Never Went Away @KevlinHenney procedural? µονόλιθος µservices µservices This is the Unix philosophy: Write programs that do one thing and do it well. Write programs

More information

Old Is the New

Old Is the New Old Is the New New @KevlinHenney Toutes choses sont dites déjà; mais comme personne n'écoute, il faut toujours recommencer. André Gide Everything has been said before; but since nobody listens, we must

More information

Lowering the Level of

Lowering the Level of Lowering the Level of Conversation @KevlinHenney https://twitter.com/kevlinhenney/status/761081424493449217 A goto completely invalidates the high-level structure of the code. Taligent's Guide to Designing

More information

CS1 Lecture 22 Mar. 6, 2019

CS1 Lecture 22 Mar. 6, 2019 CS1 Lecture 22 Mar. 6, 2019 HW 5 due Friday Questions? In discussion exams next week Last time Ch 12. Zip, lambda, etc Default/keyword function parameters Ch 19 conditional expresssions, list comprehensions

More information

Excerpt from "Art of Problem Solving Volume 1: the Basics" 2014 AoPS Inc.

Excerpt from Art of Problem Solving Volume 1: the Basics 2014 AoPS Inc. Chapter 5 Using the Integers In spite of their being a rather restricted class of numbers, the integers have a lot of interesting properties and uses. Math which involves the properties of integers is

More information

If Statements, For Loops, Functions

If Statements, For Loops, Functions Fundamentals of Programming If Statements, For Loops, Functions Table of Contents Hello World Types of Variables Integers and Floats String Boolean Relational Operators Lists Conditionals If and Else Statements

More information

Creating an Animated Navigation Bar in InDesign*

Creating an Animated Navigation Bar in InDesign* Creating an Animated Navigation Bar in InDesign* *for SWF or FLA export only Here s a digital dilemma: You want to provide navigation controls for readers, but you don t want to take up screen real estate

More information

Lecture Transcript While and Do While Statements in C++

Lecture Transcript While and Do While Statements in C++ Lecture Transcript While and Do While Statements in C++ Hello and welcome back. In this lecture we are going to look at the while and do...while iteration statements in C++. Here is a quick recap of some

More information

Errors. And How to Handle Them

Errors. And How to Handle Them Errors And How to Handle Them 1 GIGO There is a saying in computer science: Garbage in, garbage out. Is this true, or is it just an excuse for bad programming? Answer: Both. Here s what you want: Can you

More information

Introduction to Programming

Introduction to Programming CHAPTER 1 Introduction to Programming Begin at the beginning, and go on till you come to the end: then stop. This method of telling a story is as good today as it was when the King of Hearts prescribed

More information

Intro. Scheme Basics. scm> 5 5. scm>

Intro. Scheme Basics. scm> 5 5. scm> Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if

More information

Design and Information Hiding

Design and Information Hiding Design and Information Hiding 15-214: Foundations of Software Engineering Jonathan Aldrich Related Reading: D. L. Parnas. On the Criteria To Be Used in Decomposing Systems into Modules. CACM 15(12):1053-1058,

More information

The Architecture of

The Architecture of The Architecture of Uncertainty @KevlinHenney When a design decision can reasonably go one of two ways, an architect needs to take a step back. Instead of trying to decide between options A and B, the

More information

Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi.

Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi. Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture 18 Tries Today we are going to be talking about another data

More information

Animator Friendly Rigging Part 1

Animator Friendly Rigging Part 1 Animator Friendly Rigging Part 1 Creating animation rigs which solve problems, are fun to use, and don t cause nervous breakdowns. - http://jasonschleifer.com/ - 1- CONTENTS I. INTRODUCTION... 4 What is

More information

MITOCW watch?v=w_-sx4vr53m

MITOCW watch?v=w_-sx4vr53m MITOCW watch?v=w_-sx4vr53m The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high-quality educational resources for free. To

More information

MITOCW ocw f99-lec07_300k

MITOCW ocw f99-lec07_300k MITOCW ocw-18.06-f99-lec07_300k OK, here's linear algebra lecture seven. I've been talking about vector spaces and specially the null space of a matrix and the column space of a matrix. What's in those

More information

Lecture Programming in C++ PART 1. By Assistant Professor Dr. Ali Kattan

Lecture Programming in C++ PART 1. By Assistant Professor Dr. Ali Kattan Lecture 08-1 Programming in C++ PART 1 By Assistant Professor Dr. Ali Kattan 1 The Conditional Operator The conditional operator is similar to the if..else statement but has a shorter format. This is useful

More information

CSE : Python Programming. Homework 5 and Projects. Announcements. Course project: Overview. Course Project: Grading criteria

CSE : Python Programming. Homework 5 and Projects. Announcements. Course project: Overview. Course Project: Grading criteria CSE 399-004: Python Programming Lecture 5: Course project and Exceptions February 12, 2007 Announcements Still working on grading Homeworks 3 and 4 (and 2 ) Homework 5 will be out by tomorrow morning I

More information

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 14

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 14 Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 14 Scan Converting Lines, Circles and Ellipses Hello everybody, welcome again

More information

Unit Testing as Hypothesis Testing

Unit Testing as Hypothesis Testing Unit Testing as Hypothesis Testing Jonathan Clark September 19, 2012 5 minutes You should test your code. Why? To find bugs. Even for seasoned programmers, bugs are an inevitable reality. Today, we ll

More information

Repetition Through Recursion

Repetition Through Recursion Fundamentals of Computer Science I (CS151.02 2007S) Repetition Through Recursion Summary: In many algorithms, you want to do things again and again and again. For example, you might want to do something

More information

Constructing Algorithms and Pseudocoding This document was originally developed by Professor John P. Russo

Constructing Algorithms and Pseudocoding This document was originally developed by Professor John P. Russo Constructing Algorithms and Pseudocoding This document was originally developed by Professor John P. Russo Purpose: # Describe the method for constructing algorithms. # Describe an informal language for

More information

DESIGN AS RISK MINIMIZATION

DESIGN AS RISK MINIMIZATION THOMAS LATOZA SWE 621 FALL 2018 DESIGN AS RISK MINIMIZATION IN CLASS EXERCISE As you come in and take a seat What were the most important risks you faced in a recent software project? WHAT IS A RISK? WHAT

More information

Creating joints for the NovodeX MAX exporter

Creating joints for the NovodeX MAX exporter Creating joints for the NovodeX MAX exporter (a step-by-step tutorial by Pierre Terdiman) p.terdiman@wanadoo.fr Version 0.3 I) Creating a hinge Here we'll see how to create a hinge joint compatible with

More information

CS61A Notes Week 6: Scheme1, Data Directed Programming You Are Scheme and don t let anyone tell you otherwise

CS61A Notes Week 6: Scheme1, Data Directed Programming You Are Scheme and don t let anyone tell you otherwise CS61A Notes Week 6: Scheme1, Data Directed Programming You Are Scheme and don t let anyone tell you otherwise If you re not already crazy about Scheme (and I m sure you are), then here s something to get

More information

STA Rev. F Learning Objectives. Learning Objectives (Cont.) Module 3 Descriptive Measures

STA Rev. F Learning Objectives. Learning Objectives (Cont.) Module 3 Descriptive Measures STA 2023 Module 3 Descriptive Measures Learning Objectives Upon completing this module, you should be able to: 1. Explain the purpose of a measure of center. 2. Obtain and interpret the mean, median, and

More information

Software Analysis. Asymptotic Performance Analysis

Software Analysis. Asymptotic Performance Analysis Software Analysis Performance Analysis Presenter: Jonathan Aldrich Performance Analysis Software Analysis 1 Asymptotic Performance Analysis How do we compare algorithm performance? Abstract away low-level

More information

MITOCW ocw f99-lec12_300k

MITOCW ocw f99-lec12_300k MITOCW ocw-18.06-f99-lec12_300k This is lecture twelve. OK. We've reached twelve lectures. And this one is more than the others about applications of linear algebra. And I'll confess. When I'm giving you

More information

(Refer Slide Time 3:31)

(Refer Slide Time 3:31) Digital Circuits and Systems Prof. S. Srinivasan Department of Electrical Engineering Indian Institute of Technology Madras Lecture - 5 Logic Simplification In the last lecture we talked about logic functions

More information

PREFACE This is a Dummies Guide. It is NOT the Help File found in Control Manager. Not all subjects will be discussed in as great detail as you would find in the Help File. However, The Dummies Guide will

More information

CS2304: Python for Java Programmers. CS2304: Sequences and Collections

CS2304: Python for Java Programmers. CS2304: Sequences and Collections CS2304: Sequences and Collections Sequences In Python A sequence type in python supports: The in membership operator. The len() function. Slicing like we saw with strings, s[1:3]. And is iterable (for

More information

Roc Model and Density Dependence, Part 1

Roc Model and Density Dependence, Part 1 POPULATION MODELS Roc Model and Density Dependence, Part 1 Terri Donovan recorded: February, 2012 You ve now completed several modeling exercises dealing with the Roc population. So far, the caliph of

More information

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5 Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5 [talking head] Formal Methods of Software Engineering means the use of mathematics as an aid to writing programs. Before we can

More information

Divisibility Rules and Their Explanations

Divisibility Rules and Their Explanations Divisibility Rules and Their Explanations Increase Your Number Sense These divisibility rules apply to determining the divisibility of a positive integer (1, 2, 3, ) by another positive integer or 0 (although

More information

Installing and Using Trackside Cameras Revised November 2008

Installing and Using Trackside Cameras Revised November 2008 Installing and Using Trackside Cameras Revised November 2008 Trackside cameras are a useful and creative way to add visual interest to your route. Rather than just look out the windshield of the locomotive

More information

y= sin( x) y= cos( x)

y= sin( x) y= cos( x) . The graphs of sin(x) and cos(x). Now I am going to define the two basic trig functions: sin(x) and cos(x). Study the diagram at the right. The circle has radius. The arm OP starts at the positive horizontal

More information

Topic 22 Hash Tables

Topic 22 Hash Tables Topic 22 Hash Tables "hash collision n. [from the techspeak] (var. `hash clash') When used of people, signifies a confusion in associative memory or imagination, especially a persistent one (see thinko).

More information

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 [talking head] This lecture we study theory design and implementation. Programmers have two roles to play here. In one role, they

More information

3 Nonlocal Exit. Quiz Program Revisited

3 Nonlocal Exit. Quiz Program Revisited 3 Nonlocal Exit This chapter is about the commands catch and throw. These commands work together as a kind of super-stop command, which you can use to stop several levels of procedure invocation at once.

More information

The Big Python Guide

The Big Python Guide The Big Python Guide Big Python Guide - Page 1 Contents Input, Output and Variables........ 3 Selection (if...then)......... 4 Iteration (for loops)......... 5 Iteration (while loops)........ 6 String

More information

2016 All Rights Reserved

2016 All Rights Reserved 2016 All Rights Reserved Table of Contents Chapter 1: The Truth About Safelists What is a Safelist Safelist myths busted Chapter 2: Getting Started What to look for before you join a Safelist Best Safelists

More information

Note: This is a miniassignment and the grading is automated. If you do not submit it correctly, you will receive at most half credit.

Note: This is a miniassignment and the grading is automated. If you do not submit it correctly, you will receive at most half credit. Com S 227 Fall 2017 Miniassignment 1 50 points Due Date: Monday, October 16, 11:59 pm (midnight) Late deadline (25% penalty): Tuesday, October 17, 11:59 pm General information This assignment is to be

More information

CS Introduction to Data Structures How to Parse Arithmetic Expressions

CS Introduction to Data Structures How to Parse Arithmetic Expressions CS3901 - Introduction to Data Structures How to Parse Arithmetic Expressions Lt Col Joel Young One of the common task required in implementing programming languages, calculators, simulation systems, and

More information

Introduction to 3D Concepts

Introduction to 3D Concepts PART I Introduction to 3D Concepts Chapter 1 Scene... 3 Chapter 2 Rendering: OpenGL (OGL) and Adobe Ray Tracer (ART)...19 1 CHAPTER 1 Scene s0010 1.1. The 3D Scene p0010 A typical 3D scene has several

More information

Most of the class will focus on if/else statements and the logical statements ("conditionals") that are used to build them. Then I'll go over a few

Most of the class will focus on if/else statements and the logical statements (conditionals) that are used to build them. Then I'll go over a few With notes! 1 Most of the class will focus on if/else statements and the logical statements ("conditionals") that are used to build them. Then I'll go over a few useful functions (some built into standard

More information

MV-8800 Production Studio

MV-8800 Production Studio ÂØÒňΠWorkshop MV-8800 Production Studio Getting Around the MV-8800 s Hard Drive 2007 Roland Corporation U.S. All rights reserved. No part of this publication may be reproduced in any form without the

More information

(Refer Slide Time: 01.26)

(Refer Slide Time: 01.26) Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture # 22 Why Sorting? Today we are going to be looking at sorting.

More information

Porsche 91 1GT D m o d e ling tutorial - by Nim

Porsche 91 1GT D m o d e ling tutorial - by Nim orsche 911GT 3D modeling tutorial - by Nimish In this tutorial you will learn to model a car using Spline modeling method. This method is not very much famous as it requires considerable amount of skill

More information

Introduction to Asymptotic Running Time Analysis CMPSC 122

Introduction to Asymptotic Running Time Analysis CMPSC 122 Introduction to Asymptotic Running Time Analysis CMPSC 122 I. Comparing Two Searching Algorithms Let's begin by considering two searching algorithms you know, both of which will have input parameters of

More information

Software Testing Lecture 1. Justin Pearson

Software Testing Lecture 1. Justin Pearson Software Testing Lecture 1 Justin Pearson 2017 1 / 50 Four Questions Does my software work? 2 / 50 Four Questions Does my software work? Does my software meet its specification? 3 / 50 Four Questions Does

More information

(Refer Slide Time: 00:02:02)

(Refer Slide Time: 00:02:02) Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 20 Clipping: Lines and Polygons Hello and welcome everybody to the lecture

More information

9 R1 Get another piece of paper. We re going to have fun keeping track of (inaudible). Um How much time do you have? Are you getting tired?

9 R1 Get another piece of paper. We re going to have fun keeping track of (inaudible). Um How much time do you have? Are you getting tired? Page: 1 of 14 1 R1 And this is tell me what this is? 2 Stephanie x times y plus x times y or hm? 3 R1 What are you thinking? 4 Stephanie I don t know. 5 R1 Tell me what you re thinking. 6 Stephanie Well.

More information

Recursively Enumerable Languages, Turing Machines, and Decidability

Recursively Enumerable Languages, Turing Machines, and Decidability Recursively Enumerable Languages, Turing Machines, and Decidability 1 Problem Reduction: Basic Concepts and Analogies The concept of problem reduction is simple at a high level. You simply take an algorithm

More information

About the Final. Saturday, 7-10pm in Science Center 101. Closed book, closed notes. Not on the final: graphics, file I/O, vim, unix

About the Final. Saturday, 7-10pm in Science Center 101. Closed book, closed notes. Not on the final: graphics, file I/O, vim, unix CS 21 Final Review About the Final Saturday, 7-10pm in Science Center 101 Closed book, closed notes Not on the final: graphics, file I/O, vim, unix Expect Questions That Ask You To: Evaluate Python expressions

More information

Learn Ninja-Like Spreadsheet Skills with LESSON 9. Math, Step by Step

Learn Ninja-Like Spreadsheet Skills with LESSON 9. Math, Step by Step EXCELL MASTERY Learn Ninja-Like Spreadsheet Skills with LESSON 9 Doing Math, Step by Step It s Elementary, My Dear Ninja There is a scene in the short story The Crooked Man, where Sherlock Holmes accurately

More information

(Refer Slide Time: 00:03:51)

(Refer Slide Time: 00:03:51) Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 17 Scan Converting Lines, Circles and Ellipses Hello and welcome everybody

More information

How to Create a Killer Resources Page (That's Crazy Profitable)

How to Create a Killer Resources Page (That's Crazy Profitable) How to Create a Killer Resources Page (That's Crazy Profitable) There is a single page on your website that, if used properly, can be amazingly profitable. And the best part is that a little effort goes

More information

A Sophomoric Introduction to Shared-Memory Parallelism and Concurrency Lecture 2 Analysis of Fork-Join Parallel Programs

A Sophomoric Introduction to Shared-Memory Parallelism and Concurrency Lecture 2 Analysis of Fork-Join Parallel Programs A Sophomoric Introduction to Shared-Memory Parallelism and Concurrency Lecture 2 Analysis of Fork-Join Parallel Programs Steve Wolfman, based on work by Dan Grossman (with small tweaks by Alan Hu) Learning

More information

Designing Robust Classes

Designing Robust Classes Designing Robust Classes Learning Goals You must be able to:! specify a robust data abstraction! implement a robust class! design robust software! use Java exceptions Specifications and Implementations

More information

A short introduction to. designing user-friendly interfaces

A short introduction to. designing user-friendly interfaces A short introduction to designing user-friendly interfaces Usability is often ignored until it becomes a problem Introduction This booklet is about Usability and User Experience design. It is aimed at

More information

Chapter 13. Recursion. Copyright 2016 Pearson, Inc. All rights reserved.

Chapter 13. Recursion. Copyright 2016 Pearson, Inc. All rights reserved. Chapter 13 Recursion Copyright 2016 Pearson, Inc. All rights reserved. Learning Objectives Recursive void Functions Tracing recursive calls Infinite recursion, overflows Recursive Functions that Return

More information

Module 10: Imperative Programming, Modularization, and The Future

Module 10: Imperative Programming, Modularization, and The Future Module 10: Imperative Programming, Modularization, and The Future If you have not already, make sure you Read How to Design Programs Sections 18. 1 CS 115 Module 10: Imperative Programming, Modularization,

More information

EVENT-DRIVEN PROGRAMMING

EVENT-DRIVEN PROGRAMMING LESSON 13 EVENT-DRIVEN PROGRAMMING This lesson shows how to package JavaScript code into self-defined functions. The code in a function is not executed until the function is called upon by name. This is

More information

Testing. UW CSE 160 Winter 2016

Testing. UW CSE 160 Winter 2016 Testing UW CSE 160 Winter 2016 1 Testing Programming to analyze data is powerful It s useless (or worse!) if the results are not correct Correctness is far more important than speed 2 Famous examples Ariane

More information

feel free to poke around and change things. It's hard to break anything in a Moodle course, and even if you do it's usually easy to fix it.

feel free to poke around and change things. It's hard to break anything in a Moodle course, and even if you do it's usually easy to fix it. Teacher s Manual Teacher Manual This page is a very quick guide to creating online courses with Moodle. It outlines the main functions that are available, as well as some of the main decisions you'll need

More information

(Refer Slide Time: 1:27)

(Refer Slide Time: 1:27) Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture 1 Introduction to Data Structures and Algorithms Welcome to data

More information

Python Evaluation Rules

Python Evaluation Rules Python Evaluation Rules UW CSE 160 https://courses.cs.washington.edu/courses/cse160/15sp/ Michael Ernst and Isaac Reynolds mernst@cs.washington.edu April 1, 2015 Contents 1 Introduction 2 1.1 The Structure

More information

Project #1 rev 2 Computer Science 2334 Fall 2013 This project is individual work. Each student must complete this assignment independently.

Project #1 rev 2 Computer Science 2334 Fall 2013 This project is individual work. Each student must complete this assignment independently. Project #1 rev 2 Computer Science 2334 Fall 2013 This project is individual work. Each student must complete this assignment independently. User Request: Create a simple magazine data system. Milestones:

More information

Strategy Pattern. What is it?

Strategy Pattern. What is it? Strategy Pattern 1 What is it? The Strategy pattern is much like the State pattern in outline, but a little different in intent. The Strategy pattern consists of a number of related algorithms encapsulated

More information

Text Input and Conditionals

Text Input and Conditionals Text Input and Conditionals Text Input Many programs allow the user to enter information, like a username and password. Python makes taking input from the user seamless with a single line of code: input()

More information

STA Module 2B Organizing Data and Comparing Distributions (Part II)

STA Module 2B Organizing Data and Comparing Distributions (Part II) STA 2023 Module 2B Organizing Data and Comparing Distributions (Part II) Learning Objectives Upon completing this module, you should be able to 1 Explain the purpose of a measure of center 2 Obtain and

More information

STA Learning Objectives. Learning Objectives (cont.) Module 2B Organizing Data and Comparing Distributions (Part II)

STA Learning Objectives. Learning Objectives (cont.) Module 2B Organizing Data and Comparing Distributions (Part II) STA 2023 Module 2B Organizing Data and Comparing Distributions (Part II) Learning Objectives Upon completing this module, you should be able to 1 Explain the purpose of a measure of center 2 Obtain and

More information

COMP 202 Java in one week

COMP 202 Java in one week COMP 202 Java in one week... Continued CONTENTS: Return to material from previous lecture At-home programming exercises Please Do Ask Questions It's perfectly normal not to understand everything Most of

More information

Testing! The material for this lecture is drawn, in part, from! The Practice of Programming (Kernighan & Pike) Chapter 6!

Testing! The material for this lecture is drawn, in part, from! The Practice of Programming (Kernighan & Pike) Chapter 6! Testing The material for this lecture is drawn, in part, from The Practice of Programming (Kernighan & Pike) Chapter 6 1 Words from the Wise On two occasions I have been asked [by members of Parliament],

More information

Polar Coordinates. 2, π and ( )

Polar Coordinates. 2, π and ( ) Polar Coordinates Up to this point we ve dealt exclusively with the Cartesian (or Rectangular, or x-y) coordinate system. However, as we will see, this is not always the easiest coordinate system to work

More information

Intro. Speed V Growth

Intro. Speed V Growth Intro Good code is two things. It's elegant, and it's fast. In other words, we got a need for speed. We want to find out what's fast, what's slow, and what we can optimize. First, we'll take a tour of

More information

n! = 1 * 2 * 3 * 4 * * (n-1) * n

n! = 1 * 2 * 3 * 4 * * (n-1) * n The Beauty and Joy of Computing 1 Lab Exercise 9: Problem self-similarity and recursion Objectives By completing this lab exercise, you should learn to Recognize simple self-similar problems which are

More information

CSE 2123 Recursion. Jeremy Morris

CSE 2123 Recursion. Jeremy Morris CSE 2123 Recursion Jeremy Morris 1 Past Few Weeks For the past few weeks we have been focusing on data structures Classes & Object-oriented programming Collections Lists, Sets, Maps, etc. Now we turn our

More information

Brief 3ds max Shaping Tutorial

Brief 3ds max Shaping Tutorial Brief 3ds max Shaping Tutorial Part1: Power Key Axe Shaft Written by Maestro 1. Creation: Go to top view, create a 6 sided cylinder, 0.1 radius this is the perfect shaft thickness to fit in the hand, so

More information

Data Structures. Lists, Tuples, Sets, Dictionaries

Data Structures. Lists, Tuples, Sets, Dictionaries Data Structures Lists, Tuples, Sets, Dictionaries Collections Programs work with simple values: integers, floats, booleans, strings Often, however, we need to work with collections of values (customers,

More information

How invariants help writing loops Author: Sander Kooijmans Document version: 1.0

How invariants help writing loops Author: Sander Kooijmans Document version: 1.0 How invariants help writing loops Author: Sander Kooijmans Document version: 1.0 Why this document? Did you ever feel frustrated because of a nasty bug in your code? Did you spend hours looking at the

More information

Anatomy of a Standard Transcript

Anatomy of a Standard Transcript Anatomy of a Standard Transcript Maddie: Hi everyone! Throughout this joint project, Eli, Christina, & I all had to use technical standards to make sure our products met the necessary requirements & specifications,

More information

Cardinality of Sets MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Cardinality of Sets Fall / 15

Cardinality of Sets MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Cardinality of Sets Fall / 15 Cardinality of Sets MAT Transition to Higher Mathematics Fall 0 MAT (Transition to Higher Math) Cardinality of Sets Fall 0 / Outline Sets with Equal Cardinality Countable and Uncountable Sets MAT (Transition

More information

1 Getting used to Python

1 Getting used to Python 1 Getting used to Python We assume you know how to program in some language, but are new to Python. We'll use Java as an informal running comparative example. Here are what we think are the most important

More information

2D and 3D Transformations AUI Course Denbigh Starkey

2D and 3D Transformations AUI Course Denbigh Starkey 2D and 3D Transformations AUI Course Denbigh Starkey. Introduction 2 2. 2D transformations using Cartesian coordinates 3 2. Translation 3 2.2 Rotation 4 2.3 Scaling 6 3. Introduction to homogeneous coordinates

More information

CATCH ERRORS BEFORE THEY HAPPEN. Lessons for a mature data governance practice

CATCH ERRORS BEFORE THEY HAPPEN. Lessons for a mature data governance practice CATCH ERRORS BEFORE THEY HAPPEN Lessons for a mature data governance practice A guide to working with cross-departmental teams to establish proactive data governance for your website or mobile app. 2 Robust

More information

Tips to Help Maximize Research on Lexis Advance

Tips to Help Maximize Research on Lexis Advance Tips to Help Maximize Research on Lexis Advance I. Website & Support Options i. LexisNexis Advance: www.lexisnexis.com/lawschool ii. Contact me (Lynn Pinnekamp) at: lynn.pinnekamp@lexisnexis.com iii. Contact

More information

lundi 7 janvier 2002 Blender: tutorial: Building a Castle Page: 1

lundi 7 janvier 2002 Blender: tutorial: Building a Castle Page: 1 lundi 7 janvier 2002 Blender: tutorial: Building a Castle Page: 1 www.blender.nl this document is online at http://www.blender.nl/showitem.php?id=4 Building a Castle 2000 07 19 Bart Veldhuizen id4 Introduction

More information

(Refer Slide Time: 00:01:30)

(Refer Slide Time: 00:01:30) Digital Circuits and Systems Prof. S. Srinivasan Department of Electrical Engineering Indian Institute of Technology, Madras Lecture - 32 Design using Programmable Logic Devices (Refer Slide Time: 00:01:30)

More information

Arrays. https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html

Arrays. https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html 1 Arrays Arrays in Java an array is a container object that holds a fixed number of values of a single type the length of an array is established when the array is created 2 https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html

More information

Solution Guide for Chapter 20

Solution Guide for Chapter 20 Solution Guide for Chapter 0 Here are the solutions for the Doing the Math exercises in Girls Get Curves! DTM from p. 351-35. In the diagram SLICE, LC and IE are altitudes of the triangle!sci. L I If SI

More information

Fun facts about recursion

Fun facts about recursion Outline examples of recursion principles of recursion review: recursive linked list methods binary search more examples of recursion problem solving using recursion 1 Fun facts about recursion every loop

More information

V6 Programming Fundamentals: Part 1 Stored Procedures and Beyond David Adams & Dan Beckett. All rights reserved.

V6 Programming Fundamentals: Part 1 Stored Procedures and Beyond David Adams & Dan Beckett. All rights reserved. Summit 97 V6 Programming Fundamentals: Part 1 Stored Procedures and Beyond by David Adams & Dan Beckett 1997 David Adams & Dan Beckett. All rights reserved. Content adapted from Programming 4th Dimension:

More information

Mount Points Mount Points is a super simple tool for connecting objects together and managing those relationships.

Mount Points Mount Points is a super simple tool for connecting objects together and managing those relationships. Mount Points Mount Points is a super simple tool for connecting objects together and managing those relationships. With Mount Points, you can simply drag two objects together and when their mount points

More information

There we are; that's got the 3D screen and mouse sorted out.

There we are; that's got the 3D screen and mouse sorted out. Introduction to 3D To all intents and purposes, the world we live in is three dimensional. Therefore, if we want to construct a realistic computer model of it, the model should be three dimensional as

More information

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming Intro to Programming Unit 7 Intro to Programming 1 What is Programming? 1. Programming Languages 2. Markup vs. Programming 1. Introduction 2. Print Statement 3. Strings 4. Types and Values 5. Math Externals

More information

(Refer Slide Time: 00:02:00)

(Refer Slide Time: 00:02:00) Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 18 Polyfill - Scan Conversion of a Polygon Today we will discuss the concepts

More information