SlideShare a Scribd company logo
THE TEAL EDITION




                 LIZ RUTLEDGE
                 rutle173@newschool.edu
DAY 4            esrutledge@gmail.com
August 4, 2011   cell phone: 415.828.4865
agenda.

        Review:                                     Do:
        Homework                                    PsuedoCode
        +,-,*,%                                     Logic for Ball Bounce
        Data Types - String, int, float
        Variables - assigning and good labelling
        practices


        Learn:
        Drawing Curves
        Operators - &&, ||, !=, ==, >
        Conditionals - if, and, or, random, noise
        Displaying text in the sketch window -
        PFont, Create/Load Font, text()
        PImage


DAY 4
Tuesday, 4 Aug 2011
                                                                            CODE
                                                                            bootcamp 2011
review.
                                                             now wasn’t that fun?




        homework:
        questions?
        let’s put that bad boy together


        topics we covered yesterday:
        +,-,*,%
        Data Types - String, int, float
        Variables - assigning and good labelling practices




DAY 4
Tuesday, 4 Aug 2011
                                                                         CODE
                                                                         bootcamp 2011
curves.
                                     like using the Illustrator pen tool...wearing a blindfold.




          Curves Example:
          http://www.openprocessing.org/visuals/?visualID=2124




DAY 4
Tuesday, 4 Aug 2011
                                                                                      CODE
                                                                                      bootcamp 2011
conditionals!
                                                       the tool that allows you to do anything of
                                                                       any actual interest...tever.




        the operators:                                  examples:
        > greater than
                                                        println(3 > 5); // Prints what?
        <= less than or equal to
        < less than                                     println(3 >= 5); // Prints what?
        == equality
                                                        println(5 >= 3); // Prints what?
        >= greater than or equal to
        != inequality                                   println(3 == 5); // Prints what?

                                                        println(5 == 5); // Prints what?
        what do they do?                                println(5 != 5); // Prints what?
        return a boolean value of whether or not the
        expression is in fact true




DAY 4
Tuesday, 4 Aug 2011
                                                                                           CODE
                                                                                           bootcamp 2011
if statements.

                                                        1. The test must be an expression that resolves to true or false.
       sample code:                                     2. When the test expression evaluates to true, the code inside the
       if (test) {                                      brackets is run. If the expression is false, the code is ignored.
              statements                                3. Code inside a set of braces is called a block.
       }


       examples:
       int x = 150;
       if (x > 100) { // If x is greater than 100,
              ellipse(50, 50, 36, 36); // draw this ellipse
       }
       if (x < 100) { // If x is less than 100
              rect(35, 35, 30, 30); // draw this rectangle
       }
       line(20, 20, 80, 80);




DAY 4
Tuesday, 4 Aug 2011
                                                                                                                  CODE
                                                                                                                  bootcamp 2011
if-else statements.
                                                           adding complexity.




        = a tree diagram made of code.

        if (test) {
              statements;
        }
        else {                else = execute only if first test
              statements 2;   is not met
        }


        if (test) {
              statements;
        }
        else if (test2) {     else if = execute only if first test is
              statements 2;   not met AND second test IS met
        }



DAY 4
Tuesday, 4 Aug 2011
                                                                        CODE
                                                                        bootcamp 2011
logical operators.
                                            sometimes one condition just
                                                           isn’t enough.




                                 examples:
                                 int a = 10;
                                 int b = 20;

                      && = AND   if ((a > 5) || (b < 30)) {
                                       line(20, 50, 80, 50);
                      || = OR    }
                                 // Will the code in the block run?

                      ! = NOT    if ((a > 15) || (b < 30)) {
                                       ellipse(50, 50, 36, 36);
                                 }
                                 // Will the code in the block run?




DAY 4
Tuesday, 4 Aug 2011
                                                                      CODE
                                                                      bootcamp 2011
the “NOT” operator.

            The logical NOT operator is an exclamation mark. It inverts the
            logical value of the associated boolean variables. It changes true
            to false, and false to true. The logical NOT operator can be applied
            only to boolean variables.


            examples:
            boolean b = true; // Assign true to b
            println(b); // Prints “true”
            println(!b); // Prints “false”
            println(!x); // ERROR! It’s only possible to ! a boolean variable




