an “enjoyable” introduction to programming
DESCRIPTION
An “enjoyable” introduction to Programming. Dr. Jeyakesavan Veerasamy University of Texas at Dallas, USA [email protected]. What is programming?. Developing applications & games Software is not limited to PC most complex systems run software smart phones, game devices, even DVD players. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/1.jpg)
An “enjoyable” introduction to Programming
Dr. Jeyakesavan VeerasamyUniversity of Texas at Dallas, USA
![Page 2: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/2.jpg)
What is programming?
• Developing applications & games • Software is not limited to PC – most complex systems run software– smart phones, game devices, even DVD players
![Page 3: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/3.jpg)
Programming …• is NOT a boring or repetitive activity• does NOT require you to sit in dark room and
type in computer all day! • does NOT involve complex Math
• requires logical thinking – technical common sense
• write minimal code & combine with existing components to build new applications
• Solve customers’ problems & improves quality of life for every one.
![Page 4: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/4.jpg)
Why learn programming?
• Software Engineers get great pay!• Less stressful compared to several other high
paying jobs• Automation continues…• Computer touches our lives more & more every
day…• More component based programming always
room for simple programs to do large tasks!
![Page 5: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/5.jpg)
Learning to ride bicycle
• Difficulties for beginners:
• Difficulties for experienced folks:
![Page 6: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/6.jpg)
Learning to ride bicycle
• Difficulties for beginners:– Learning to balance & go forward together
• Difficulties for experienced folks:– None.
![Page 7: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/7.jpg)
Solution
• Training wheels• Helmet
• Makes learning enjoyable and safe!
• Similar difficulties are there while learning to program in a computer.
![Page 8: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/8.jpg)
Learning to program
• We have similar challenges.• Most students try to learn syntax and logic
together, waste lot of hours and get confused & frustrated.
• Indian students resort to memorization of programs. US students run away from programming. Both are NOT good
• It is possible to do much better!
![Page 9: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/9.jpg)
Solution
• Visual Programming Tools to teach programming concepts without encountering syntax errors
• Focus on the logic first & build confidence.
![Page 10: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/10.jpg)
Free Visual Programming ToolsTool Provider Web-site
Alice 2.2 Carnegie Mellon University, USA
www.alice.org
Scratch MIT, USA scratch.mit.eduSnap! UCBerkeley, USA byob.berkeley.edu
Lego MindStorm Lego, USA mindstorms.lego.com
Several more…
![Page 11: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/11.jpg)
Sample program in Snap 4.0
![Page 12: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/12.jpg)
Program Output
![Page 13: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/13.jpg)
Programming Concepts
![Page 14: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/14.jpg)
A few examples
• Recipe to make your favorite food• Assembly instructions for a toy• Coming to school from homeWhat is common about these activities?
![Page 15: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/15.jpg)
Programming concepts:Sequence structure
instruction 1;instruction 2;instruction 3;…
![Page 16: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/16.jpg)
A few more examples
• Bike to school or walk?• Become a doctor or programmer?• Do homework or play?• Eat Poori or Chapathi?
What is the common thing here?
![Page 17: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/17.jpg)
Selection structure
IF condition is true THEN do this;ELSE do that;ENDIF
![Page 18: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/18.jpg)
A few more examples
• Go on a shopping spree with lot of cash!• Take an exam that has several questions• Eat chips from a packet
What is the common thing here?
![Page 19: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/19.jpg)
Repetition structure
WHILE (more items to process) process the next item;ENDWHILE
FOR month = 1 to 12 do monthly processingENDFOR
![Page 20: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/20.jpg)
Programming Concepts
• Control Structures: Sequence, Selection & Repetition
• These are 3 pillars of Programming.• Every complex program is only a combination
of these structures.
![Page 21: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/21.jpg)
Purpose of Alice
• Enjoyable introduction to Programming• Learning to program with training wheels• Stepping stone to learn more serious
languages (C/C++/Java)• Natural introduction to Object Oriented
Programming
![Page 22: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/22.jpg)
Hands-on Introduction to Alice
It is a good idea to save each program separately so that you can
go back and review later.
![Page 23: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/23.jpg)
Alice environment
• World• Gallery• Creating the initial scene– Adding objects– Working with objects
![Page 24: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/24.jpg)
Alice Examples
• Sequence • Selection• Repetition/loop• Parallel actions
![Page 25: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/25.jpg)
Alice Examples …
• Modules• Arrays• Event based programming• Games
![Page 26: An “enjoyable” introduction to Programming](https://reader033.vdocuments.mx/reader033/viewer/2022051118/568163e5550346895dd54691/html5/thumbnails/26.jpg)
References
• Alice website: www.alice.org• Textbook: Learning to Program with Alice by
Wanda Dann, Steve Cooper and Randy PauschISBN: 0-1318-7289-3
• Ebook: http://www.dickbaldwin.com/tocalice.htm• My presentation & examples:
www.utdallas.edu/~jeyv/alice