Download presentation
Presentation is loading. Please wait.
Published byBrett Pope Modified over 9 years ago
1
1 Computer Programming
2
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
3
Computer Programming What is computer programming?What is computer programming? 3
4
Computer Programming What is computer programming?What is computer programming? –Process of writing, testing, debugging, and maintaining the source code of computer programs. 4
5
Computer Programming Where does code come from?Where does code come from? 5
6
Computer Programming Where does code come from?Where does code come from? –Written in a programming language from scratch –Modified from existing code 6
7
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
8
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
9
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
10
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
11
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
12
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
13
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
14
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
15
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
16
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
17
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
18
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
19
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
20
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
21
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: http://scratch.mit.edu/ 21
22
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.