Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

25
Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer

description

Question 1: What do you think of when you hear the term computer graphics?

Transcript of Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Page 1: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Introduction to Programming Using Scratch

Brooklyn College Bridges To Computing (2009)

 M. Meyer

Page 2: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

1.We want your undivided attention.2.We want you to have some fun.3.We want you to learn some basic

information about programming and  programing languages.

About Us

Page 3: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Question 1: What do you think of when you hear the term computer graphics?  

Page 4: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Question 1: What do you think of when you hear the term computer graphics?  

•Art (Photoshop) •Movies (The Matrix, LOTR)•Animation (PIXAR - Up, South Park)•Games (Halo3, Rock Band, BioShock)•GUI (Windows)

 

"Utilizing and/or manipulating images within a computer program." 

Page 5: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Question 2: What do you think of when you hear the term computer program? 

Page 6: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Question 2: What do you think of when you hear the term computer program?  

•Computer Games.•Office Applications (Word, Excel)•Browsers•Operating Systems.•Editors, Compilers, IDE's

 

"Something written in a programming language; designed to run on a

computer."

Page 7: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Scratch Scratch is an IDE (Integrated Development Environment) that allows users to create and run simple graphics programs. Users create programs in Scratch using an imperative, procedural, object-oriented programming language that has very simple syntax*. 

* Don't worry, all of these terms will be made clear to you.

Page 8: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Programming Languages:1.Allow us to "talk" to a computer, in a

language that we can understand. 2.Require a well-defined syntax.3.Allow us reuse and share code

(functions and libraries).  4.Fall into a variety of different

paradigms: Functional, Logiccal, Imperative, Procedural and Object-Oriented. 

(Scripting languages are a sub-type)

Page 9: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Simple Development1.Scratch requires very little typing in

order to create programs. 2.Visual code creation using drag and

drop.

Page 10: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Simplified Syntax 1.No missing semi-colon problems. 2.Code blocks can only fit together in

pre-defined way.

Page 11: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Large library. 1.Over 100 predefined

functions and limited ability to make more.

2.Functions cover vast majority of things your objects to be able to do in a graphics program.

Page 12: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Object-Oriented (1) 1.OO programing is an extremely

important programming paradigm.2.Scratch is not true OO

programming, but good example of basic concepts: oCreating programs that are composed of interacting objects.

oThese objects have associated properties and functions.

Page 13: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Object-Oriented (2) 1.Objects in Scratch are called

"Sprites".2.Properties of Sprites include:

oLocationoLookoUser defined properties (variables).

3.Functions of Sprites include:oMove oMake SoundoDetect Collision

Page 14: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

SpritesFound in the lower right

corner of the screen.

Click on them to select them and change contents of main window.

Page 15: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Imperative Programming1.The imperative paradigm views a

program as a "list" of things to do.2.Imperative languages need 3 things:•Sequence -> A predefined order in

which to process information.•Selection -> The ability to make a

choice. The "IF" statement.•Repetition -> The ability to repeat an

action. The "WHILE" statement.

Page 16: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Sequence•All "scripts" processed from top

down. •4 possible start conditions, 3 end.

Page 17: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Selection• If, If-else and wait_until functions.

Page 18: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Repetition•Variety of functions including

repeat_until.

Page 19: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Procedural Programming

• The procedural programming paradigm is based upon the concept of the “procedure call”: the ability to “send a message” to another section of a program.

• Procedural programming allows us to create sections of code that can be reused over and over .

Page 20: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Broadcast

Page 21: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

BenefitsBy developing a program in Scratch:•Experience in OO paradigm.•Experience in Imperative paradigm.•Experience in Procedural paradigm.•Experience in program logic.•Experience in development lifecycle.•Experience in debugging. 

Plus you have a chance to make something that belongs to you.

Page 22: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Are you an Artist?Using Sketch you can develop simple animations and visual storyboards.What's your story?Who are the characters?What's the conflict?What do you want your audience to feel?What objects would you need to create?What would their properties/functions be?

Page 23: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

ArtistsCheckout: /Projects/AnimationDayDream /Projects/Stories/Stargate /Projects/SpeakUpAgainstSpammers

Page 24: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

Are you a Gamer?Using Sketch you can develop 2D and "forced 3D" games.What's your game idea?What 'genre' will it look like? How will a player interact with the game?What do you want the player to feel?What objects would you need to create?What would their properties/functions be?

Page 25: Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.

GamersCheckout: /Projects/Games BugOnAPlate Tetris

/Projects/Lists/FruitCraftRPGRepeatAfterMe