Original slides by Noah Mendelsohn Tufts University

Slides:



Advertisements
Similar presentations
Copyright © 2008 Intel Corporation. All rights reserved. Intel, the Intel logo, Intel Education Initiative, and the Intel Teach Program are trademarks.
Advertisements

Chapter 6 Writing a Program
Introduction to Algorithms 6.046J/18.401J
Introduction to Algorithms 6.046J/18.401J
Electric Bus Management System
Chapter 11: Models of Computation
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 2 The OSI Model and the TCP/IP.
1 CMSC421: Principles of Operating Systems Nilanjan Banerjee Principles of Operating Systems Acknowledgments: Some of the slides are adapted from Prof.
1 University of Utah – School of Computing Computer Science 1021 "Thinking Like a Computer"
CS 6143 COMPUTER ARCHITECTURE II SPRING 2014 ACM Principles and Practice of Parallel Programming, PPoPP, 2006 Panel Presentations Parallel Processing is.
Operating Systems Operating Systems - Winter 2011 Dr. Melanie Rieback Design and Implementation.
Operating Systems Operating Systems - Winter 2012 Dr. Melanie Rieback Design and Implementation.
Bridging the Gap Problem-Solving Teachers’ Version.
Media-X eWalk Walkthrough Install Training- Part Two Topic: Uploading Completed Walkthroughs Office of Institutional Education Programs 1.
Computer Science at Oxford
Problem Solving and Algorithm Design
1 CS Tutorial 2 Architecture Document Tutorial.
CMPT 275 Software Engineering
© 2012 National Heart Foundation of Australia. Slide 2.
Executional Architecture
How creating a course on the e-lastic platform 1.
INTRODUCTORY MICROSOFT WORD Lesson 7 – Working With Documents
Welcome to Marketing Strategy 626 How to use our blog: 1 You might already be an experienced blogger. Please read this anyway to learn more about our blog.
BEING IN CONTROL OF YOUR OWN LEARNING Are you an independent learner? Is your Learning effective?
1 Wiki Tutorial. 2 Outline of Wiki Tutorial 1) Welcome and Introductions 2) What is a wiki, and why is it useful for our work in moving forward the program.
Student Survey
Arithmetic of random variables: adding constants to random variables, multiplying random variables by constants, and adding two random variables together.
 Departmental Administrative Specialist should verify that the vendor is not an existing vendor using XK03 in IRIS.  All NEW vendors must complete the.
Prof.ir. Klaas H.J. Robers, 14 July Graduation: a process organised by YOU.
Travel 1: Travel Authorization. Welcome to Training! Why PeopleSoft? – PeopleSoft will help UTEP to grow. What’s Your Part? – We need your skills and.
Chapter 9 Interactive Multimedia Authoring with Flash Introduction to Programming 1.
Pointers and Arrays Chapter 12
Improving Achievement
Copyright 2013 – Noah Mendelsohn Compiling C Programs Noah Mendelsohn Tufts University Web:
CINAHL Keyword Searching. This presentation will take you through the procedure of finding reliable information which can be used in your academic work.
Introduction to Recursion and Recursive Algorithms
Insertion Sort Introduction to Algorithms Insertion Sort CSE 680 Prof. Roger Crawfis.
Manipulating Bit Fields in C Noah Mendelsohn Tufts University Web: COMP 40: Machine.
1 Office of New Teacher Induction Introducing NTIMS New Teacher Induction Mentoring System A Tool for Documenting School Based Mentoring Mentors’ Guide.
Feature Engineering Studio January 21, Welcome to Feature Engineering Studio Design studio-style course teaching how to distill and engineer features.
Order of Operations And Real Number Operations
Abstraction, Modularity, Interfaces and Pointers Original slides by Noah Mendelsohn, including content from Mark Sheldon, Noah Daniels, Norman Ramsey COMP.
Copyright 2014 – Noah Mendelsohn Assemblers, Macros and The UM Macro Assembler (UMASM) Noah Mendelsohn Tufts University
1-1 Welcome to: CSC225 Introduction to Computer Organization Paul Hatalsky.
June 13, Introduction to CS II Data Structures Hongwei Xi Comp. Sci. Dept. Boston University.
Fall 2004 WWW IS112 Prof. Dwyer Intro1: Overview and Syllabus Professor Catherine Dwyer.
CS 300 – Lecture 20 Intro to Computer Architecture / Assembly Language Caches.
COMP171 Data Structures and Algorithm Huamin Qu Lecture 1 (Sept. 1, 2005)
COMP171 Data Structures and Algorithm Qiang Yang Lecture 1 ( Fall 2006)
July 16, Introduction to CS II Data Structures Hongwei Xi Comp. Sci. Dept. Boston University.
COMP 321: Introduction to Computer Systems Scott Rixner Alan L. Cox
Welcome to COMP 40! Noah Mendelsohn Tufts University Web: COMP 40: Machine Structure.
This is what BC Students told us…
COMP Introduction to Programming Yi Hong May 13, 2015.
EECE 310 Software Engineering Lecture 0: Course Orientation.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1-1 Welcome to: CSC225 Introduction to Computer Organization.
Prof. Matthew Hertz WTC 207D /
Computer Science 10: Introduction to Computer Science Dr. Natalie Linnell with credit to Cay Horstmann and Marty Stepp.
Welcome to CS 115! Introduction to Programming. Class URL Write this down!
Principles of Computer Science I Honors Section Note Set 1 CSE 1341 – H 1.
Intro to CIT 594
Building Your Own Machine The Universal Machine (UM) Introduction Noah Mendelsohn Tufts University Web:
CM220 College Composition II Friday, January 29, Unit 1: Introduction to Effective Academic and Professional Writing Unit 1 Lori Martindale, Instructor.
1 CS/ECE 354 Fall 2013 “New, and improved!”. 2 Karen Miller Phone: CS.
The Universal Machine (UM) Implementing the UM Noah Mendelsohn Tufts University Web:
September 27 – Course introductions; Adts; Stacks and Queues
Welcome to CS 1010! Algorithmic Problem Solving.
Welcome to CS 1010! Algorithmic Problem Solving.
EECE 310 Software Engineering
EE422C Software Design and Implementation II
Presentation transcript:

