FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011
Self-Introduction Oscar Au Tel: (852) Fax: (852) Office: ICSCM14 (Inno Center 5 th
Tentative Topics o Programming fundamentals o General problem solving skills o 2D algorithmic graphics o Motion and animation o User interaction (keyboard & mouse) o Interactivity with image, video and sound o Basic object oriented programming o (optional) Basic 3D programming o And more …
Programming o What is programming? o Designing, writing, testing, debugging, troubleshooting, maintaining code and program… o Is an art? a craft? An engineering discipline? A science?
Programming Separation of programming layers Data LogicPresentation
Programming o Where are these fields of software belongs to? o Database, AI, networking, operating system, business software, games o What are we focusing?
Programming We learn programming because there are something we want to present! Data LogicPresentation Here we are!
Possibilities What could we do with our own programs? Visualization Check!
Possibilities What could we do with our own programs? Interactions
Possibilities What could we do with our own programs? Arts
Processing o Development platform: Processing 1.2 o Open source programming language & environment o Based on Java o Designed for visual context and arts – including images, animations, and interactions
Installation o To install Processing in your computer … o Download from processing.org o Windows & Linux performs o Unzip and run processing.exe / processing o Mac OS X perform o Drag dmg file to Applications folder
Introduction of UI Display window Toolbar Menu bar Tabs Text editor Message area console
Introduction of UI o Let make your first program! o Type “ellipse(50, 50, 80, 80);” in the text editor o Press RUN button to execute your program o Press STOP button to stop Output
Introduction of UI o To save your program, press SAVE button o Each processing program is called sketch o ! Each sketch has to be placed in a folder with same name in order to run correctly o Press LOAD button to load a saved sketch o To create a new sketch, press NEW button
Introduction of UI o You can share you work by exporting your program to java applet o Press EXPORT button and select a folder to export o Open html file in browser to check the results Exported files Applet in browser
Demo
Assessment o In-class exercises and discussion: 30% o 3 Assignments: 70% (20% + 20% + 30%) o Curved grading: A+, A, A-, B+, ….
Online Reference
Reference - Books