Yale University School of Art
1156 Chapel Street, POB 208339
New Haven, Connecticut, 06520-8339
(203) 432-2600
ART 742B: NETWORKS & TRANSACTIONS: SPRING 2012

PDF icon

Syllabus
SEE ALSO:   SPRING 2011    SPRING 2010    SPRING 2009    SPRING 2008    SPRING 2007    ART 752A   


SCHEDULE AND SIGNUP FEBRUARY 6

  • 1:30–2:30 Lab
  • 2:30–3:00 Reading discussion

Individual meetings:

  • 3:15 Gina
  • 3:30 Rob
  • 3:45 Chris
  • 4:00 Martha
  • 4:15 Ghazaal
  • 4:30 Tiff
  • 4:45 Este
  • 5:00 ming
  • 5:15 Alex
  • 5:30 Min Hee
  • 5:45 Marina
  • 6:00 __Jang
  • 6:15 Grace
  • 6:30 __Suckzoo
  • 6:45 __Qiuye Liu
  • 7:00 Matthew
  • 7:15 __Eric
  • 7:30 __Cecilie
  • 7:45 Stefan
Last edited by: Dan Michaelson
Edit access: Sysop


READINGS

PDF icon

Week 1: Josef Albers

PDF icon

vs. Wim Cuyvers


PDF icon

Week 2: Thomas Pynchon

PDF icon

vs. Paul Elliman


PDF icon

Week 3: The weather according to Street View


PDF icon

Week 4: Chaos

PROJECTS

JUNCTION CRIT JANUARY 30

3:25–5:25

5:45–7:45

  • Alex: BlueTV
  • Christopher: Police report dog adoption
  • Grace: Trailer crosswords
  • Janghyun: Architectural practice closed, theory open
  • Matthew: Trade deficit receipts
  • Ming: Paper Skype tickers
  • Qiuye: Broccoli certificate
  • Rob: AdverPrinting and ShelterCard
  • Suckzoo: You must be going
Last edited by: Stefan Thorsteinsson
Edit access: Sysop

Last edited by: Dan Michaelson
Edit access: Sysop


LABS

January 30: Basic HTML and PHP
<!-- For more on HTML, try http://www.w3schools.com -->

<html>

    <head>
    
        <title>
            My first HTML page
        </title>
    
    </head>
    
    <body>
    
        <?php
        
            $my_input 
$_REQUEST['foo'];
        
            
$my_sum $my_input;
            
            
$my_product $my_sum;
            
            echo(
$my_product);            
        
        
?>    
    
        <p>
            My <em>first</em> <a href="suckzoo.html">paragraph</a>
        </p>
        
        <p>
            My second <a href="http://art.yale.edu">paragraph</a>
        </p>
        
        <img src="images/sun.jpg" />
        
        <p>
            More<br />text
        </p>
        
        <h1>
            A big header
        </h1>
        
        <ul>
            <li>
                Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 
            </li>
            <li>
                Item 2
            </li>
            <li>
                Item 3
            </li>
        </ul>
        
        <img src="http://art.yale.edu/image_columns/0000/4088/kippenberger_poster_test_486.gif?1327950077" />
        
    </body>

</html>
Last edited by: Dan Michaelson
Edit access: Designer, Sysop

February 6: Control structures
<html>

    <head>
        <title>
            Control Structures
        </title>
    </head>

    <body background="<?php echo($bgcolor?>">
    
        Hello world
        
        <?php


        
            
// =========================================
            // ====== GET REQUEST PARAMETERS ===========
            // =========================================

            // Get variables from ?mars=5&venus=8
            
$m $_REQUEST['mars']; // Get the mars parameter
            
$v $_REQUEST['venus']; // Get the venus parameter
            
            
echo("<br />Mars is $m and Venus is $v<br />");


            
            
// =========================================
            // ====== IF/ELSE CONTROL STRUCTURES =======
            // =========================================

            // If $m is greater than $v, then Mars wins
            
if ($m $v) {
                
// Execution only moves into this block
                // if $m > $v
                
echo("Mars wins!<br />");
                echo(
"Yahoo Mars!<br />");
                
                
// This condition will never even
                // be evaluated unless the enclosing
                // condition was true, because execution
                // would have never got here in the
                // first place.                
                
if ($m $v 5) {
                    echo(
"<i>By a lot!</i><br />");
                }
                
            }
            
// Otherwise Mars does not win
            
else {
                
// Execution only comes in here
                // if $m is NOT > $v
                
echo("Mars did not win.<br />");
            }
            
            
// This happens regardless of the if/else
            
echo("GAME OVER<br />");
            

            
// =========================================
            // ============ LOOPS ======================
            // =========================================

            // Set a new variable, $i, to 1.
            
$i 1;
            
            
// If $i <= 1000, do the code in this block
            // So this loop will happen 1000 times.
            
while ($i <= 1000) {
            
                echo(
"$v ");
                
                
// This loop will happen $v times
                // so we see 5 stars if Venus's score is 5,
                // 10 if Venus's score is 10
                
$j 1;
                while (
$j <= $v) {
                    echo(
'<span style="color: red;">*</span> ');
                    
$j $j 1;
                }
                
                
$i $i 1// Increase $i by 1
                // You could also say: $i += 1;
                // You could also say: $i++;
                            
            
// See if we should do it again.

            
            // "for" loop is a shorthand for "while"
            // Counter's initial value; condition; increase.
            
for ($x 1$x <= 50$x $x 1) {
            
                echo(
"$x &#9985;&nbsp;&nbsp;&nbsp;&nbsp; ");
            
            }
        
        
?>
    
    </body>
    
</html>
Last edited by: Dan Michaelson
Edit access: Designer, Sysop

February 13: The weather
<?php

$zip 
$_REQUEST["zip"];

$raw_xml file_get_contents("http://weather.yahooapis.com/forecastrss?p=$zip");

// Cheat a little
// This is because PHP's XML parser doesn't deal very easily
// with XML syntax such as "yweather:units". So just change all those to e.g. "units".
$raw_xml str_replace("yweather:"""$raw_xml);
$raw_xml str_replace("geo:"""$raw_xml);

// PARSE THE XML

// Get the root node
$xml = new SimpleXmlElement($raw_xml);

// Get the channel node within that
$channel $xml->channel;

// Get the location node within that
$location $channel->location;

// Get the city attribute of the location node
$city $location['city'];
$region $location['region'];

// Get the wind node and its attributes
$wind $channel->wind;
$chill $wind['chill'];
$direction $wind['direction'];
$speed $wind['speed'];

// Get the atmosphere node and its attributes
$atmosphere $channel->atmosphere;
$humidity $atmosphere['humidity'];
$visibility $atmosphere['visibility'];
$pressure $atmosphere['pressure'];
$rising $atmosphere['rising'];

// Get the item node within the channel node
$item $channel->item;

// Get the condition node within the item; and its attributes
$condition $item->condition;
$condition_text $condition['text'];
$condition_code $condition['code'];
$temp $condition['temp'];

// FUNCTION DEFINITIONS

function say_it_many_times($what$how_many) {
    for (
$i 0$i $how_many$i += 1) {
        echo(
$what);
        echo(
" ");
    }
}

// DO SOMETHING WITH THE DATA WE HAVE NOW

echo($city);
echo(
"<br />");

say_it_many_times($condition_text$speed);
            
?>

<img src="icon_<?= $condition_code ?>.png" />

<!-- Visibility: <?= $visibility ?> -->
<!-- Temperature: <?= $temp ?> -->
<!-- Condition code: <?= $condition_code ?> -->
Last edited by: Dan Michaelson
Edit access: Designer, Sysop