Week 5: Background. A few observations on learning new programming languages. What's wrong with this (actual) protest from 1966?

Size: px
Start display at page:

Download "Week 5: Background. A few observations on learning new programming languages. What's wrong with this (actual) protest from 1966?"

Transcription

1 Week 5: Background A few observations on learning new programming languages What's wrong with this (actual) protest from 1966? Programmer: "Switching to PL/I as our organization's standard programming language will be a threat to my ability to earn a living." Instructor: "Really? Why is that?" Programmer: "Because I'm a Fortran programmer!" The obvious answer Of course there is no such thing as a [Fortran, Cobol, C, Java, VB, etc.] programmer. Personnel (H.R.) departments don't maintain job titles or job descriptions for such a thing. It would be like a professional Chevrolet taxi driver. A professional programmer [or developer] learns and uses new tools as necessary to suit his or her needs and the availability of new facilities. The second language phenomenon Some programmers complain about the second programming language they must learn: It may require setting aside work habits that they're accustomed to. It may be less [powerful, easy-to-use, convenient] than the language they're used to. But by the time they need a third or fourth programming language, they understand that dealing with features they don't initially like is routine and unavoidable part of their job. They may actually come to like a new tool after they get used to it.. COMP 370, Spring

2 The C-family phenomenon Some of today's most popular programming languages are closely related to one another: C++, Java, and C# were all derived from C. They're similar enough that once we're fluent in one, we can easily start using another without taking a beginner's course. But then we may be even more surprised, even irritated, by a new language that doesn't belong to that family. Clojure and Prolog are examples. Keep an open mind until you're used to them. What's in a name? (Background) Kemeny & Kurtz (Dartmouth College) designed a programming language (Beginners' All-purpose Symbolic Instruction Code) that students could learn in a couple of hours. They didn't bother to copyright the name. But Microsoft (1991) did, many years later: Microsoft's product, having little resemblance to Kemeny & Kurtz's, was widely used in applications. Competing products failed to gain market share, possibly because they couldn't be called "Basic" Week 5: Important features of Clojure We've seen various Clojure features in examples. Now let's examine some details more rigorously: Data structures Program structures Primitive operations Functions COMP Spring Mr.. Weisert Note You already have access to this information Presentation slides from earlier sessions Link to Clojure introduction in session #1 However, some students have asked for further explanation Sometimes it's easier to understand a presentation than a densely-written document. Be sure to ask if anything is unclear. COMP 370, Spring

3 Kinds of data (Lisp and Clojure) symbol string character list That's all there is! Primitive types integer {<sign>} <digits> also alternative bases--see manual real {<sign>} <digits>. {<digits>} {E <integer>} ratio (exact fraction) {<sign>} <integer> / <integer> true false nil Curly brackets mean optional. Pointed brackets mean entity defined somewhere. Vertical slash ( ) means either. Everything else is literal. More primitive types Character \<char> \<special char name> String "<chars>" Terminology note: a primitive data item is called an atom in Lisp or Clojure documentation. Aggregate types List (<elements>) <elements> <element> <element> <elements> Note: comma separators optional Vector (or parameter list for a function) [<elements>] Set #{<elements>} Note: Clojure designers thought they were clarifying a troublesome Lisp readability issue by using three different kinds of bracket. COMP 370, Spring

4 Two kinds of List Normally Clojure, like Lisp, interprets the first element of a list as a function name It invokes that function on the remaining elements: Examples: (average ) (* unitprice quantity) That behavior can be suppressed by a single quote '(notafunction just pure data) The usual way of defining a function is with defn (defn average [s] (/ (apply + s) (count s)) ) Rules for symbols As the term suggests, they're just names for things (functions, data items, etc.) Rules for defining your own symbols: Never start with a digit Avoid \ /. Remember that we've already shown two conventions for the question mark (?) As in all programming languages, avoid duplicating standard library names. Kinds of data (Lisp and Clojure) symbol string character list That's the whole language! Because Clojure is homoiconic, that's also every element of a program. Functions in Clojure Executing a program consists of evaluating the top-level function (like main in procedural programs). Of course, that function usually invokes other functions. The usual (easy) way of defining a function is with defn: (defn fctnname [parameterlist](fctnbody)) fctnbody contains occurrences of members of parameterlist. the value of (evaluating) fctnbody is returned as the result of invoking fctnname.with actual arguments substituted for the parameters. COMP 370, Spring

