SlideShare uma empresa Scribd logo
1 de 13
Baixar para ler offline
TEA M TEAL



                    LIZ RUTLEDGE
DAY 6               rutle173@newschool.edu
August 8, 2011      esrutledge@gmail.com
agenda.

         Review:                              Learn:
         ALL THE THINGS!                      FOR LOOPS!
         (i.e. anything you guys want me to   (hoorayyyyyyyyyyy!)
         go over up until now)

                                              seriously though:
                                              you’re gonna thank me later.




DAY 6
Tuesday, 8 Aug 2011
                                                                             CODE
                                                                             bootcamp 2011
homework
                                    now wasn’t that fun?




        displaying text homework:
        questions?
        let’s look at a few!


        review:
        displaying images
        making things move
        simple conditionals
        booleans
        anything else?




DAY 6
Tuesday, 8 Aug 2011
                                                CODE
                                                bootcamp 2011
animation
    heading. best practices.

        the concepts.
        separating out direction and
        velocity to simplify your code


        the techniques and
        syntax.
        seriously, it’s just including more
        variables (dx/speedX vs directionX)
        ...and thinking in vectors.




DAY 6
Tuesday, 8 Aug 2011
                                              CODE
                                              bootcamp 2011
for loops!
                                                          hold on...this could get bumpy.




        the concept:
        a little bit of code to do the same thing lots of times.


        in english:
        hey Processing, can you draw 5 ellipses for me?


        in code:
        for (int i = 0; i < 5; i++) {
             ellipse(0, 0, 10, 10);
        }



DAY 6
Tuesday, 8 Aug 2011
                                                                                 CODE
                                                                                 bootcamp 2011
nested if-statements.

     before:                           with nested if statements:
     if (test) {                       if (test) {
                                              if (test) {
            statements                               statements
     }                                        }
                                              statements
                                       }
     example:
     if (x > 100) {
                                       example:
                                       if (x > 100) { // If x is greater than 100,
            ellipse(50, 50, 36, 36);         if( X == 112) {
     }                                             ellipse(50, 50, 36, 36); // draw this ellipse
                                             }
                                             else {
                                                   ellipse(50, 90, 30, 30); // draw this ellipse
                                             }
                                       }
                                       else() { something else }



DAY 6
Tuesday, 8 Aug 2011
                                                                                           CODE
                                                                                            bootcamp 2011
optional review.
                                                   if we have time and you guys want it.




        from thursday:
        conditionals
        logical operators
            mathematical operators
            the “NOT” operator
        booleans

        from friday:
        crazy moving/bouncing stuff
        pseudocode/figuring out logic in general
        anything else?



DAY 6
Tuesday, 8 Aug 2011
                                                                                CODE
                                                                                bootcamp 2011
if statements.
    heading.
                                                                              optional subheading goes here.




                                                        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 6
Tuesday, 8 Aug 2011
                                                                                                                  CODE
                                                                                                                  bootcamp 2011
if-else statements.
    heading.
                                             optional subheadingcomplexity.
                                                         adding goes here.




        = 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 6
Tuesday, 8 Aug 2011
                                                                        CODE
                                                                        bootcamp 2011
conditionals!
                                                 the tool that allows you to do anything of
                                                                      any actual interest...




          the operators:                           examples:
          > greater than
                                                   println(3 > 5); // Prints what?
          >= greater than or equal to
          < less than                              println(5 >= 3); // Prints what?
          <= less than or equal to                 println(5 == 5); // Prints what?
          == equals
                                                   println(5 != 5); // Prints what?
          != does NOT equal
                                                   (hint: it’s either true or false!)

          what do they do?
          return a boolean value of whether or
          not the expression is in fact true




DAY 6
Tuesday, 8 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 6
Tuesday, 8 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 6
Tuesday, 8 Aug 2011
                                                                                   CODE
                                                                                   bootcamp 2011
