mdst3705 2013-01-29-praxis

35
Code as Praxis Prof Alvarado MDST 3705 29 January 2013

Upload: rafael-alvarado

Post on 29-Nov-2014

380 views

Category:

Documents


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Mdst3705 2013-01-29-praxis

Code as Praxis

Prof AlvaradoMDST 3705

29 January 2013

Page 2: Mdst3705 2013-01-29-praxis

Business

• Please create Posts, not Comments• Quiz 1 to be posted next Tuesday• New materials on the site

– Requirements– Schedule later today

• Concerns about coding level– Media Studies– Computer Science

Page 3: Mdst3705 2013-01-29-praxis

Review

• Code, like language, both assumes a world and constructs worlds

• 10 PRINT showed this– Close reading of the line of code– The pattern that the code generated

• Word patterns (an example)– http://people.virginia.edu

/~rca2t/MDST3705/play/sara.php

• Another example is Conway’s Game of Life– Anyone heard of it?

Page 4: Mdst3705 2013-01-29-praxis

http://www.youtube.com/watch?v=XcuBvj0pw-E

CONWAY’S GAME OF LIFE

Page 5: Mdst3705 2013-01-29-praxis
Page 6: Mdst3705 2013-01-29-praxis

Very simple rules and structures

Complex and unpredictable results

An example of “emergence”

This is what Barricelli saw …

Page 7: Mdst3705 2013-01-29-praxis

Coding as Hacking

Page 8: Mdst3705 2013-01-29-praxis
Page 9: Mdst3705 2013-01-29-praxis

But first, what’s a hacker?

Page 10: Mdst3705 2013-01-29-praxis

http://www.merriam-webster.com/dictionary/hacker

Page 11: Mdst3705 2013-01-29-praxis

http://www.learnersdictionary.com/search/hacker

Page 12: Mdst3705 2013-01-29-praxis

How is hacking like painting?

Page 13: Mdst3705 2013-01-29-praxis

Hacking is a form of creation or building

The code itself

The effects of the code

Page 14: Mdst3705 2013-01-29-praxis

Are creativity and logic incompatible?

Page 15: Mdst3705 2013-01-29-praxis

Ginevra de Benci

Leonardo da Vincic. 1475

Page 16: Mdst3705 2013-01-29-praxis

What is the relationship between doing and knowing?

(Ramsay’s argument)

Page 17: Mdst3705 2013-01-29-praxis

According to Ramsay, scholars who write programs learn

something about knowledge and meaning that others do not

(He created a big stink in saying so.)

Page 18: Mdst3705 2013-01-29-praxis
Page 19: Mdst3705 2013-01-29-praxis

“Praxis,” which is German for practice, refers to a theory of

knowledge

This theory holds that only knowledge based in and oriented to action is

valid

Assocaited with Marxism, but also with American Pragmatism (Perice,

James, Dewey)

Page 20: Mdst3705 2013-01-29-praxis

How is hacking not like painting?

Page 21: Mdst3705 2013-01-29-praxis

Hackers and painters are also at odds …

Plato banished the poets (which included painters) in favor of

philosophers (whose descendants are computer scientists)

Page 22: Mdst3705 2013-01-29-praxis

Code and Plato’s Cave

Page 23: Mdst3705 2013-01-29-praxis
Page 24: Mdst3705 2013-01-29-praxis

Coding and painting, literally speaking, use different “parts” of the brain

e.g. Visual vs. Syntactic

People skilled at one are notusually skilled at the other

Page 25: Mdst3705 2013-01-29-praxis

The code reflects this division of labor

Good software is always the collaboration of “hackers” and

“painters”

Graham’s implicit point is that hackers and painters can get along because they both have a creator’s approach

to knowledge

Page 26: Mdst3705 2013-01-29-praxis
Page 27: Mdst3705 2013-01-29-praxis

} PAINTERS

} CODERS

Page 28: Mdst3705 2013-01-29-praxis

The nature and structure of programming languages reflects

this division of labor

Page 29: Mdst3705 2013-01-29-praxis

Code Review

Page 30: Mdst3705 2013-01-29-praxis

BASIC TEMPLATE FOR HTML

Page 31: Mdst3705 2013-01-29-praxis

HTML + CSS

Page 32: Mdst3705 2013-01-29-praxis

HTML + CSS + PHP

Page 33: Mdst3705 2013-01-29-praxis

PHP Values

• Strings are in quotes– $foo = “BAR”;– $foo = ‘BAR’;

• Double quotes mean you can put variables inside the string– $foo = “BAR $baz”;

• Numbers have no quotes• Booleans have no quotes

– true– false

Page 34: Mdst3705 2013-01-29-praxis

PHP Operators

• Numeric+ - / * %

• Strring. (the “dot” operator)

e.g. “This ” . “and that” = “This and that”

• Boolean&& || < > == != <= >=

and or xor

e.g. if ($x < $y) { … }

Page 35: Mdst3705 2013-01-29-praxis

Regarding Truth

• The “true” is that which has a positive or negative value

• The “false” is that which has a no value, other 0 or an empty string