DAY 4
Tuesday, 4 Aug 2011
                                                                                   CODE
                                                                                   bootcamp 2011
random.
                                                      sometimes you just need some random values.




       The random() function creates unpredictable values within
       the range specified by its parameters.
       random(high) => returns a random number between 0 and the high parameter
       random(low, high) => returns a random number between the low and the high parameter


       examples:
       float f = random(5.2); // Assign f a float value from 0 to 5.2
       int i = random(5.2); // ERROR! Why?
       int j = int(random(0,5.2)); // Assign j an int value from 0 to 5
       println(j);


       Use random sparingly and be conscious of the math and algorithm of a range of numbers,
       rather than choosing random. Often used for color...but hey, let’s make our ranges specific!




DAY 4
Tuesday, 4 Aug 2011
                                                                                             CODE
                                                                                             bootcamp 2011
text and images!
                          finally, something other than
                                                shapes!




         PFont()

         How to use it:
         createFont();
         loadFont();
         text();


         PImage()
         How to use it:
         image();




DAY 4
Tuesday, 4 Aug 2011
                                               CODE
                                               bootcamp 2011
pseudocode.
                                                   organize your thoughts to make the coding
                                                       part faster, easier and more accurate.




         example:

         if(stomach grumbling)
         {
               eat something, stupid!
         }
         else if (sleepy) {
               just go to bed;
         }
         else {
               keep watching tv like a lazy bum;
         }



DAY 4
Tuesday, 4 Aug 2011
                                                                                     CODE
                                                                                     bootcamp 2011
more pseudocode.

        example:
        if ((mouse position is in left half of canvas) AND (mouse position is in top half of canvas)) {
              draw a orange rectangle in top left quarter of screen;
        }

        else {
              draw a yellow rectangle in bottom right quarter of screen;
        }




DAY 4
Tuesday, 4 Aug 2011
                                                                                                          CODE
                                                                                                          bootcamp 2011
a bouncing ball.
                                                        let’s try out our sweet new
                                                                 pseudocode skillz.




         in-class activity:
         go over logic of a bouncing ball as a class.




DAY 4
Tuesday, 4 Aug 2011
                                                                          CODE
                                                                           bootcamp 2011
homework.
                                                                    optional subheading goes here.




       do:
       1) Write pseudocode for bouncing balls
       2) Add label/text to drawing from the green painting tiles in an interesting way (i.e. not just
       a line of text in the middle of the screen)


       extra credit:
       3) Write pseudocode for bouncing balls that respond realistically. Think the physics of a
       billards table.




DAY 4
Tuesday, 4 Aug 2011
                                                                                                 CODE
                                                                                                 bootcamp 2011

More Related Content

Similar to Bootcamp - Team TEAL - Day 4

Mastering python lesson2
Mastering python lesson2Mastering python lesson2
Mastering python lesson2
Ruth Marvin
 
Le Wagon Australia Workshop
Le Wagon Australia WorkshopLe Wagon Australia Workshop
Le Wagon Australia Workshop
Paal Ringstad
 
Writing tests
Writing testsWriting tests
Writing tests
Jonathan Fine
 
The Sieve of Eratosthenes - Part 1
The Sieve of Eratosthenes - Part 1The Sieve of Eratosthenes - Part 1
The Sieve of Eratosthenes - Part 1
Philip Schwarz
 
The Sieve of Eratosthenes - Part 1 - with minor corrections
The Sieve of Eratosthenes - Part 1 - with minor correctionsThe Sieve of Eratosthenes - Part 1 - with minor corrections
The Sieve of Eratosthenes - Part 1 - with minor corrections
Philip Schwarz
 
Java coding pitfalls
Java coding pitfallsJava coding pitfalls
Java coding pitfalls
tomi vanek
 
Bootcamp - Team TEAL - Day 3
Bootcamp - Team TEAL - Day 3Bootcamp - Team TEAL - Day 3
Bootcamp - Team TEAL - Day 3Liz Rutledge
 
Unit I Advanced Java Programming Course
Unit I   Advanced Java Programming CourseUnit I   Advanced Java Programming Course
Unit I Advanced Java Programming Course
parveen837153
 
Doppl development iteration #4
Doppl development   iteration #4Doppl development   iteration #4
Doppl development iteration #4
Diego Perini
 