Original slides by Noah Mendelsohn Tufts University COMP 40: Machine Structure and Assembly Language Programming Welcome to COMP 40! Original slides by Noah Mendelsohn Tufts University

Course Introduction

Learn how computers work COMP 40 Themes Learn how computers work Turn the corner toward being truly professional programmers

How we’ll do it Ramp up your Programming Skills Building Useful Applications in your Language Big programs that teach you abstraction, pointers, locality, machine representations of data Building a Language Processor on your Emulator Intel Assembler Programming The Bomb! This diagram was shown to Mark Sheldon by Noah Daniels as a nice summary of the course trajectory. Emulating your own hardware in software

Important topics for the term Big ideas (of course): Abstraction Modularity Divide-Conquer-Glue Modeling How machines work: components and interactions What is a bit? Representation games. How languages and runtimes use the machine The skills and mindset of a great programmer Abstraction: Client, Interface, Implementation. Everything you write, program and documentation fits into an architectural picture and has plays ONE of these roles at any given level. (A module may be an implementation of one interface and an client of another abstraction, of course!) How machines work: Look, it’s the big ideas again! Hardware organization at an architectural level. CPU and Memory have Interfaces!

How we’ll do it First assignment: Programming skills Ramp up your Programming Skills Building Useful Applications in your Language First assignment: Programming skills Hanson interfaces: practice in abstraction Models of how abstract types are implemented void * practice Big programs that teach you abstraction, pointers, locality, machine representations of data Building a Language Processor on your Emulator Intel Assembler Programming The Bomb! Emulating your own hardware in software

How we’ll do it Next three assignments: How data is represented Ramp up your Programming Skills Building Useful Applications in your Language Next three assignments: How data is represented How languages and libraries use the machine Locality Big programs that teach you abstraction, pointers, locality, machine representations of data Building a Language Processor on your Emulator Intel Assembler Programming The Bomb! Emulating your own hardware in software

How we’ll do it Assembler programming on popular machine Ramp up your Programming Skills Building Useful Applications in your Language Big programs that teach you abstraction, pointers, locality, machine representations of data Building a Language Processor on your Emulator Assembler programming on popular machine Intel Assembler Programming The Bomb! Emulating your own hardware in software

How we’ll do it How machines run internally Ramp up your Programming Skills Building Useful Applications in your Language How machines run internally Big programs that teach you abstraction, pointers, locality, machine representations of data Building a Language Processor on your Emulator Intel Assembler Programming The Bomb! Emulating your own hardware in software

How we’ll do it Build your own versions of the tools you’ve been using Ramp up your Programming Skills Building Useful Applications in your Language Big programs that teach you abstraction, pointers, locality, machine representations of data Build your own versions of the tools you’ve been using Building a Language Processor on your Emulator Intel Assembler Programming The Bomb! Emulating your own hardware in software

How we’ll do it Use what you built! Ramp up your Programming Skills Building Useful Applications in your Language Big programs that teach you abstraction, pointers, locality, machine representations of data Building a Language Processor on your Emulator Use what you built! Intel Assembler Programming The Bomb! Emulating your own hardware in software

ABSTRACTION! How we’ll do it Ramp up your Programming Skills Building Useful Applications in your Language ABSTRACTION! Big programs that teach you abstraction, pointers, locality, machine representations of data Building a Language Processor on your Emulator Intel Assembler Programming The Bomb! Emulating your own hardware in software

How we’ll do it Ramp up your Programming Skills Building Useful Applications in your Language Big programs that teach you abstraction, pointers, locality, machine representations of data Building a Language Processor on your Emulator Intel Assembler Programming The Bomb! Emulating your own hardware in software

Becoming a great programmer Design thoughtfully before you code Writing down your design helps you think clearly about it and share it with others Write for people: Work read by people as well as machines Your code should be beautiful and easy to understand Prose (English) documentation is as important as your code! Testing is as important as design and coding Techniques for successful programming. You need Patience, perseverance, good rest , humility, confidence Insight into good programming & testing techniques Often: teamwork, etc., etc. THESE ARE THINGS THAT TOP PROFESSIONAL PROGRAMMERS DO!

