27
An “enjoyable” introduction to Programming Dr. Jeyakesavan Veerasamy University of Texas at Dallas, USA [email protected]

An “enjoyable” introduction to Programming

  • Upload
    ishana

  • View
    48

  • Download
    0

Embed Size (px)

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 Presentation

Citation preview

Page 1: An “enjoyable” introduction to Programming

An “enjoyable” introduction to Programming

Dr. Jeyakesavan VeerasamyUniversity of Texas at Dallas, USA

[email protected]

Page 2: An “enjoyable” introduction to Programming

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

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

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

Learning to ride bicycle

• Difficulties for beginners:

• Difficulties for experienced folks:

Page 6: An “enjoyable” introduction to Programming

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

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

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

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

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

Sample program in Snap 4.0

Page 12: An “enjoyable” introduction to Programming

Program Output

Page 13: An “enjoyable” introduction to Programming

Programming Concepts

Page 14: An “enjoyable” introduction to Programming

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

Programming concepts:Sequence structure

instruction 1;instruction 2;instruction 3;…

Page 16: An “enjoyable” introduction to Programming

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

Selection structure

IF condition is true THEN do this;ELSE do that;ENDIF

Page 18: An “enjoyable” introduction to Programming

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

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

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

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

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

Alice environment

• World• Gallery• Creating the initial scene– Adding objects– Working with objects

Page 24: An “enjoyable” introduction to Programming

Alice Examples

• Sequence • Selection• Repetition/loop• Parallel actions

Page 25: An “enjoyable” introduction to Programming

Alice Examples …

• Modules• Arrays• Event based programming• Games

Page 26: An “enjoyable” introduction to Programming

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

Page 27: An “enjoyable” introduction to Programming

Questions & Answers

Dr. V. [email protected]