an “enjoyable” introduction to programming

Post on 23-Feb-2016

44 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

An “enjoyable” introduction to Programming. Dr. Jeyakesavan Veerasamy University of Texas at Dallas, USA jeyv@utdallas.edu. 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

TRANSCRIPT

An “enjoyable” introduction to Programming

Dr. Jeyakesavan VeerasamyUniversity of Texas at Dallas, USA

jeyv@utdallas.edu

What is programming?

• Developing applications & games • Software is not limited to PC – most complex systems run software– smart phones, game devices, even DVD players

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.

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!

Learning to ride bicycle

• Difficulties for beginners:

• Difficulties for experienced folks:

Learning to ride bicycle

• Difficulties for beginners:– Learning to balance & go forward together

• Difficulties for experienced folks:– None.

Solution

• Training wheels• Helmet

• Makes learning enjoyable and safe!

• Similar difficulties are there while learning to program in a computer.

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!

Solution

• Visual Programming Tools to teach programming concepts without encountering syntax errors

• Focus on the logic first & build confidence.

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…

Sample program in Snap 4.0

Program Output

Programming Concepts

A few examples

• Recipe to make your favorite food• Assembly instructions for a toy• Coming to school from homeWhat is common about these activities?

Programming concepts:Sequence structure

instruction 1;instruction 2;instruction 3;…

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?

Selection structure

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

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?

Repetition structure

WHILE (more items to process) process the next item;ENDWHILE

FOR month = 1 to 12 do monthly processingENDFOR

Programming Concepts

• Control Structures: Sequence, Selection & Repetition

• These are 3 pillars of Programming.• Every complex program is only a combination

of these structures.

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

Hands-on Introduction to Alice

It is a good idea to save each program separately so that you can

go back and review later.

Alice environment

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

Alice Examples

• Sequence • Selection• Repetition/loop• Parallel actions

Alice Examples …

• Modules• Arrays• Event based programming• Games

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

Questions & Answers

Dr. V. Jeyakesavanjeyv@utdallas.edu

top related