homework.
                                                                   due Tuesday August 9th.




       read:                                     do:
       FORM + CODE: “Repeat” (pp 43-63)          Make a parade of elements using for
                                                 loops to create a bunch of things at
                                                 once. Since (if you do this correctly)
       research:                                 it isn’t any harder to do 1 or 1,000, I
       an interesting project that could be      want there to be at least 20 objects.
       inspiration for your final project (or
       that is just totally baller in general)   There doesn’t necessarily need to be
       post link to the project on the blog      any collision detection or anything. Just
       and describe what interests you           a bunch of objects toddling their way
       about it (just a couple sentences)        along the screen, preferable in some
                                                 kind of interesting way.




DAY 6
Tuesday, 8 Aug 2011
                                                                                      CODE
                                                                                       bootcamp 2011

Mais conteúdo relacionado

Semelhante a Bootcamp - Team TEAL - Day 6

Bootcamp - Team TEAL - Day 3
Bootcamp - Team TEAL - Day 3Bootcamp - Team TEAL - Day 3
Bootcamp - Team TEAL - Day 3
Liz Rutledge
 
Bootcamp - Team TEAL - Day 10
Bootcamp - Team TEAL - Day 10Bootcamp - Team TEAL - Day 10
Bootcamp - Team TEAL - Day 10
Liz Rutledge
 

Semelhante a Bootcamp - Team TEAL - Day 6 (15)

Bootcamp - Team TEAL - Day 4
Bootcamp - Team TEAL - Day 4Bootcamp - Team TEAL - Day 4
Bootcamp - Team TEAL - Day 4
 
Enrich Your Models With OCL
Enrich Your Models With OCLEnrich Your Models With OCL
Enrich Your Models With OCL
 
Bootcamp - Team TEAL - Day 3
Bootcamp - Team TEAL - Day 3Bootcamp - Team TEAL - Day 3
Bootcamp - Team TEAL - Day 3
 
Bootcamp - Team TEAL - Day 10
Bootcamp - Team TEAL - Day 10Bootcamp - Team TEAL - Day 10
Bootcamp - Team TEAL - Day 10
 
Bootcamp - Team TEAL - Day 7
Bootcamp - Team TEAL - Day 7Bootcamp - Team TEAL - Day 7
Bootcamp - Team TEAL - Day 7
 
OCL in EMF
OCL in EMFOCL in EMF
OCL in EMF
 
Mastering python lesson2
Mastering python lesson2Mastering python lesson2
Mastering python lesson2
 
Code Like Pythonista
Code Like PythonistaCode Like Pythonista
Code Like Pythonista
 
Writing tests
Writing testsWriting tests
Writing tests
 
Unit I Advanced Java Programming Course
Unit I   Advanced Java Programming CourseUnit I   Advanced Java Programming Course
Unit I Advanced Java Programming Course
 
Unit testing-patterns
Unit testing-patternsUnit testing-patterns
Unit testing-patterns
 
TDD step patterns
TDD step patternsTDD step patterns
TDD step patterns
 
Java tutorial PPT
Java tutorial PPTJava tutorial PPT
Java tutorial PPT
 
Java tutorial PPT
Java tutorial  PPTJava tutorial  PPT
Java tutorial PPT
 
Le Wagon Australia Workshop
Le Wagon Australia WorkshopLe Wagon Australia Workshop
Le Wagon Australia Workshop
 

Mais de 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 plans
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 Observations
Liz Rutledge
 
[THESIS] Final Presentation: GametimePLUS
[THESIS] Final Presentation: GametimePLUS[THESIS] Final Presentation: GametimePLUS
[THESIS] Final Presentation: GametimePLUS
Liz Rutledge
 
[THESIS] Midterm Presentation
[THESIS] Midterm Presentation[THESIS] Midterm Presentation
[THESIS] Midterm Presentation
Liz Rutledge
 
DT Outfitters | Designed Object Presentation
DT Outfitters | Designed Object PresentationDT Outfitters | Designed Object Presentation
DT Outfitters | Designed Object Presentation
Liz 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 Project
Liz Rutledge
 