Key things to watch for throughout the term Design thoughtfully before you code Writing down your design helps you think clearly about it and share it with others Your work is read by people as well as machines Your code should be beautiful and easy to understand Prose (English) documentation is as important as your code! Testing is as important as design and coding Successful programming requires Patience, perseverance, good rest , humility, confidence Insight into good programming & testing techniques techniques Etc., etc. HELPING YOU DEVELOP THESE SKILLS IS A KEY GOAL OF COMP 40 THESE ARE THINGS THAT TOP PROFESSIONAL PROGRAMMERS DO!

Credits This version of COMP 40 was originally developed by Prof. Norman Ramsey Many of the materials and all the assignments trace to him Updates have been made by Noah Daniels, Mark Sheldon, and Noah Mendelsohn

Logistics

Course staff Professor: Undergraduate Tas Mark A. Sheldon Email: msheldon@cs.tufts.edu Office hours: TBA, see https://www.eecs.tufts.edu/~msheldon/ Graduate Tas: Sean Butze, Paul Chang Email: comp40-staff@cs.tufts.edu (email this address with grading questions) Undergraduate Tas Too many to list: all COMP 40 experts – times on Piazza; find them in the labs! BTW: I prefer you call me Mark, but Prof. Sheldon is fine too.

What you must do right now! Make sure you have a partner for assignment 1 You are not permitted to work alone unless I give explicit permission Read course: home page, admin & policies including collaboration policy, pair programming rules, coding standards Immediately: start reading the HW1 handout and readings from course calendar especially those from Hanson’s book Sign up for Piazza: We mostly won’t email announcements – just post there Come to lab on Friday with your partner – switch labs if necessary There’s a lot of material to come up to speed on quickly. Scan and maybe keep notes of things to refer to as you go.

Homework 1 is out now See course calendar Note the due dates, which are soon: Design and implementation Be sure to understand course policy on late submissions: up to 2 tokens/assignment, 6 total for term. No credit if > 2 days late! See admin page for policies on serious illness, etc. and for most policy issues

Pair programming You must work with a partner – rare exceptions Both of you must be together when design, documentation, or coding is done! You must never split the work After the first assignment you choose your own partner – max 3 assignments with same partner Be sure to understand and follow all pair programming rules at: http://www.cs.tufts.edu/comp/40/admin#pairprogramming

Labs Required – attend with your partner You can switch from morning to afternoon if http://www.cs.tufts.edu/~molay/lab40 says there’s space Many labs are designed to give you essential help completing your big projects!

A few more thoughts This course is intense Most students report it is very worthwhile Grading can be severe on individual assignments but… …most students do very well in the end We are here to help you succeed! Relax…work hard…be patient…have fun!

Design Documents

Why write down your designs? Forces you to think clearly and make deliberate choices Changing a written design is (usually) easier than changing code Your first design will probably not be a good one! Can have debates at higher, algorithmic level without distraction of code Keep refining until the design feels right Your code is more useful if other people can understand it: design becomes an important artifact for documenting work On real programming projects, designs are debated before code is written!

COMP 40 Design Documents 2 kinds: for programs and for ADTs (We’ll discuss ADTs later) Three layers documented in separate sections Architecture: the big picture Interfaces: how pieces communicate…what they hide from each other Implementation: how the pieces are built Invariants Important concept in computing Representation/structural invariants & loop invariants We’ll discuss invariants in the next lecture COMP 40: special documentation for ADTs (to be discussed) Important information about writing Design Documents can be found from the “References” tab of the COMP 40 Website: http://www.cs.tufts.edu/comp/40/reference/

COMP 40 Design Documents For HW#1 (Intro) Three layers documented in separate sections Architecture: the big picture Interfaces: how pieces communicate…what they hide from each other! Implementation: how the pieces are built Invariants Important concept in computing Structural invariants & loop invariants We’ll discuss invariants in the next lecture COMP 40: special documentation for ADTs (to be discussed) For HW#1 (Intro) You will submit a simplified design document that just explains your data structures. See the handout for information about what’s required. Important information about writing Design Documents can be found from the “References” tab of the COMP 40 Website: http://www.cs.tufts.edu/comp/40/reference/

Getting Help

Where to get help Piazza! TAs: in labs most days and evenings We much prefer you ask questions there You must not share your own code or test cases with other students: mark those questions “instructor only” Don’t post anonymously: we’re a mutually supportive community…but it’s your choice TAs: in labs most days and evenings Schedule will be kept on Piazza page Office hours: see my home page Online sources man pages, Google, Stack Overflow

“If you give a man a fish he is hungry again in an hour “If you give a man a fish he is hungry again in an hour. If you teach him to catch a fish you do him a good turn” Anne Isabella Thackeray Ritchie

In COMP 40, we will sometimes decline to give you fish, but we will always help you learn to fish. Noah M.

But…just this once since we’re hitting you with a lot at once… …I’ll give you a few fish!