media computation in python - virginia techsofia.cs.vt.edu/cta-mediacomp/presentation.pdfjes (jython...
TRANSCRIPT
![Page 1: Media Computation in Python - Virginia Techsofia.cs.vt.edu/cta-mediacomp/presentation.pdfJES (Jython Environment for Students) Developed by Mark Guzdial and Barbara Ericson at Georgia](https://reader036.vdocuments.us/reader036/viewer/2022070221/6138d4b00ad5d206764980ad/html5/thumbnails/1.jpg)
Media Computation in PythonTony AllevatoVirginia Tech
![Page 2: Media Computation in Python - Virginia Techsofia.cs.vt.edu/cta-mediacomp/presentation.pdfJES (Jython Environment for Students) Developed by Mark Guzdial and Barbara Ericson at Georgia](https://reader036.vdocuments.us/reader036/viewer/2022070221/6138d4b00ad5d206764980ad/html5/thumbnails/2.jpg)
Motivation
What is media computation?
Who are we trying to reach?
Why do this instead of a “traditional” introductory CS approach?
![Page 3: Media Computation in Python - Virginia Techsofia.cs.vt.edu/cta-mediacomp/presentation.pdfJES (Jython Environment for Students) Developed by Mark Guzdial and Barbara Ericson at Georgia](https://reader036.vdocuments.us/reader036/viewer/2022070221/6138d4b00ad5d206764980ad/html5/thumbnails/3.jpg)
Paradigm
Focus is procedural rather than object-oriented
Usually getRed(pixel) instead of pixel.getRed()
However, object-oriented style is still available
So whether you’re objects-early or objects-late, media computation can work for you
![Page 4: Media Computation in Python - Virginia Techsofia.cs.vt.edu/cta-mediacomp/presentation.pdfJES (Jython Environment for Students) Developed by Mark Guzdial and Barbara Ericson at Georgia](https://reader036.vdocuments.us/reader036/viewer/2022070221/6138d4b00ad5d206764980ad/html5/thumbnails/4.jpg)
Main TopicsArithmetic expressions
Variables
Conditional statements
Basic lists
Functional decomposition
Loops
Collection-basedfor value in list
Count-basedfor i in range(...)
Simple and nested
![Page 5: Media Computation in Python - Virginia Techsofia.cs.vt.edu/cta-mediacomp/presentation.pdfJES (Jython Environment for Students) Developed by Mark Guzdial and Barbara Ericson at Georgia](https://reader036.vdocuments.us/reader036/viewer/2022070221/6138d4b00ad5d206764980ad/html5/thumbnails/5.jpg)
What’s Missing?
Dictionaries
Condition-based loops
String manipulation
File input/output
Some Python concepts have weaker coverage or “don’t fit”
![Page 6: Media Computation in Python - Virginia Techsofia.cs.vt.edu/cta-mediacomp/presentation.pdfJES (Jython Environment for Students) Developed by Mark Guzdial and Barbara Ericson at Georgia](https://reader036.vdocuments.us/reader036/viewer/2022070221/6138d4b00ad5d206764980ad/html5/thumbnails/6.jpg)
Environments
![Page 7: Media Computation in Python - Virginia Techsofia.cs.vt.edu/cta-mediacomp/presentation.pdfJES (Jython Environment for Students) Developed by Mark Guzdial and Barbara Ericson at Georgia](https://reader036.vdocuments.us/reader036/viewer/2022070221/6138d4b00ad5d206764980ad/html5/thumbnails/7.jpg)
The DilemmaThere is no native Python distribution that
Can manipulate modern image/sound formats out of the box...
...and is cross-platform...
...and has an IDE suitable for absolute beginners...
...and is easy to install and configure
So, what are our options?
![Page 8: Media Computation in Python - Virginia Techsofia.cs.vt.edu/cta-mediacomp/presentation.pdfJES (Jython Environment for Students) Developed by Mark Guzdial and Barbara Ericson at Georgia](https://reader036.vdocuments.us/reader036/viewer/2022070221/6138d4b00ad5d206764980ad/html5/thumbnails/8.jpg)
JES (Jython Environment for Students)
Developed by Mark Guzdial and Barbara Ericson at Georgia Tech
Runs on Jython (Python using the Java JVM)
We get Java’s image/sound processing for free
Java is cross-platform
Custom student-oriented IDE written in Java
Most people have Java installed already
![Page 9: Media Computation in Python - Virginia Techsofia.cs.vt.edu/cta-mediacomp/presentation.pdfJES (Jython Environment for Students) Developed by Mark Guzdial and Barbara Ericson at Georgia](https://reader036.vdocuments.us/reader036/viewer/2022070221/6138d4b00ad5d206764980ad/html5/thumbnails/9.jpg)
Pythy: Online IDE for Python
Developed by Tony Allevato and Stephen Edwards at Virginia Tech
Web-based IDE, runs entirely in the browser
No installation — just log in, find your course, and get started
Previewing an early version for you today — keep an eye out at SIGCSE and ITiSCE for more
![Page 10: Media Computation in Python - Virginia Techsofia.cs.vt.edu/cta-mediacomp/presentation.pdfJES (Jython Environment for Students) Developed by Mark Guzdial and Barbara Ericson at Georgia](https://reader036.vdocuments.us/reader036/viewer/2022070221/6138d4b00ad5d206764980ad/html5/thumbnails/10.jpg)
Pythy FeaturesTranslates Python code to Javascript to run entirely client-side (Skulpt)
Automatically saves all code in Git repositories on the server — no risk of data loss
Students can manage their own media files to use on assignments
“Examples” support live-push to student browsers forin-class coding
Automated grading using Python unit tests
![Page 11: Media Computation in Python - Virginia Techsofia.cs.vt.edu/cta-mediacomp/presentation.pdfJES (Jython Environment for Students) Developed by Mark Guzdial and Barbara Ericson at Georgia](https://reader036.vdocuments.us/reader036/viewer/2022070221/6138d4b00ad5d206764980ad/html5/thumbnails/11.jpg)
Examples
![Page 12: Media Computation in Python - Virginia Techsofia.cs.vt.edu/cta-mediacomp/presentation.pdfJES (Jython Environment for Students) Developed by Mark Guzdial and Barbara Ericson at Georgia](https://reader036.vdocuments.us/reader036/viewer/2022070221/6138d4b00ad5d206764980ad/html5/thumbnails/12.jpg)
Getting StartedGo to https://pythy.cs.vt.edu
Create an account
Choose JMU CS Academy as your organization
Choose Summer I 2013 as your term
Click Enroll for the June 25 section of Media Comp
Untested in IE. Chrome, Safari, Firefox preferred.
![Page 13: Media Computation in Python - Virginia Techsofia.cs.vt.edu/cta-mediacomp/presentation.pdfJES (Jython Environment for Students) Developed by Mark Guzdial and Barbara Ericson at Georgia](https://reader036.vdocuments.us/reader036/viewer/2022070221/6138d4b00ad5d206764980ad/html5/thumbnails/13.jpg)
Examples
Image Processing
Basic image filters
Steganography
Creating charts from drawing primitives
Sound processing
Guitar string synthesis