CSC 160 Computer Programming for Non-Majors Introduction - PowerPoint PPT Presentation

About This Presentation
Title:

CSC 160 Computer Programming for Non-Majors Introduction

Description:

CSC 160 Computer Programming for Non-Majors Introduction Prof. Adam M. Wittenstein adamwittenstein_at_adelphi.edu http://www.adelphi.edu/~wittensa/csc160/ – PowerPoint PPT presentation

Number of Views:158
Avg rating:3.0/5.0
Slides: 36
Provided by: adel163
Learn more at: https://home.adelphi.edu
Category:

less

Transcript and Presenter's Notes

Title: CSC 160 Computer Programming for Non-Majors Introduction


1
CSC 160Computer Programmingfor
Non-MajorsIntroduction
  • Prof. Adam M. Wittenstein
  • adamwittenstein_at_adelphi.edu
  • http//www.adelphi.edu/wittensa/csc160/

2
What's this course about?
  • Fundamentals of computer programming
  • Going from a word problem to a working program
  • Designing programs to be modified and reused
  • How computer scientists think

3
What's this course not about?
  • A particular programming language
  • (e.g. C, Java, Scheme, perl, ...)
  • A particular programming environment
  • (e.g. VisualStudio, DrScheme, ...)
  • Designing and writing Web pages

4
However, we have to use...
  • A programming language
  • (we'll use Scheme)
  • A programming environment
  • (we'll use DrScheme)
  • The Web
  • (for textbook, assignments, announcements, ...)

5
Who should take this course?
  • Non-CS majors for Math/CS distribution credit
  • Math majors for programming credit
  • Undecided majors to test the waters of
    programming
  • CS majors as a warm-up to CSC 171

6
Who should not take this course?
  • CS majors for major credit
  • End-users and Web page authors
  • Students looking for a cake course

7
This course as a Liberal Arts Requirement
  • This course trains you to think logically by
    focusing on Design Recipes beginning from a
    problem statement and ending with a
    well-organized solution, a skill that is useful
    throughout college and life, regardless of your
    choice of profession.
  • Many professions require some form of computer
    programming. Some examples include accounting,
    photography, music, and of course, computer
    science.

8
Getting Started A Course Overview
  • Computers do many of the same things people do.
  • The differences are that computers are
  • faster and more accurate
  • they do not get bored
  • To program a computer
  • Figure out how you would solve a problem.
  • Present that explanation to the computer.

9
Course Overview (continued)
  • Unfortunately, computers are literal-minded and
  • have no intuition. So your explanation has to be
  • more precise than if you were explaining
  • something to a human being.
  • Therefore, this course is about
  • Figuring out precisely how you would solve a
    problem.
  • Presenting that explanation to the computer.

10
Imagine this assignment...
  • 20-page paper
  • Due at end of semester
  • On Napoleon's invasion of Russia

11
What kinds of knowledge are needed?
  • 1. How to write a 20-page paper
  • 2. How to finish a long-term project on time
  • 3. Napoleon Russia

12
Imagine this assignment...
  • 20-page paper
  • Due at end of semester
  • On Napoleon's invasion of Russia
  • In Swedish
  • With a quill pen

13
What kinds of knowledge are needed?
  • 1. How to write a 20-page paper
  • 2. How to finish a long-term project on time
  • 3. Napoleon Russia
  • 4. Swedish language (spelling, vocabulary,
    grammar, idioms)
  • 5. How to use a quill pen

14
In a programming course...
  • 1. How to structure a program
  • (understand the problem and design a solution)
  • 2. How to plan your time
  • (going through the steps of the Design
    Recipes)
  • 3. Content-area knowledge
  • (graphics, economics, physics, etc.)
  • 4. Scheme (or C or Java or whatever) language
  • 5. How to use the software hardware

15
Our Focus
  • Although we need to do all five of these things,
  • our goal is learning how to do the first two.
  • However, all problems require
  • Knowledge (in some content area)
  • Language (like English)
  • Thinking Tools (like your brain)

16
Content-area Knowledge
  • This is not a course on math or science or
    English, but we will solve problems from these
    disciplines.
  • No need to worry, I will either give you the
    required information, or you will be allowed to
    look it up.

17
Writing and Thinking
  • Outside this class, we write in a language called
    English. Inside this class, we will write in a
    language called Scheme.
  • Outside this class, we use our brain to think
    about what is being said in English. Inside this
    class, we use Dr. Scheme to think about what is
    being said in Scheme.

18
Scheme is to English
  • Scheme - The programming language that we will
    use.
  • Dr. Scheme - the program that we will use to run
    programs written in Scheme.

As Dr. Scheme is to the brain
19
Choosing a Language to Speak
  • We can speak in any language. Why do we choose
    English?

20
Choosing a Language to Speak
  • We can speak in any language. Why do we choose
    English?
  • Because we already know enough of it to
    understand the basics of how it works.

21
Choosing a Language to Program In
  • We can program in any programming language. Why
    do we choose Scheme?

22
Choosing a Language to Program In
  • We can program in any programming language. Why
    do we choose Scheme?
  • Because we can quickly learn enough of it to
    understand the basics of how it works.

23
Design Recipe (in Life)
  • To solve any problem, in any area (not just
  • programming), requires three steps
  • Figure out what you need to do.
  • Do it.
  • Check that you did it right.

24
Design Recipe (in Programming)
  • To make this recipe useful, we need to adapt it
  • more specifically to computer programming
  • Figure out precisely what you need to do.
  • Tell the computer how to do it.
  • Check that the computer does it right.

25
CSC 160Computer Programmingfor
Non-MajorsChapter 1 Students, Teachers,
Computers
  • Prof. Adam M. Wittenstein
  • adamwittenstein_at_adelphi.edu
  • http//www.adelphi.edu/wittensa/csc160/

26
A few preliminary definitions
  • Program - A set of instructions that tell the
    computer how to perform a task
  • Programming - Writing a program
  • Programming language - a language of instruction
    for a computer program
  • Data - Information that is used by a program
  • Operations - The individual instructions
    performed by the computer
  • Primitive operations - The basic operations
    performed on data of a specific data type.
  • e.g., , -, , / are primitive operations
    performed on integers.

27
Some typical problems in English
  • The temperature is 350C convert this temperature
    into Fahrenheit.
  • Are there 7 days in a week?
  • How do we cover someones face in a picture?

28
What the computer would think?
  • The computer would have no idea what we are
    asking it.

29
What the computer would think?
  • The computer would have no idea what we are
    asking it.
  • We must communicate with the computer in a
    language that it understands.

30
What the computer would think?
  • The computer would have no idea what we are
    asking it.
  • We must communicate with the computer in a
    language that it understands.
  • We will communicate in the Scheme language.

31
Types of Data
  • There are many types of data. They are split
    into two general categories
  • 1) atomic (simple) data numbers, booleans,
    symbols, images, etc.
  • 2) compound data structures and lists composed
    of other pieces of data. For example, a series
    (list) of numbers.
  • The next four chapters deal only with atomic data.