5 Is that all? Almost. Additional facilities are defined in terms of those primitive ones (like macros and functions in procedural languages). Look at (and understand) examples Read the concise guide Pay particular attention to the "Absolutely fundamental functions", e.g. cond Experiment! Ask questions esp. about anything that looks important but you don't understand. An easy exercise Without looking at the solution showed in class, recode your Java solution to assignment #1 (or an improved solution) in Clojure. It won't be graded, but you can turn it in on paper if you want the instructor's comments. (Actually, I will raise your recorded assignment #1 grade if this exercise is of significantly higher quality.) You don't need to run it; just try to code legal Clojure. (But if you haven't run anything yet in Clojure, you should do so) Next week Session will begin with a summary (about an hour) of the highlights of the course so far. Ask about anything that isn't clear to you. We might look at more examples. We'll then take a short break. The examination will cover the important concepts and techniques we've studied. It will be closed book, emphasizing concepts over coding details. Duration will be about an hour. Bring blank paper and sufficient pens or pencils Write legibly, please! After next week Graded examinations will be returned March 13. Academic warnings will be posted, if necessary Please don't telephone inquiring about grades. We'll be learning another interesting programming language (Prolog) while still working on Clojure examples (assignment 4). COMP 370, Spring

Week 2: The Clojure Language. Background Basic structure A few of the most useful facilities. A modernized Lisp. An insider's opinion

Week 2: The Clojure Language. Background Basic structure A few of the most useful facilities. A modernized Lisp. An insider's opinion Week 2: The Clojure Language Background Basic structure A few of the most useful facilities A modernized Lisp Review of Lisp's origins and development Why did Lisp need to be modernized? Relationship to

More information

MITOCW watch?v=kz7jjltq9r4

MITOCW watch?v=kz7jjltq9r4 MITOCW watch?v=kz7jjltq9r4 PROFESSOR: We're going to look at the most fundamental of all mathematical data types, namely sets, and let's begin with the definitions. So informally, a set is a collection

More information

Do these criteria apply to work in this course?

Do these criteria apply to work in this course? Bonus topic fo COMP 170 Program Quality Part 2: Review of Program readability Commentary Choosing data names Code layout Commentary Pitfalls Reading a program A program is not only something to be run

More information

Early programming languages ca. 1960

Early programming languages ca. 1960 Session 5: Intro. to Java collections History Collection / container concept Shortcoming of original version Parameterized collections Example: ArrayList Comp 271, Spring, 2012 Mr. Weisert Early programming

More information

CSC 326H1F, Fall Programming Languages. What languages do you know? Instructor: Ali Juma. A survey of counted loops: FORTRAN

CSC 326H1F, Fall Programming Languages. What languages do you know? Instructor: Ali Juma. A survey of counted loops: FORTRAN What languages do you know? CSC 326H1F, Programming Languages The usual suspects: C, C++, Java fine languages nearly the same Perhaps you've also learned some others? assembler Basic, Visual Basic, Turing,

More information

Instructor: Craig Duckett. Lecture 04: Thursday, April 5, Relationships

Instructor: Craig Duckett. Lecture 04: Thursday, April 5, Relationships Instructor: Craig Duckett Lecture 04: Thursday, April 5, 2018 Relationships 1 Assignment 1 is due NEXT LECTURE 5, Tuesday, April 10 th in StudentTracker by MIDNIGHT MID-TERM EXAM is LECTURE 10, Tuesday,

More information

Linked Lists. What is a Linked List?

Linked Lists. What is a Linked List? Linked Lists Along with arrays, linked lists form the basis for pretty much every other data stucture out there. This makes learning and understand linked lists very important. They are also usually the

More information

Session 4b: Review of Program Quality

Session 4b: Review of Program Quality Session 4b: Review of Program Quality What makes one program "better" than another? COMP 170 -- Fall, 2013 Mr. Weisert What is a good program? Suppose we give the same assignment to two programmers (or

More information

Compilers. Prerequisites

Compilers. Prerequisites Compilers Prerequisites Data structures & algorithms Linked lists, dictionaries, trees, hash tables Formal languages & automata Regular expressions, finite automata, context-free grammars Machine organization

More information

6.001 Notes: Section 15.1

6.001 Notes: Section 15.1 6.001 Notes: Section 15.1 Slide 15.1.1 Our goal over the next few lectures is to build an interpreter, which in a very basic sense is the ultimate in programming, since doing so will allow us to define

More information

CS125 : Introduction to Computer Science. Lecture Notes #4 Type Checking, Input/Output, and Programming Style

CS125 : Introduction to Computer Science. Lecture Notes #4 Type Checking, Input/Output, and Programming Style CS125 : Introduction to Computer Science Lecture Notes #4 Type Checking, Input/Output, and Programming Style c 2005, 2004, 2002, 2001, 2000 Jason Zych 1 Lecture 4 : Type Checking, Input/Output, and Programming

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

Session 3b: Defining data items

Session 3b: Defining data items Session 3b: Defining data items Sources of data items Establishing a project data dictionary Defining an elementary item Defining a composite data item COMP 320 / 420, Spring, 2018 Mr. Weisert Q: Which

More information

Programming via Java Defining classes

Programming via Java Defining classes Programming via Java Defining classes Our programs so far have used classes, like Turtle and GOval, which were written by other people. In writing larger programs, we often find that another class would

More information

Total Responses 13. Please list and explain every single design decision you made in presenting this work.

Total Responses 13. Please list and explain every single design decision you made in presenting this work. Initial Report Total Responses 13 Please write an explanation for the layout of the page -- or email -- that you are turning in today: Why did you choose the typeface(s) you did? Why did you choose the

More information

6.001 Notes: Section 8.1

6.001 Notes: Section 8.1 6.001 Notes: Section 8.1 Slide 8.1.1 In this lecture we are going to introduce a new data type, specifically to deal with symbols. This may sound a bit odd, but if you step back, you may realize that everything

More information

Week 7 Prolog overview

Week 7 Prolog overview Week 7 Prolog overview A language designed for A.I. Logic programming paradigm Programmer specifies relationships among possible data values. User poses queries. What data value(s) will make this predicate

More information

What's that? Why? Is one "better" than the other? Terminology. Comparison. Loop testing. Some experts (e.g. Pezze & Young) call it structural testing

What's that? Why? Is one better than the other? Terminology. Comparison. Loop testing. Some experts (e.g. Pezze & Young) call it structural testing Week 9: More details of white-box testing What is it? Comparison with black-box testing What we should not validate Automated versus interactive testing Testing conditional and loop constructs COMP 370

More information

CS Final Exam Review Suggestions - Spring 2014

CS Final Exam Review Suggestions - Spring 2014 CS 111 - Final Exam Review Suggestions p. 1 CS 111 - Final Exam Review Suggestions - Spring 2014 last modified: 2014-05-09 before lab You are responsible for material covered in class sessions, lab exercises,

More information

MITOCW watch?v=9h6muyzjms0

MITOCW watch?v=9h6muyzjms0 MITOCW watch?v=9h6muyzjms0 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

Create your first workbook

Create your first workbook Create your first workbook You've been asked to enter data in Excel, but you've never worked with Excel. Where do you begin? Or perhaps you have worked in Excel a time or two, but you still wonder how

More information

CSc 372 Comparative Programming Languages

CSc 372 Comparative Programming Languages CSc 372 Comparative Programming Languages The University of Arizona Fall Semester, 2006 CSc 372, Fall 2006 Introduction Slide 1 CSc 372, Fall 2006 Introduction Slide 2 Introduction Instructor Teaching

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

TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA

TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA 1 TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach by M. Guzdial and B. Ericson, and instructor materials prepared

More information

Week - 01 Lecture - 04 Downloading and installing Python

Week - 01 Lecture - 04 Downloading and installing Python Programming, Data Structures and Algorithms in Python Prof. Madhavan Mukund Department of Computer Science and Engineering Indian Institute of Technology, Madras Week - 01 Lecture - 04 Downloading and

More information

Slide 1 CS 170 Java Programming 1 More on Strings Duration: 00:00:47 Advance mode: Auto

Slide 1 CS 170 Java Programming 1 More on Strings Duration: 00:00:47 Advance mode: Auto CS 170 Java Programming 1 More on Strings Working with the String class Slide 1 CS 170 Java Programming 1 More on Strings Duration: 00:00:47 What are Strings in Java? Immutable sequences of 0 n characters

More information

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 10: OCT. 6TH INSTRUCTOR: JIAYIN WANG

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 10: OCT. 6TH INSTRUCTOR: JIAYIN WANG CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 10: OCT. 6TH INSTRUCTOR: JIAYIN WANG 1 Notice Assignments Reading Assignment: Chapter 3: Introduction to Parameters and Objects The Class 10 Exercise

More information

4. Structure of a C++ program

4. Structure of a C++ program 4.1 Basic Structure 4. Structure of a C++ program The best way to learn a programming language is by writing programs. Typically, the first program beginners write is a program called "Hello World", which

More information

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology.

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. Guide to and Hi everybody! In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. This guide focuses on two of those symbols: and. These symbols represent concepts

More information

Week 11: Case study: Designing, building, & testing a Person class Background for the Project Needed in many applications Is it possible? practical?

Week 11: Case study: Designing, building, & testing a Person class Background for the Project Needed in many applications Is it possible? practical? Week 11: Case study: Designing, building, & testing a Person class Background for the Project Needed in many applications Is it possible? practical? Background Many applications deal with records representing

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

Please write your name and username here legibly: C212/A592 6W2 Summer 2017 Early Evaluation Exam: Fundamental Programming Structures in Java

Please write your name and username here legibly: C212/A592 6W2 Summer 2017 Early Evaluation Exam: Fundamental Programming Structures in Java Please write your name and username here legibly: C212/A592 6W2 Summer 2017 Early Evaluation Exam: Fundamental Programming Structures in Java Use BigDecimal (a class defined in package java.math) to write

More information

It Might Be Valid, But It's Still Wrong Paul Maskens and Andy Kramek

It Might Be Valid, But It's Still Wrong Paul Maskens and Andy Kramek Seite 1 von 5 Issue Date: FoxTalk July 2000 It Might Be Valid, But It's Still Wrong Paul Maskens and Andy Kramek This month, Paul Maskens and Andy Kramek discuss the problems of validating data entry.

More information

Skill 1: Multiplying Polynomials

Skill 1: Multiplying Polynomials CS103 Spring 2018 Mathematical Prerequisites Although CS103 is primarily a math class, this course does not require any higher math as a prerequisite. The most advanced level of mathematics you'll need

More information

Scheme: Expressions & Procedures

Scheme: Expressions & Procedures Scheme: Expressions & Procedures CS F331 Programming Languages CSCE A331 Programming Language Concepts Lecture Slides Friday, March 31, 2017 Glenn G. Chappell Department of Computer Science University

More information

Dr. Relja Vulanovic Professor of Mathematics Kent State University at Stark c 2008

Dr. Relja Vulanovic Professor of Mathematics Kent State University at Stark c 2008 MATH-LITERACY MANUAL Dr. Relja Vulanovic Professor of Mathematics Kent State University at Stark c 2008 1 Real Numbers 1.1 Sets 1 1.2 Constants and Variables; Real Numbers 7 1.3 Operations with Numbers

More information

Lisp. Versions of LISP

Lisp. Versions of LISP Lisp Versions of LISP Lisp is an old language with many variants Lisp is alive and well today Most modern versions are based on Common Lisp LispWorks is based on Common Lisp Scheme is one of the major

More information

What's New. Version 9.2 release. Campground Master Contents 1. Contents. A couple quick reminders:

What's New. Version 9.2 release. Campground Master Contents 1. Contents. A couple quick reminders: Campground Master Contents 1 Contents A couple quick reminders: Make Backups! It's so sad when we hear from someone whose computer has crashed and they have no backup of their data to restore from. It's

More information

Ways of documenting Session 5: detailed requirements The Data Dictionary one any The Project A data dictionary Data Dictionary may be maintained

Ways of documenting Session 5: detailed requirements The Data Dictionary one any The Project A data dictionary Data Dictionary may be maintained Session 5: The Data Dictionary relationship to systems analysis methodologies relationship to project management data definition vs. data representation taxonomy of data types COMP 477 /377, Fall, 2018

More information

CONTENTS: What Is Programming? How a Computer Works Programming Languages Java Basics. COMP-202 Unit 1: Introduction

CONTENTS: What Is Programming? How a Computer Works Programming Languages Java Basics. COMP-202 Unit 1: Introduction CONTENTS: What Is Programming? How a Computer Works Programming Languages Java Basics COMP-202 Unit 1: Introduction Announcements Did you miss the first lecture? Come talk to me after class. If you want

More information

Official Competition Manual March 2, 2005

Official Competition Manual March 2, 2005 Official Competition Manual March 2, 2005 Competition Instructions Logging In to the Competition Arena Log in to the competition arena using the handle and password that you chose during the competition

More information

Week 12: Priority queues Heaps and heap operations

Week 12: Priority queues Heaps and heap operations Week 12: Priority queues Heaps and heap operations Comp 271 Spring, 2012 Mr. Weisert The queues we studied in week 6 were FIFO Many real-world situations consider other criteria for choosing which object

More information

CS457/557 Functional Languages

CS457/557 Functional Languages CS457/557 Functional Languages Spring 2018 Lecture 1: Course Introduction Andrew Tolmach Portland State University (with thanks to Mark P. Jones) 1 Goals of this course Introduce the beautiful ideas of

More information

Ruby on Rails Welcome. Using the exercise files

Ruby on Rails Welcome. Using the exercise files Ruby on Rails Welcome Welcome to Ruby on Rails Essential Training. In this course, we're going to learn the popular open source web development framework. We will walk through each part of the framework,

More information

Scheme: Data. CS F331 Programming Languages CSCE A331 Programming Language Concepts Lecture Slides Monday, April 3, Glenn G.

Scheme: Data. CS F331 Programming Languages CSCE A331 Programming Language Concepts Lecture Slides Monday, April 3, Glenn G. Scheme: Data CS F331 Programming Languages CSCE A331 Programming Language Concepts Lecture Slides Monday, April 3, 2017 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks ggchappell@alaska.edu

More information

Math Modeling in Java: An S-I Compartment Model

Math Modeling in Java: An S-I Compartment Model 1 Math Modeling in Java: An S-I Compartment Model Basic Concepts What is a compartment model? A compartment model is one in which a population is modeled by treating its members as if they are separated

More information

Ways of documenting Session 5: detailed requirements The Data Dictionary one any The Project A data dictionary Data Dictionary may be maintained

Ways of documenting Session 5: detailed requirements The Data Dictionary one any The Project A data dictionary Data Dictionary may be maintained Session 5: The Data Dictionary relationship to systems analysis methodologies relationship to project management data definition vs. data representation taxonomy of data types COMP 477 /377, Spring, 2017

More information

Learning Scala: Practical Functional Programming For The JVM By Jason Swartz

Learning Scala: Practical Functional Programming For The JVM By Jason Swartz Learning Scala: Practical Functional Programming For The JVM By Jason Swartz 20 Best Scala Books To Go From Beginner To Expert - WhatPixel - It offers OOP and functional programming and has tons of free

More information

CS 3360 Design and Implementation of Programming Languages. Exam 1

CS 3360 Design and Implementation of Programming Languages. Exam 1 1 Spring 2017 (Thursday, March 9) Name: CS 3360 Design and Implementation of Programming Languages Exam 1 This test has 8 questions and pages numbered 1 through 7. Reminders This test is closed-notes and

More information

PROFESSOR: Last time, we took a look at an explicit control evaluator for Lisp, and that bridged the gap between

PROFESSOR: Last time, we took a look at an explicit control evaluator for Lisp, and that bridged the gap between MITOCW Lecture 10A [MUSIC PLAYING] PROFESSOR: Last time, we took a look at an explicit control evaluator for Lisp, and that bridged the gap between all these high-level languages like Lisp and the query

More information

Reasoning About Programs Panagiotis Manolios

Reasoning About Programs Panagiotis Manolios Reasoning About Programs Panagiotis Manolios Northeastern University February 26, 2017 Version: 100 Copyright c 2017 by Panagiotis Manolios All rights reserved. We hereby grant permission for this publication

More information

Learning to Program with Haiku

Learning to Program with Haiku Learning to Program with Haiku Lesson 4 Written by DarkWyrm All material 2010 DarkWyrm It would be incredibly hard to write anything useful if there weren't ways for our programs to make decisions or to

More information

Does anyone actually do this?

Does anyone actually do this? Session 11: Polymorphism Coding type-dependent logic Virtual functions Pure virtual functions and abstract classes Coding type-dependent logic Suppose we need to do something different depending on what

More information

Computer Science Lab Exercise 1

Computer Science Lab Exercise 1 1 of 10 Computer Science 127 - Lab Exercise 1 Introduction to Excel User-Defined Functions (pdf) During this lab you will experiment with creating Excel user-defined functions (UDFs). Background We use

More information

Lecture 05 I/O statements Printf, Scanf Simple statements, Compound statements

Lecture 05 I/O statements Printf, Scanf Simple statements, Compound statements Programming, Data Structures and Algorithms Prof. Shankar Balachandran Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 05 I/O statements Printf, Scanf Simple

More information

Week - 04 Lecture - 01 Merge Sort. (Refer Slide Time: 00:02)

Week - 04 Lecture - 01 Merge Sort. (Refer Slide Time: 00:02) Programming, Data Structures and Algorithms in Python Prof. Madhavan Mukund Department of Computer Science and Engineering Indian Institute of Technology, Madras Week - 04 Lecture - 01 Merge Sort (Refer

More information

Lesson 4: Who Goes There?

Lesson 4: Who Goes There? Lesson 4: Who Goes There? In this lesson we will write a program that asks for your name and a password, and prints a secret message if you give the right password. While doing this we will learn: 1. What

More information

Slide 1 CS 170 Java Programming 1 Expressions Duration: 00:00:41 Advance mode: Auto

Slide 1 CS 170 Java Programming 1 Expressions Duration: 00:00:41 Advance mode: Auto CS 170 Java Programming 1 Expressions Slide 1 CS 170 Java Programming 1 Expressions Duration: 00:00:41 What is an expression? Expression Vocabulary Any combination of operators and operands which, when

More information

Part II Composition of Functions

Part II Composition of Functions Part II Composition of Functions The big idea in this part of the book is deceptively simple. It s that we can take the value returned by one function and use it as an argument to another function. By

More information

Topic 1: Introduction

Topic 1: Introduction Recommended Exercises and Readings Topic 1: Introduction From Haskell: The craft of functional programming (3 rd Ed.) Readings: Chapter 1 Chapter 2 1 2 What is a Programming Paradigm? Programming Paradigm:

More information

Fortunately, you only need to know 10% of what's in the main page to get 90% of the benefit. This page will show you that 10%.

Fortunately, you only need to know 10% of what's in the main page to get 90% of the benefit. This page will show you that 10%. NAME DESCRIPTION perlreftut - Mark's very short tutorial about references One of the most important new features in Perl 5 was the capability to manage complicated data structures like multidimensional

More information

mk-convert Contents 1 Converting to minikanren, quasimatically. 08 July 2014

mk-convert Contents 1 Converting to minikanren, quasimatically. 08 July 2014 mk-convert 08 July 2014 Contents 1 Converting to minikanren, quasimatically. 1 1.1 Variations on a Scheme..................... 2 1.2 Racket to minikanren, nally.................. 8 1.3 Back to the beginning......................

More information

MITOCW watch?v=rvrkt-jxvko

MITOCW watch?v=rvrkt-jxvko MITOCW watch?v=rvrkt-jxvko 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

Basic Fiction Formatting for Smashwords in OpenOffice L. Leona Davis. Copyright 2012 L. Leona Davis All Rights Reserved

Basic Fiction Formatting for Smashwords in OpenOffice L. Leona Davis. Copyright 2012 L. Leona Davis All Rights Reserved Basic Fiction Formatting for Smashwords in OpenOffice L. Leona Davis Copyright 2012 L. Leona Davis All Rights Reserved Cover Photo by Dmitry Maslov Cover Design by L. Leona Davis Smashwords Edition June

More information

CS 11 Ocaml track: lecture 4. Today: modules

CS 11 Ocaml track: lecture 4. Today: modules CS 11 Ocaml track: lecture 4 Today: modules The idea of modules What's the idea behind a "module"? Package up code so other people/programs can use it Control what parts of code are part of the interface

More information

Welcome to CS 115 (Winter 2019)

Welcome to CS 115 (Winter 2019) Welcome to CS 115 (Winter 2019) Web page (the main information source): http://www.student.cs.uwaterloo.ca/ cs115/ Course Personnel: Contact information and office hours for all staff: instructors, ISAs

More information

On Academic Dishonesty. Declarative Computation Model. Single assignment store. Single assignment store (2) Single assignment store (3)

On Academic Dishonesty. Declarative Computation Model. Single assignment store. Single assignment store (2) Single assignment store (3) Declarative Computation Model Single assignment store (VRH 2.2) Kernel language syntax (VRH 2.3) Carlos Varela RPI October 6, 2009 Adapted with permission from: Seif Haridi KTH Peter Van Roy UCL On Academic

More information

Introduction to the course and basic programming concepts

Introduction to the course and basic programming concepts Introduction to the course and basic programming concepts Lecture 1 of TDA 540 Object-Oriented Programming Jesper Cockx Fall 2018 Chalmers University of Technology Gothenburg University About the course

More information

CIS 110 Introduction to Computer Programming Summer 2016 Midterm. Recitation # (e.g., 201):

CIS 110 Introduction to Computer Programming Summer 2016 Midterm. Recitation # (e.g., 201): CIS 110 Introduction to Computer Programming Summer 2016 Midterm Name: Recitation # (e.g., 201): Pennkey (e.g., paulmcb): My signature below certifies that I have complied with the University of Pennsylvania

More information

CS 3360 Design and Implementation of Programming Languages. Exam 1

CS 3360 Design and Implementation of Programming Languages. Exam 1 1 Spring 2016 (Monday, March 21) Name: CS 3360 Design and Implementation of Programming Languages Exam 1 This test has 18 questions and pages numbered 1 through 6. Reminders This test is closed-notes and

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

COMP-202 Unit 2: Java Basics. CONTENTS: Using Expressions and Variables Types Strings Methods

COMP-202 Unit 2: Java Basics. CONTENTS: Using Expressions and Variables Types Strings Methods COMP-202 Unit 2: Java Basics CONTENTS: Using Expressions and Variables Types Strings Methods Assignment 1 Assignment 1 posted on WebCt and course website. It is due May 18th st at 23:30 Worth 6% Part programming,

More information

My Favorite bash Tips and Tricks

My Favorite bash Tips and Tricks 1 of 6 6/18/2006 7:44 PM My Favorite bash Tips and Tricks Prentice Bisbal Abstract Save a lot of typing with these handy bash features you won't find in an old-fashioned UNIX shell. bash, or the Bourne

More information

Computer Security module

Computer Security module Computer Security module Revision notes Mark D. Ryan June 2010 There won't be a revision lecture for the Computer Security module. Instead, these notes are provided to help you prepare for the exam. Revision

More information

1.3.4 case and case* macro since 1.2. Listing Conditional Branching, Fast Switch. Listing Contract

1.3.4 case and case* macro since 1.2. Listing Conditional Branching, Fast Switch. Listing Contract 1.3.4 case and case* macro since 1.2 Listing 3. 14. Conditional Branching, Fast Switch (case [expression & clauses]) case is a conditional statement which accepts a list of testing conditions to determine

More information

Full file at

Full file at Java Programming: From Problem Analysis to Program Design, 3 rd Edition 2-1 Chapter 2 Basic Elements of Java At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class

More information

Spring 2018 Discussion 7: March 21, Introduction. 2 Primitives

Spring 2018 Discussion 7: March 21, Introduction. 2 Primitives CS 61A Scheme Spring 2018 Discussion 7: March 21, 2018 1 Introduction In the next part of the course, we will be working with the Scheme programming language. In addition to learning how to write Scheme

More information

ADP Reporting Skills Business Requirements ADP Pro User Conference

ADP Reporting Skills Business Requirements ADP Pro User Conference ADP Reporting Skills Business Requirements 2015 ADP Pro User Conference Disclaimer The screen shots used in this presentation come from the current version of ADP Custom Reporting. What you see when you

More information

Advanced topics, part 2

Advanced topics, part 2 CS 1 Introduction to Computer Programming Lecture 24: December 5, 2012 Advanced topics, part 2 Last time Advanced topics, lecture 1 recursion first-class functions lambda expressions higher-order functions

More information

Who am I? I m a python developer who has been working on OpenStack since I currently work for Aptira, who do OpenStack, SDN, and orchestration

Who am I? I m a python developer who has been working on OpenStack since I currently work for Aptira, who do OpenStack, SDN, and orchestration Who am I? I m a python developer who has been working on OpenStack since 2011. I currently work for Aptira, who do OpenStack, SDN, and orchestration consulting. I m here today to help you learn from my

More information

Intro. Classes & Inheritance

Intro. Classes & Inheritance Intro Functions are useful, but they're not always intuitive. Today we're going to learn about a different way of programming, where instead of functions we will deal primarily with objects. This school

More information

A PROGRAM IS A SEQUENCE of instructions that a computer can execute to

A PROGRAM IS A SEQUENCE of instructions that a computer can execute to A PROGRAM IS A SEQUENCE of instructions that a computer can execute to perform some task. A simple enough idea, but for the computer to make any use of the instructions, they must be written in a form

More information

4.2 Variations on a Scheme -- Lazy Evaluation

4.2 Variations on a Scheme -- Lazy Evaluation [Go to first, previous, next page; contents; index] 4.2 Variations on a Scheme -- Lazy Evaluation Now that we have an evaluator expressed as a Lisp program, we can experiment with alternative choices in

More information

Java Programming Constructs Java Programming 2 Lesson 1

Java Programming Constructs Java Programming 2 Lesson 1 Java Programming Constructs Java Programming 2 Lesson 1 Course Objectives Welcome to OST's Java 2 course! In this course, you'll learn more in-depth concepts and syntax of the Java Programming language.

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

CIS 110 Introduction to Computer Programming Summer 2018 Midterm. Recitation ROOM :

CIS 110 Introduction to Computer Programming Summer 2018 Midterm. Recitation ROOM : CIS 110 Introduction to Computer Programming Summer 2018 Midterm Name: Recitation ROOM : Pennkey (e.g., paulmcb): My signature below certifies that I have complied with the University of Pennsylvania s

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

Shell Scripting. Todd Kelley CST8207 Todd Kelley 1

Shell Scripting. Todd Kelley CST8207 Todd Kelley 1 Shell Scripting Todd Kelley kelleyt@algonquincollege.com CST8207 Todd Kelley 1 If we have a set of commands that we want to run on a regular basis, we could write a script A script acts as a Linux command,

More information

CS390 Principles of Concurrency and Parallelism. Lecture Notes for Lecture #5 2/2/2012. Author: Jared Hall

CS390 Principles of Concurrency and Parallelism. Lecture Notes for Lecture #5 2/2/2012. Author: Jared Hall CS390 Principles of Concurrency and Parallelism Lecture Notes for Lecture #5 2/2/2012 Author: Jared Hall This lecture was the introduction the the programming language: Erlang. It is important to understand

More information

Session 2. Getting started with a well-structured system specification

Session 2. Getting started with a well-structured system specification Session 2 Getting started with a well-structured system specification COMP 320/420 Spring, 2018 Conrad Weisert The situation A representative approaches us. (or vice versa) He or she may be a. an executive

More information

Instructor: Craig Duckett. Lecture 03: Tuesday, April 3, 2018 SQL Sorting, Aggregates and Joining Tables

Instructor: Craig Duckett. Lecture 03: Tuesday, April 3, 2018 SQL Sorting, Aggregates and Joining Tables Instructor: Craig Duckett Lecture 03: Tuesday, April 3, 2018 SQL Sorting, Aggregates and Joining Tables 1 Assignment 1 is due LECTURE 5, Tuesday, April 10 th, 2018 in StudentTracker by MIDNIGHT MID-TERM

More information

You can examine the contents of a single memory location by typing a single address followed by a Return.

You can examine the contents of a single memory location by typing a single address followed by a Return. 1 von 5 31.07.2012 14:49 The Woz Monitor When a computer is powered up it must know what it must do. It goes without saying that a piece of software must be executed. Since the computer has just been powered

More information

AS Computer Science. Induction task 1: Definitions Induction task 2: System & Application software Induction task 3: Past paper questions

AS Computer Science. Induction task 1: Definitions Induction task 2: System & Application software Induction task 3: Past paper questions AS Computer Science Induction task 1: Definitions Induction task 2: System & Application software Induction task 3: Past paper questions We are pleased you have chosen to study Computer Science AS level.

More information

CSI Lab 02. Tuesday, January 21st

CSI Lab 02. Tuesday, January 21st CSI Lab 02 Tuesday, January 21st Objectives: Explore some basic functionality of python Introduction Last week we talked about the fact that a computer is, among other things, a tool to perform high speed

More information

Fifth Generation CS 4100 LISP. What do we need? Example LISP Program 11/13/13. Chapter 9: List Processing: LISP. Central Idea: Function Application

Fifth Generation CS 4100 LISP. What do we need? Example LISP Program 11/13/13. Chapter 9: List Processing: LISP. Central Idea: Function Application Fifth Generation CS 4100 LISP From Principles of Programming Languages: Design, Evaluation, and Implementation (Third Edition, by Bruce J. MacLennan, Chapters 9, 10, 11, and based on slides by Istvan Jonyer

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

Read & Download (PDF Kindle) Java Illuminated: An Active Learning Approach

Read & Download (PDF Kindle) Java Illuminated: An Active Learning Approach Read & Download (PDF Kindle) Java Illuminated: An Active Learning Approach Each new print copy includes Navigate 2 Advantage Access that unlocks a comprehensive and interactive ebook, student practice

More information

CSc 372, Fall 2001 Final Examination December 14, 2001 READ THIS FIRST

CSc 372, Fall 2001 Final Examination December 14, 2001 READ THIS FIRST Name: Seat row and number: Fill in your name and seat row/number above. Do not turn this page until you are told to begin. CSc 372, Fall 2001 Final Examination December 14, 2001 READ THIS FIRST DO NOT

More information

Session 2b: structured specifications Purpose and criteria Structured specification components Introduction to dataflow diagrams

Session 2b: structured specifications Purpose and criteria Structured specification components Introduction to dataflow diagrams Session 2b: structured specifications Purpose and criteria Structured specification components Introduction to dataflow diagrams COMP 320 / 420, Spring, 2018 Conrad Weisert Criteria for the ESD (from session

More information

So on the survey, someone mentioned they wanted to work on heaps, and someone else mentioned they wanted to work on balanced binary search trees.

So on the survey, someone mentioned they wanted to work on heaps, and someone else mentioned they wanted to work on balanced binary search trees. So on the survey, someone mentioned they wanted to work on heaps, and someone else mentioned they wanted to work on balanced binary search trees. According to the 161 schedule, heaps were last week, hashing

More information