Mais de Liz Rutledge (11)

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 9
Bootcamp - Team TEAL - Day 9Bootcamp - Team TEAL - Day 9
Bootcamp - Team TEAL - Day 9
 
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
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 

Bootcamp - Team TEAL - Day 6

  • 1. TEA M TEAL LIZ RUTLEDGE DAY 6 rutle173@newschool.edu August 8, 2011 esrutledge@gmail.com
  • 2. agenda. Review: Learn: ALL THE THINGS! FOR LOOPS! (i.e. anything you guys want me to (hoorayyyyyyyyyyy!) go over up until now) seriously though: you’re gonna thank me later. DAY 6 Tuesday, 8 Aug 2011 CODE bootcamp 2011
  • 3. homework now wasn’t that fun? displaying text homework: questions? let’s look at a few! review: displaying images making things move simple conditionals booleans anything else? DAY 6 Tuesday, 8 Aug 2011 CODE bootcamp 2011
  • 4. animation heading. best practices. the concepts. separating out direction and velocity to simplify your code the techniques and syntax. seriously, it’s just including more variables (dx/speedX vs directionX) ...and thinking in vectors. DAY 6 Tuesday, 8 Aug 2011 CODE bootcamp 2011
  • 5. for loops! hold on...this could get bumpy. the concept: a little bit of code to do the same thing lots of times. in english: hey Processing, can you draw 5 ellipses for me? in code: for (int i = 0; i < 5; i++) { ellipse(0, 0, 10, 10); } DAY 6 Tuesday, 8 Aug 2011 CODE bootcamp 2011
  • 6. nested if-statements. before: with nested if statements: if (test) { if (test) { if (test) { statements statements } } statements } example: if (x > 100) { example: if (x > 100) { // If x is greater than 100, ellipse(50, 50, 36, 36); if( X == 112) { } ellipse(50, 50, 36, 36); // draw this ellipse } else { ellipse(50, 90, 30, 30); // draw this ellipse } } else() { something else } DAY 6 Tuesday, 8 Aug 2011 CODE bootcamp 2011
  • 7. optional review. if we have time and you guys want it. from thursday: conditionals logical operators mathematical operators the “NOT” operator booleans from friday: crazy moving/bouncing stuff pseudocode/figuring out logic in general anything else? DAY 6 Tuesday, 8 Aug 2011 CODE bootcamp 2011
  • 8. if statements. heading. optional subheading goes here. 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 6 Tuesday, 8 Aug 2011 CODE bootcamp 2011
  • 9. if-else statements. heading. optional subheadingcomplexity. adding goes here. = 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 6 Tuesday, 8 Aug 2011 CODE bootcamp 2011
  • 10. conditionals! the tool that allows you to do anything of any actual interest... the operators: examples: > greater than println(3 > 5); // Prints what? >= greater than or equal to < less than println(5 >= 3); // Prints what? <= less than or equal to println(5 == 5); // Prints what? == equals println(5 != 5); // Prints what? != does NOT equal (hint: it’s either true or false!) what do they do? return a boolean value of whether or not the expression is in fact true DAY 6 Tuesday, 8 Aug 2011 CODE bootcamp 2011
  • 11. 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 6 Tuesday, 8 Aug 2011 CODE bootcamp 2011
  • 12. 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 6 Tuesday, 8 Aug 2011 CODE bootcamp 2011
  • 13. homework. due Tuesday August 9th. read: do: FORM + CODE: “Repeat” (pp 43-63) Make a parade of elements using for loops to create a bunch of things at once. Since (if you do this correctly) research: it isn’t any harder to do 1 or 1,000, I an interesting project that could be want there to be at least 20 objects. inspiration for your final project (or that is just totally baller in general) There doesn’t necessarily need to be post link to the project on the blog any collision detection or anything. Just and describe what interests you a bunch of objects toddling their way about it (just a couple sentences) along the screen, preferable in some kind of interesting way. DAY 6 Tuesday, 8 Aug 2011 CODE bootcamp 2011