Unit testing-patterns
Unit testing-patternsUnit testing-patterns
Unit testing-patterns
Alexandru Bolboaca
 
Java tutorial PPT
Java tutorial  PPTJava tutorial  PPT
Java tutorial PPT
Intelligo Technologies
 
Java tutorial PPT
Java tutorial PPTJava tutorial PPT
Java tutorial PPT
Intelligo Technologies
 
Brixton Library Technology Initiative Week1 Recap
Brixton Library Technology Initiative Week1 RecapBrixton Library Technology Initiative Week1 Recap
Brixton Library Technology Initiative Week1 Recap
Basil Bibi
 
ForLoops.pptx
ForLoops.pptxForLoops.pptx
ForLoops.pptx
RabiyaZhexembayeva
 
Functional Programming in C# and F#
Functional Programming in C# and F#Functional Programming in C# and F#
Functional Programming in C# and F#
Alfonso Garcia-Caro
 
Enrich Your Models With OCL
Enrich Your Models With OCLEnrich Your Models With OCL
Enrich Your Models With OCL
Edward Willink
 
DITEC - Programming with Java
DITEC - Programming with JavaDITEC - Programming with Java
DITEC - Programming with Java
Rasan Samarasinghe
 
Bootcamp - Team TEAL - Day 8
Bootcamp - Team TEAL - Day 8Bootcamp - Team TEAL - Day 8
Bootcamp - Team TEAL - Day 8
Liz Rutledge
 
03 Logical functions.pdf
03 Logical functions.pdf03 Logical functions.pdf
03 Logical functions.pdf
RizwanAli988729
 
Chapter3
Chapter3Chapter3
Chapter3
Subhadip Pal
 

Similar to Bootcamp - Team TEAL - Day 4 (20)

Mastering python lesson2
Mastering python lesson2Mastering python lesson2
Mastering python lesson2
 
Le Wagon Australia Workshop
Le Wagon Australia WorkshopLe Wagon Australia Workshop
Le Wagon Australia Workshop
 
Writing tests
Writing testsWriting tests
Writing tests
 
The Sieve of Eratosthenes - Part 1
The Sieve of Eratosthenes - Part 1The Sieve of Eratosthenes - Part 1
The Sieve of Eratosthenes - Part 1
 
The Sieve of Eratosthenes - Part 1 - with minor corrections
The Sieve of Eratosthenes - Part 1 - with minor correctionsThe Sieve of Eratosthenes - Part 1 - with minor corrections
The Sieve of Eratosthenes - Part 1 - with minor corrections
 
Java coding pitfalls
Java coding pitfallsJava coding pitfalls
Java coding pitfalls
 
Bootcamp - Team TEAL - Day 3
Bootcamp - Team TEAL - Day 3Bootcamp - Team TEAL - Day 3
Bootcamp - Team TEAL - Day 3
 
Unit I Advanced Java Programming Course
Unit I   Advanced Java Programming CourseUnit I   Advanced Java Programming Course
Unit I Advanced Java Programming Course
 
Doppl development iteration #4
Doppl development   iteration #4Doppl development   iteration #4
Doppl development iteration #4
 
Unit testing-patterns
Unit testing-patternsUnit testing-patterns
Unit testing-patterns
 
Java tutorial PPT
Java tutorial  PPTJava tutorial  PPT
Java tutorial PPT
 
Java tutorial PPT
Java tutorial PPTJava tutorial PPT
Java tutorial PPT
 
Brixton Library Technology Initiative Week1 Recap
Brixton Library Technology Initiative Week1 RecapBrixton Library Technology Initiative Week1 Recap
Brixton Library Technology Initiative Week1 Recap
 
ForLoops.pptx
ForLoops.pptxForLoops.pptx
ForLoops.pptx
 
Functional Programming in C# and F#
Functional Programming in C# and F#Functional Programming in C# and F#
Functional Programming in C# and F#
 
Enrich Your Models With OCL
Enrich Your Models With OCLEnrich Your Models With OCL
Enrich Your Models With OCL
 
DITEC - Programming with Java
DITEC - Programming with JavaDITEC - Programming with Java
DITEC - Programming with Java
 
