1 Computer Programming. Users vs. Designers Which are you?Which are you? Which do you want to be?Which do you want to be? Do you ever wonder – how does.

Slides:



Advertisements
Similar presentations
CS 1 with Robots The Algorithm Institute for Personal Robots in Education (IPRE)
Advertisements

Chapter 1 - VB 2008 by Schneider1 Chapter 1 - An Introduction to Computers and Problem Solving 1.1 An Introduction to Computers 1.2 Windows, Folders, and.
Chapter 1 - An Introduction to Computers and Problem Solving
Basics of Computer Programming Web Design Section 8-1.
Creating Computer Programs lesson 27. This lesson includes the following sections: What is a Computer Program? How Programs Solve Problems Two Approaches:
CMPT 120 Introduction to Computer Science and Programming I Chris Schmidt.
CS001 Introduction to Programming Day 3 Sujana Jyothi
Computer Concepts 5th Edition Parsons/Oja Page 546 CHAPTER 11 Software Engineering Section A PARSONS/OJA Computer Programming.
PROBLEM SOLVING What should I wear today? Which sport should I do? Which cell phone is best for me? Which team is probably the winner? Will Euro be raised.
1 An introduction to programming concepts with Scratch.
Computer Science 1620 Programming & Problem Solving.
Lecture Notes 8/30/05 Program Design & Intro to Algorithms.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
XML October 24, Unit 6. What is XML? Stands for eXtensible Markup Language It is a markup language, like HTML But, –XML is designed to markup data –HTML.
Chapter 3 Planning Your Solution
Yeast Bread Techniques
Bug Session Two. Session description In this session the use of algorithms is reinforced to help pupils plan out what they will need to program on their.
UNIT 21 Software Engineering.
CS001 Introduction to Programming Day 1 Sujana Jyothi
Announcements — Tues., Jan. 19 For next time, read Learning Computing with Robots, chs. 1 and 2. The Blackboard site is up and operational! not much content.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
V Avon High School Tech Club Agenda Old Business –Delete Files New Business –Week 16 Topics: Intro to HTML/CSS –Questions? Tech Club Forums.
Algorithms: The recipe for computation What is an algorithm?
Algorithms: The recipe for computation What is an algorithm?
By Yukyong Chung.  Given the terms of computational concepts, the students will be able to state examples matching the Scratch blocks.  The students.
1.02 I Preparation Tasks List 11.02I Listing Preparation Tasks.
Invitation to Computer Science, Java Version, Second Edition.
Programming & Scratch. Programming Learning to program is ultimately about learning to think logically and to approach problems methodically. The building.
1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction.
Chapter 11 An Introduction to Visual Basic 2008 Why Windows and Why Visual Basic How You Develop a Visual Basic Application The Different Versions of Visual.
Bug Session Four. Session description Objectives Session activities summary Resources Prior knowledge of sequencing instructions using Bug Bug website.
1 Computers Can’t Cook! Programming Methodology Girls Engaged in Math and Science, June 2012 Bri Chapman.
Programming Concepts Chapter 3.
The Algorithmic Model. What is Computer Science What is Programming Algorithms –Definition –Properties of Good Algorithms –Describing Algorithms –Examples.
Overview of this morning What … is computing? Why … is computing an important skill to learn? What … will my child be learning in computing lessons?
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
Program Development Cycle Modern software developers base many of their techniques on traditional approaches to mathematical problem solving. One such.
Java Methods Methods contain a group of instructions that together perform a single task. For example if I want to perform the task of “making a pizza”,
CSC 1010 Programming for All Lecture 1 Some material courtesy of Python for Informatics: Exploring Information (
The single most important skill for a computer programmer is problem solving Problem solving means the ability to formulate problems, think creatively.
ALGORITHMS AND FLOWCHARTS. Why Algorithm is needed? 2 Computer Program ? Set of instructions to perform some specific task Is Program itself a Software.
SCRATCH ScratchScratch is a programming language that makes it easy to create your own interactive stories, animations, games, music, and art -- and share.
CS 101 – Oct. 7 Solving simple problems: create algorithm Structure of solution –Sequence of steps (1,2,3….) –Sometimes we need to make a choice –Sometimes.
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
1 Structured Programming Arab Academy for Science and Technology CC112 Dr. Sherif Mohamed Tawfik The Course.
PROGRAMMING: What’s It All About?
Creativity of Algorithms & Simple JavaScript Commands
Introduction to Computer Science and Programming I Chris Schmidt
Programming & Scratch.
Basic Whole Wheat Bread
Microsoft Visual Basic 2005 BASICS
Learning to Program in Python
Lesson 2 Programming constructs – Algorithms – Scratch – Variables Intro.
Learn… Create… Program
UNIT 3 CHAPTER 1 LESSON 4 Using Simple Commands.
Learn… Create… Program
Algorithm Discovery and Design
Creating Computer Programs
Click to add Text Computers & Instructions. Computers are given instructions in the form of computer programs that are created through the development.
Algorithms vs. Programming
Learn… Create… Program
Learn… Create… Program
Creating Computer Programs
How to make bread? Ingredients:
Primary School Computing
Programming Logic and Design Eighth Edition
Algorithms vs. Programming
Presentation transcript:

1 Computer Programming

Users vs. Designers Which are you?Which are you? Which do you want to be?Which do you want to be? Do you ever wonder – how does it work?Do you ever wonder – how does it work? This class will introduce you to the way software works and you will move from user to designer as the semester moves on. 2

Computer Programming What is computer programming?What is computer programming? 3

Computer Programming What is computer programming?What is computer programming? –Process of writing, testing, debugging, and maintaining the source code of computer programs. 4

Computer Programming Where does code come from?Where does code come from? 5

Computer Programming Where does code come from?Where does code come from? –Written in a programming language from scratch –Modified from existing code 6

Computer Programming Why do we do it?Why do we do it? –To create a program that performs a desired behavior. There is some debate as to whether programming is an art, a craft, or an engineering discipline.There is some debate as to whether programming is an art, a craft, or an engineering discipline. 7

Computer Programming Programmers work to create code that is efficient (works without draining current resources) and evolvable (can become something bigger in the future)Programmers work to create code that is efficient (works without draining current resources) and evolvable (can become something bigger in the future) Programmers are generally given a list of requirements and then work to translate those requirements into something the computer can understand.Programmers are generally given a list of requirements and then work to translate those requirements into something the computer can understand. 8

Computer Programming Programming is often compared to following a recipe.Programming is often compared to following a recipe. Programming is about giving the computer step by step instructions to go about completing the task.Programming is about giving the computer step by step instructions to go about completing the task. The instructions generally take the form of:The instructions generally take the form of: –a direct statement –a conditional statement –a link to a group of statements –a loop around statements meant to be repeated for some amount of time. 9

Pizza Dough Recipe (Requirements)‏ 1. Gather Ingredients 2. Combine sugar (1tbs), salt (1tbs), olive oil (1tbs), flour (1c) in mixing bowl 3. Turn on mixer 4. Add 1/4 cup of flour 5. If dough comes off the sides go to step 6, otherwise go back to step 4 6. Knead 15 minutes 7. Let rest for at least 45 minutes in warm area  1 dough ball

N-Pizza Dough Program N-Pizza Dough Program Gather IngredientsGather Ingredients Combine sugar (N tbs), salt (N tbs), olive oil (N tbs), flour (N c) in mixing bowlCombine sugar (N tbs), salt (N tbs), olive oil (N tbs), flour (N c) in mixing bowl Turn on mixerTurn on mixer Add N/4 cup of flourAdd N/4 cup of flour If dough comes off the sides go to step 6, otherwise go back to step 4If dough comes off the sides go to step 6, otherwise go back to step 4 Knead 15 minutesKnead 15 minutes Let rest for at least 45 minutes in warm areaLet rest for at least 45 minutes in warm area  N dough balls

N-Pizza Dough Program Gather IngredientsGather Ingredients Combine sugar (N tbs), salt (N tbs), olive oil (N tbs), flour (N c) in mixing bowlCombine sugar (N tbs), salt (N tbs), olive oil (N tbs), flour (N c) in mixing bowl Turn on mixerTurn on mixer Add N/4 cup of flourAdd N/4 cup of flour If dough comes off the sides go to step 6, otherwise go back to step 4If dough comes off the sides go to step 6, otherwise go back to step 4 Knead 15 minutesKnead 15 minutes Let rest for at least 45 minutes in warm areaLet rest for at least 45 minutes in warm area Sequence of Statements  N dough balls

N-Pizza Dough Program Gather IngredientsGather Ingredients Combine sugar (N tbs), salt (N tbs), olive oil (N tbs), flour (N c) in mixing bowlCombine sugar (N tbs), salt (N tbs), olive oil (N tbs), flour (N c) in mixing bowl Turn on mixerTurn on mixer Add N/4 cup of flourAdd N/4 cup of flour If dough comes off the sides go to step 6, otherwise go back to step 4If dough comes off the sides go to step 6, otherwise go back to step 4 Knead 15 minutesKnead 15 minutes Let rest for at least 45 minutes in warm areaLet rest for at least 45 minutes in warm area  N dough balls Variable

N-Pizza Dough - Program Gather IngredientsGather Ingredients Combine sugar (N tbs), salt (N tbs), olive oil (N tbs), flour (N c) in mixing bowlCombine sugar (N tbs), salt (N tbs), olive oil (N tbs), flour (N c) in mixing bowl Turn on mixerTurn on mixer Add N/4 cup of flourAdd N/4 cup of flour If dough comes off the sides go to step 6, otherwise go back to step 4If dough comes off the sides go to step 6, otherwise go back to step 4 Knead 15 minutesKnead 15 minutes Let rest for at least 45 minutes in warm areaLet rest for at least 45 minutes in warm area Conditional

N-Pizza Dough - Program Gather IngredientsGather Ingredients Combine sugar (N tbs), salt (N tbs), olive oil (N tbs), flour (N c) in mixing bowlCombine sugar (N tbs), salt (N tbs), olive oil (N tbs), flour (N c) in mixing bowl Turn on mixerTurn on mixer Add N/4 cup of flourAdd N/4 cup of flour If dough comes off the sides go to step 6, otherwise go back to step 4If dough comes off the sides go to step 6, otherwise go back to step 4 Knead 15 minutesKnead 15 minutes Let rest for at least 45 minutes in warm areaLet rest for at least 45 minutes in warm area SubroutinesMini-programs  N dough balls

Programming Languages There are hundreds of different programming languages.There are hundreds of different programming languages. A few basic types of instructions appear in all of themA few basic types of instructions appear in all of them –Input (get input from the user) –Output (display data to the user on a monitor or printout) –Math (perform basic mathematical operations) –Conditional Execution (check for conditions and execute the appropriate sequence of statements) –Repetition (perform some sequences of statements repeatedly) 16

Programming Benefits What do students learn through programming?What do students learn through programming? –Mathematical and computational ideas Coordinates, Variables, Random NumbersCoordinates, Variables, Random Numbers –Problem solving skills –Process of Design Idea->Prototype->Experiments->Debugging->Redesign- >New IdeasIdea->Prototype->Experiments->Debugging->Redesign- >New Ideas –Fluency with Digital Technology To be fluent in language, you learn to read AND write – how to express yourself in the language. The same is true of programming – using the computer not just to interact but to create.To be fluent in language, you learn to read AND write – how to express yourself in the language. The same is true of programming – using the computer not just to interact but to create. 17

Programming Many see programming as a tedious, specialized activityMany see programming as a tedious, specialized activity Traditional programming languages can be difficult to learn at first.Traditional programming languages can be difficult to learn at first. Recent developments have worked to create graphical programming languagesRecent developments have worked to create graphical programming languages –Makes programming more engaging and accessible to those first learning 18

Graphical Programming We will begin our programming experiments with a language called “Scratch”We will begin our programming experiments with a language called “Scratch” Scratch is a graphical programming language where you drag and drop concepts and link them together like you used to connect Lego blocks as a child.Scratch is a graphical programming language where you drag and drop concepts and link them together like you used to connect Lego blocks as a child. 19

Scratch Scratch allows students to create complex projects but is easy to learn.Scratch allows students to create complex projects but is easy to learn. Scratch mixes different types of media clips (graphics, music, instructions) in creative ways.Scratch mixes different types of media clips (graphics, music, instructions) in creative ways. The name came from the “scratching” technique used by hip-hop artists who mix music clips in creative ways.The name came from the “scratching” technique used by hip-hop artists who mix music clips in creative ways. 20

Scratch You can download scratch for free from the Internet and learn more about it through their website at:You can download scratch for free from the Internet and learn more about it through their website at: 21

Until next time… Purchase your text books if you have not already done so.Purchase your text books if you have not already done so. Skim through chapters 1 and 2 – READ Chapter 3.Skim through chapters 1 and 2 – READ Chapter 3. If you want, download and install Scratch on your own personal computer/laptop. You can also use the version in the lab here.If you want, download and install Scratch on your own personal computer/laptop. You can also use the version in the lab here. 22