DOC PREVIEW
GT LCC 6310 - Computation as an Expressive Medium Lecture 3

This preview shows page 1-2-3 out of 9 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

LCC 6310 Computation as an Expressive MediumSuggestions on learning to programOutlineReading timeEffect of creating an int variableEffect of creating an array of intsPractice reading codeNew constructsExamples of visualizing timeLCC 6310Computation as an Expressive MediumLCC 6310Computation as an Expressive MediumLecture 3Lecture 3Suggestions on learning to programSuggestions on learning to program•Spend a lot of time fiddling around with codeSpend a lot of time fiddling around with code•Programming is something you have to learn by trying it•Get help from other peopleGet help from other people•I expect those who already know some programming to help others•Figure things out in groups•Ask me questions in classAsk me questions in classOutlineOutline•Finish discussing Kay/Goldberg articleFinish discussing Kay/Goldberg article•Programming conceptsProgramming concepts•Reading the time•Arrays•Reading code•Creating shapes•Translation•Talk about project 1Talk about project 1Reading timeReading time•int hour() – returns the hour (0 – 23)int hour() – returns the hour (0 – 23)•int minute() – returns the minutes (0 – 59)int minute() – returns the minutes (0 – 59)•int second() – returns the seconds (0 – 59)int second() – returns the seconds (0 – 59)•int day() – returns the day of the month (1 -31)int day() – returns the day of the month (1 -31)•int month() – returns the month (1 – 12)int month() – returns the month (1 – 12)•int year() – returns the four digit year (e.g. 2004)int year() – returns the four digit year (e.g. 2004)•float milliseconds() – returns number of millis since start of appfloat milliseconds() – returns number of millis since start of appEffect of creating an int variableEffect of creating an int variable// Single intint anInt;// Put a value in the intanInt = 3;// Type error!anInt = “hello”;Code EffectName: anInt, Type: int3Name: anInt, Type: intName: anInt, Type: int“hello”Can’t shove “hello” into an intEffect of creating an array of intsEffect of creating an array of ints// declare byte arrayint[] intArray; // initialize byte arrayintArray = new int[5]; // set first elementintArray[0] = 3; // set third elementintArray[2] = 5; Code EffectName: intArray, Type: int[]0 1 2 3 4each element has type int0 0 0 0 00 1 2 3 43 0 0 0 00 1 2 3 43 0 5 0 0Practice reading codePractice reading code•If code is a medium, then it can be both written and If code is a medium, then it can be both written and readread•Reading code revealsReading code reveals•New programming constructs•Strategies and techniques (design patterns)•Style•Philosophical assumptions (deep reading)•Let’s figure out the data Let’s figure out the data  array example together array example togetherNew constructsNew constructs•Array declaration and referenceArray declaration and reference•Math operations and functions Math operations and functions •Special variables Special variables widthwidth and and heightheight•Type castingType castingExamples of visualizing timeExamples of visualizing time•In the Processing examplesIn the Processing examples•Input  seconds_minutes_hours•Input  milliseconds•Industrious ClockIndustrious Clock•Maeda’s clocksMaeda’s


View Full Document

GT LCC 6310 - Computation as an Expressive Medium Lecture 3

Documents in this Course
Load more
Download Computation as an Expressive Medium Lecture 3
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Computation as an Expressive Medium Lecture 3 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Computation as an Expressive Medium Lecture 3 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?