Bootcamp - Team TEAL - Day 8
Bootcamp - Team TEAL - Day 8Bootcamp - Team TEAL - Day 8
Bootcamp - Team TEAL - Day 8
 
03 Logical functions.pdf
03 Logical functions.pdf03 Logical functions.pdf
03 Logical functions.pdf
 
Chapter3
Chapter3Chapter3
Chapter3
 

More from Liz Rutledge

dataCoach Lacrosse: Data Tools for the Non-Professional Sports Community [The...
dataCoach Lacrosse: Data Tools for the Non-Professional Sports Community [The...dataCoach Lacrosse: Data Tools for the Non-Professional Sports Community [The...
dataCoach Lacrosse: Data Tools for the Non-Professional Sports Community [The...
Liz Rutledge
 
data_coach: midterm review + user testing plans
data_coach: midterm review + user testing plansdata_coach: midterm review + user testing plans
data_coach: midterm review + user testing plansLiz Rutledge
 
dataPlay: Sports Game Data Collection and Visualization [Information Design A...
dataPlay: Sports Game Data Collection and Visualization [Information Design A...dataPlay: Sports Game Data Collection and Visualization [Information Design A...
dataPlay: Sports Game Data Collection and Visualization [Information Design A...
Liz Rutledge
 
Info Design in the Urban Environment | Perception + Discernment, Wayfinding, ...
Info Design in the Urban Environment | Perception + Discernment, Wayfinding, ...Info Design in the Urban Environment | Perception + Discernment, Wayfinding, ...
Info Design in the Urban Environment | Perception + Discernment, Wayfinding, ...Liz Rutledge
 
Information Design in the Urban Environment: Personal Observations
Information Design in the Urban Environment: Personal ObservationsInformation Design in the Urban Environment: Personal Observations
Information Design in the Urban Environment: Personal ObservationsLiz Rutledge
 
[THESIS] Final Presentation: GametimePLUS
[THESIS] Final Presentation: GametimePLUS[THESIS] Final Presentation: GametimePLUS
[THESIS] Final Presentation: GametimePLUSLiz Rutledge
 
[THESIS] Midterm Presentation
[THESIS] Midterm Presentation[THESIS] Midterm Presentation
[THESIS] Midterm PresentationLiz Rutledge
 
Bootcamp - Team TEAL - Day 10
Bootcamp - Team TEAL - Day 10Bootcamp - Team TEAL - Day 10
Bootcamp - Team TEAL - Day 10Liz Rutledge
 
Bootcamp - Team TEAL - Day 9
Bootcamp - Team TEAL - Day 9Bootcamp - Team TEAL - Day 9
Bootcamp - Team TEAL - Day 9
Liz Rutledge
 
Bootcamp - Team TEAL - Day 7
Bootcamp - Team TEAL - Day 7Bootcamp - Team TEAL - Day 7
Bootcamp - Team TEAL - Day 7
Liz Rutledge
 
Bootcamp - TEAM TEAL - Day 2
Bootcamp - TEAM TEAL - Day 2Bootcamp - TEAM TEAL - Day 2
Bootcamp - TEAM TEAL - Day 2
Liz Rutledge
 
Iris+Olivia | Tech Accessory Accessories
Iris+Olivia | Tech Accessory AccessoriesIris+Olivia | Tech Accessory Accessories
Iris+Olivia | Tech Accessory Accessories
Liz Rutledge
 
DT Outfitters | Designed Object Presentation
DT Outfitters | Designed Object PresentationDT Outfitters | Designed Object Presentation
DT Outfitters | Designed Object PresentationLiz Rutledge
 
Follow the Mellow Brick Glow | An Augmented Space Project
Follow the Mellow Brick Glow | An Augmented Space ProjectFollow the Mellow Brick Glow | An Augmented Space Project
Follow the Mellow Brick Glow | An Augmented Space ProjectLiz Rutledge
 

More from Liz Rutledge (14)

dataCoach Lacrosse: Data Tools for the Non-Professional Sports Community [The...
dataCoach Lacrosse: Data Tools for the Non-Professional Sports Community [The...dataCoach Lacrosse: Data Tools for the Non-Professional Sports Community [The...
dataCoach Lacrosse: Data Tools for the Non-Professional Sports Community [The...
 
data_coach: midterm review + user testing plans
data_coach: midterm review + user testing plansdata_coach: midterm review + user testing plans
data_coach: midterm review + user testing plans
 
dataPlay: Sports Game Data Collection and Visualization [Information Design A...
dataPlay: Sports Game Data Collection and Visualization [Information Design A...dataPlay: Sports Game Data Collection and Visualization [Information Design A...
dataPlay: Sports Game Data Collection and Visualization [Information Design A...
 
Info Design in the Urban Environment | Perception + Discernment, Wayfinding, ...
Info Design in the Urban Environment | Perception + Discernment, Wayfinding, ...Info Design in the Urban Environment | Perception + Discernment, Wayfinding, ...
Info Design in the Urban Environment | Perception + Discernment, Wayfinding, ...
 
Information Design in the Urban Environment: Personal Observations
Information Design in the Urban Environment: Personal ObservationsInformation Design in the Urban Environment: Personal Observations
Information Design in the Urban Environment: Personal Observations
 
[THESIS] Final Presentation: GametimePLUS
[THESIS] Final Presentation: GametimePLUS[THESIS] Final Presentation: GametimePLUS
[THESIS] Final Presentation: GametimePLUS
 
[THESIS] Midterm Presentation
[THESIS] Midterm Presentation[THESIS] Midterm Presentation
[THESIS] Midterm Presentation
 
Bootcamp - Team TEAL - Day 10
Bootcamp - Team TEAL - Day 10Bootcamp - Team TEAL - Day 10
Bootcamp - Team TEAL - Day 10
 
Bootcamp - Team TEAL - Day 9
Bootcamp - Team TEAL - Day 9Bootcamp - Team TEAL - Day 9
Bootcamp - Team TEAL - Day 9
 
Bootcamp - Team TEAL - Day 7
Bootcamp - Team TEAL - Day 7Bootcamp - Team TEAL - Day 7
Bootcamp - Team TEAL - Day 7
 
Bootcamp - TEAM TEAL - Day 2
Bootcamp - TEAM TEAL - Day 2Bootcamp - TEAM TEAL - Day 2
Bootcamp - TEAM TEAL - Day 2
 
Iris+Olivia | Tech Accessory Accessories
Iris+Olivia | Tech Accessory AccessoriesIris+Olivia | Tech Accessory Accessories
Iris+Olivia | Tech Accessory Accessories
 
DT Outfitters | Designed Object Presentation
DT Outfitters | Designed Object PresentationDT Outfitters | Designed Object Presentation
DT Outfitters | Designed Object Presentation
 
Follow the Mellow Brick Glow | An Augmented Space Project
Follow the Mellow Brick Glow | An Augmented Space ProjectFollow the Mellow Brick Glow | An Augmented Space Project
Follow the Mellow Brick Glow | An Augmented Space Project
 

Recently uploaded

Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 

Recently uploaded (20)

Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 

Bootcamp - Team TEAL - Day 4

  • 1. THE TEAL EDITION LIZ RUTLEDGE rutle173@newschool.edu DAY 4 esrutledge@gmail.com August 4, 2011 cell phone: 415.828.4865
  • 2. agenda. Review: Do: Homework PsuedoCode +,-,*,% Logic for Ball Bounce Data Types - String, int, float Variables - assigning and good labelling practices Learn: Drawing Curves Operators - &&, ||, !=, ==, > Conditionals - if, and, or, random, noise Displaying text in the sketch window - PFont, Create/Load Font, text() PImage DAY 4 Tuesday, 4 Aug 2011 CODE bootcamp 2011
  • 3. review. now wasn’t that fun? homework: questions? let’s put that bad boy together topics we covered yesterday: +,-,*,% Data Types - String, int, float Variables - assigning and good labelling practices DAY 4 Tuesday, 4 Aug 2011 CODE bootcamp 2011
  • 4. curves. like using the Illustrator pen tool...wearing a blindfold. Curves Example: http://www.openprocessing.org/visuals/?visualID=2124 DAY 4 Tuesday, 4 Aug 2011 CODE bootcamp 2011
  • 5. conditionals! the tool that allows you to do anything of any actual interest...tever. the operators: examples: > greater than println(3 > 5); // Prints what? <= less than or equal to < less than println(3 >= 5); // Prints what? == equality println(5 >= 3); // Prints what? >= greater than or equal to != inequality println(3 == 5); // Prints what? println(5 == 5); // Prints what? what do they do? println(5 != 5); // Prints what? return a boolean value of whether or not the expression is in fact true DAY 4 Tuesday, 4 Aug 2011 CODE bootcamp 2011
  • 6. if statements. 1. The test must be an expression that resolves to true or false. sample code: 2. When the test expression evaluates to true, the code inside the if (test) { brackets is run. If the expression is false, the code is ignored. statements 3. Code inside a set of braces is called a block. } examples: int x = 150; if (x > 100) { // If x is greater than 100, ellipse(50, 50, 36, 36); // draw this ellipse } if (x < 100) { // If x is less than 100 rect(35, 35, 30, 30); // draw this rectangle } line(20, 20, 80, 80); DAY 4 Tuesday, 4 Aug 2011 CODE bootcamp 2011
  • 7. if-else statements. adding complexity. = a tree diagram made of code. if (test) { statements; } else { else = execute only if first test statements 2; is not met } if (test) { statements; } else if (test2) { else if = execute only if first test is statements 2; not met AND second test IS met } DAY 4 Tuesday, 4 Aug 2011 CODE bootcamp 2011
  • 8. logical operators. sometimes one condition just isn’t enough. examples: int a = 10; int b = 20; && = AND if ((a > 5) || (b < 30)) { line(20, 50, 80, 50); || = OR } // Will the code in the block run? ! = NOT if ((a > 15) || (b < 30)) { ellipse(50, 50, 36, 36); } // Will the code in the block run? DAY 4 Tuesday, 4 Aug 2011 CODE bootcamp 2011
  • 9. the “NOT” operator. The logical NOT operator is an exclamation mark. It inverts the logical value of the associated boolean variables. It changes true to false, and false to true. The logical NOT operator can be applied only to boolean variables. examples: boolean b = true; // Assign true to b println(b); // Prints “true” println(!b); // Prints “false” println(!x); // ERROR! It’s only possible to ! a boolean variable DAY 4 Tuesday, 4 Aug 2011 CODE bootcamp 2011
  • 10. random. sometimes you just need some random values. The random() function creates unpredictable values within the range specified by its parameters. random(high) => returns a random number between 0 and the high parameter random(low, high) => returns a random number between the low and the high parameter examples: float f = random(5.2); // Assign f a float value from 0 to 5.2 int i = random(5.2); // ERROR! Why? int j = int(random(0,5.2)); // Assign j an int value from 0 to 5 println(j); Use random sparingly and be conscious of the math and algorithm of a range of numbers, rather than choosing random. Often used for color...but hey, let’s make our ranges specific! DAY 4 Tuesday, 4 Aug 2011 CODE bootcamp 2011
  • 11. text and images! finally, something other than shapes! PFont() How to use it: createFont(); loadFont(); text(); PImage() How to use it: image(); DAY 4 Tuesday, 4 Aug 2011 CODE bootcamp 2011
  • 12. pseudocode. organize your thoughts to make the coding part faster, easier and more accurate. example: if(stomach grumbling) { eat something, stupid! } else if (sleepy) { just go to bed; } else { keep watching tv like a lazy bum; } DAY 4 Tuesday, 4 Aug 2011 CODE bootcamp 2011
  • 13. more pseudocode. example: if ((mouse position is in left half of canvas) AND (mouse position is in top half of canvas)) { draw a orange rectangle in top left quarter of screen; } else { draw a yellow rectangle in bottom right quarter of screen; } DAY 4 Tuesday, 4 Aug 2011 CODE bootcamp 2011
  • 14. a bouncing ball. let’s try out our sweet new pseudocode skillz. in-class activity: go over logic of a bouncing ball as a class. DAY 4 Tuesday, 4 Aug 2011 CODE bootcamp 2011
  • 15. homework. optional subheading goes here. do: 1) Write pseudocode for bouncing balls 2) Add label/text to drawing from the green painting tiles in an interesting way (i.e. not just a line of text in the middle of the screen) extra credit: 3) Write pseudocode for bouncing balls that respond realistically. Think the physics of a billards table. DAY 4 Tuesday, 4 Aug 2011 CODE bootcamp 2011