32
Course web pagehttp//www.adelphi.edu/wittensa/
csc160
  • I recommend you visit the web page frequently as
    I
  • will post important information including
  • the lecture slides (so you can find out what you
    missed, if you are absent)
  • reading and programming assignments
  • assignment corrections (and perhaps, extensions)
  • class cancellations (in the event of weather, or
    some other emergency)

33
Reading assignments for next time...
  • Read the Syllabus.
  • Read the Joys (and Woes) of the Craft of
    Programming.
  • Read the preface of the textbook (pages xvii to
    xxiv).
  • Read Chapter 1 of the textbook (pages 1 to 5).

34
Homework 1 (due MONDAY)
  • Write a short essay (at least 1-2 pages) on your
    reaction to these reading assignments, and e-mail
    them to ADAMWITTENSTEIN_at_adelphi.edu.
  • Be sure to include your first and last name!
  • The essay will be graded primarily on whether I'm
    convinced you've read the material and thought
    about it carefully, although really bad spelling,
    grammar, or style may cost you points too.

35
Next chapterA First Data Type Numbers
  • The computer can do math for you we will write
    short math problems as computer programs.
  • For the non-math majors, dont worry, this is not
    a math course. We will review any math before
    we use it. Also, most of the math we use will be
    from elementary school adding, multiplying, and
    so on.
Write a Comment
User Comments (0)
About PowerShow.com