Eric Roberts Professor of Computer Science Stanford University Google Atlanta October 1, 2010 Converting Java into JavaScript.

Slides:



Advertisements
Similar presentations
Conferences: Helping Students Advance Their Understandings Amanda Branscombe Taylor, J.A., Branscombe, N.A., Burcham J., & Land, L. (2011). Beyond Early.
Advertisements

Word List A.
Everything you need to know in order to set up your Reader’s Notebook
Java.  Java is an object-oriented programming language.  Java is important to us because Android programming uses Java.  However, Java is much more.
Start Let’s a r i o t s ur hing eading.
Computer Science II Recursion Professor: Evan Korth New York University.
Why Program? CSE111 – Great ideas in Computer Science Clearly programming fits here Programming is a Great Idea in Computer Science. It has allowed computers.
CS503: First Lecture, Fall 2008 Michael Barnathan.
The C++ Tracing Tutor: Visualizing Computer Program Behavior for Beginning Programming Courses Rika Yoshii Alastair Milne Computer Science Department California.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
Eric Roberts Department of Computer Science Stanford University CSIT Symposium Norfolk, Virginia March 6, 2004 Educating the Next Generation of Computer.
Advance wars Reveiw By Joshua Oziemski. Basic Information Title: Advance wars Developed by Intelligent Systems Published by Nintendo Genre: Turn based.
English Week 2012 Principal’s Sharing Learning English Effectively.
My English. Done by Olga Vasilchuk.. When I was 6 years old, I came to Hungary with my parents. I started learning English with my tutor before school.
Website Design. Designing and creating different elements involved in developing a website for e- commerce can help you identify and describe the components.
1 ENG236: Introduction (1) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
Introducing CLT While Avoiding Classroom Culture Shock Marla Yoshida.
Every week: Sign in at the door If you are new: Fill in Registration Form Ask a Mentor how to get started Make sure you are on the Athenry Parents/Kids.
n Introduction Introduction n Making a source list Making a source list Making a source list n Preparing a Works Cited list Preparing a Works Cited.
Classes and Class Libraries Examples and Hints November 9,
Step 2. Who are the Competitors? Internet Speculative Fiction Database-this site is the closest to my own. I plan to make something that is functionally.
The Writing Process My Favorite Things.
The Common Core Curriculum By Dean Berry, Ed. D. Gregg Berry, B.A.
This is what BC Students told us…
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
On Teaching Introductory Programming Abhiram Ranade.
Introducing CLT While Avoiding Classroom Culture Shock Marla Yoshida ACP TEFL Program UCI Extension International Programs.
Mathematics as a Second Language Mathematics as a Second Language Mathematics as a Second Language Developed by Herb Gross and Richard A. Medeiros © 2010.
Filmmaking The Director in the Classroom. Filmmaking Films begin with ideas. They evolve through Brainstorming Research Discussion.
Game Interface Design by Brent Fox
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 13: An Introduction to C++
Software Design 4.1 Tell, Don't Ask l Tell objects what you want them to do, do not ask questions about state, make a decision, then tell them what to.
1 2. Program Construction in Java Programming Fundamentals.
How Solvable Is Intelligence? A brief introduction to AI Dr. Richard Fox Department of Computer Science Northern Kentucky University.
Sample Video Game & Sound. The Plan 1.Game Theme 2.Game Structure 3.Sprites 4.Trackers 5.Collisions 6.Score 7.Levels 8.Splash Screens 9.Design 10.Implementation.
Bringing the power of SVG to a genome browser near you! Christopher T Lewis CMPT 856 – Presentation 1.
Using Alice in an introductory programming course for non-CS majors Adelaida A. Medlock Department of Computer Science Drexel University
DESIGN using your creative thinking The project is:
JavaScript Defined JavaScript Basics Definitions JavaScript is an object-oriented programming language designed for the world wide web. JavaScript code.
1 6th Workshop "SEERE", Ravda, September 2006 OOJava course materials – what happened during last year? M. Ivanovic, K. Bothe.
Copyright © 2012 MICS‘12 and Curt Hill Development Systems: A Review Curt Hill Professor of Math and Computer Science Valley City State University
Course Overview  What is AI?  What are the Major Challenges?  What are the Main Techniques?  Where are we failing, and why?  Step back and look at.
Getting the Interview: Make your Application Stand Out and Get Noticed Matthew Heiydt.
My Mission Statement To ensure students leave the course with an intermediate knowledge of general programming skills they can transfer to other platforms.
Presentation On HTML & Podcast Done by: Shamelia Young & Sheriece Williamson.
What is the Story Really About ? When you were younger, and it came time for revision, many of you probably took out a special colored pen and added in.
The problem that needs to be solved is if a computer career is for me.
Getting Started with HTML. HTML  Hyper Text Markup Language  HTML isn’t a program language, its known as a markup language  A Markup language has tags.
LECTURE 02: EVALUATING MODELS January 27, 2016 SDS 293 Machine Learning.
Animals: Where They Live and What They Need (Habitats) LeeAnne Walker 2 nd Grade Granite Elementary.
The Writing Process Week 2 Drafting. DRAFTING Drafting is the process of writing down ideas, organizing them into a sequence, and providing the reader.
MAKING FRIENDS WITH CANVAS AND WRITERS HELP An Introduction to what’ is possible.
HOW DO I STAND IN YOUR SHOES? ABC CHAMPION YEAR LESSON #6 PROJECT CORNERSTONE.
SE320: Introduction to Computer Games Week 3 Gazihan Alankus 10/4/20111.
The Anatomy of a Large-Scale Hypertextual Web Search Engine S. Brin and L. Page, Computer Networks and ISDN Systems, Vol. 30, No. 1-7, pages , April.
JavaScript Invented 1995 Steve, Tony & Sharon. A Scripting Language (A scripting language is a lightweight programming language that supports the writing.
Welcome to My Reading Recovery Lesson. Rereading Familiar Books In every lesson every day I get to read lots of little books. I get to pick some of my.
MAINTAINING PRODUCTIVITY 7 KEYS FOR SETTING REALISTIC GOALS.
Monte Vista’s. On Monte Vista’s webpage, click on the Reading Counts’ logo.
 Understand why schools ask students to give presentations.  Understand what makes a good presentation.  Learn about structuring a presentation. 
A Career in Computers Mahaksh Patel. Is a Career in Computers For Me? The problem to be solved is “Is a Career in Computers for me?” This question is.
Boğaziçi Ünv Koç Ünv Darüşşafaka Lisesi
Prototype. Prototype PROTOTYPE Understand the design space TO GAIN EMPATHY Build to think Test and refine solutions Inspire with your prototype.
Done Done Course Overview What is AI? What are the Major Challenges?
Application Development Theory
“Classroom” App Kelsy Power Edu 620.
Unit 6 part 3 Test Javascript Test.
What is Programming Language
Computer Science Kiosk
Presentation transcript:

Eric Roberts Professor of Computer Science Stanford University Google Atlanta October 1, 2010 Converting Java into JavaScript

What Got Me Started? Back in the 1990s, I was frustrated by the fact that—unlike the situation in most sciences—you can’t walk into your favorite bookstore and find a book about the great intellectual ideas in computer science. Walk into any bookstore, and you’ll see how to Teach Yourself Java in 7 Days alongside endless variations offering to teach Visual Basic, Windows, the Internet, and so on in a few days or hours. I did the following power search at Amazon.com: pubdate: after 1992 and title: days and (title: learn or title: teach yourself) and got back 248 hits. The first 78 were computer books (number 79 was Learn Bengali in 30 days). I replaced “days” with “hours” and got remarkably similar results: 253 more books, with 77 computer books followed by Teach Yourself Grammar and Style in 24 Hours at number 78. Out of the top 200 total, 96% were computer books. —Peter Norvig, “Learn Programming in Ten Years,” What is in the bookstore? Peter Norvig, Google’s Director of Research, tells the story better than anyone else:

Talking about Great Ideas In response, I started both teaching a course and developing a book on the theme of The Intellectual Excitement of Computer Science. Since that time, I have taught the course 12 times. I’m still working on the book. It was clear to me that such a book would be effective with a general audience only if readers could play with the ideas. To that end, I developed a simplified teaching language called MiniJava along with Java-based applets that let readers work with different machine models and algorithmic ideas, such as: −Karel the Robot −Babbage machines −Turing machines −The Enigma machine −Finite state machines −Various classic computer science games and algorithms

Writing Books in Internet Time Unfortunately, several of the design decisions in the book have proven to be less than ideal with the passage of time: −Java has proven to be difficult to use at the introductory level.

The March of Progress 266 pages 274 pages 911 pages 1536 pages A sobering thought: There are more public methods in the java and javax package hierarchies than there are words in Jensen and Wirth’s Pascal User Manual and Report. The amount of explanation once deemed sufficient to teach the standard introductory programming language is thus no longer sufficient for an index of the operations available today.

Writing Books in Internet Time Unfortunately, several of the design decisions in the book have proven to be less than ideal with the passage of time: −Java has proven to be difficult to use at the introductory level. −It was impossible to maintain the alignment between Java and MiniJava as Java evolved. −Java applets are no longer well supported in all browsers, having lost the battle for client-side programming to JavaScript. For a number of years—and four other books—I’ve been at something of an impasse in terms of knowing how to proceed. And then, on May 22,

The Inspiration

Divergent Views of the Impact

The Challenge I had all of these applets running in Java. PacMan had shown that the level of interactivity I needed was available in JavaScript. Would it be possible to translate the Java applets I had into JavaScript with minimal work? I looked at Google’s work in the area and decided that the learning curve might be too high. I decided it would be fun to sit down and see how close I could come without writing any difficult code. The bottom line: I was able to get my applets working by introducing some straightforward modifications to the Java code and then running those programs through what is essentially a sed -script translator.

The Easy Declarations (changing types to var ) Integer division ( 3 / 2 is 1.5 in JavaScript) Object and method syntax

The Tricky Inheritance Method overloading JavaScript’s broken iterator syntax for arrays

The Really Difficult The lack of threads and any mechanism for waiting Java packages that use that model My solution: Rewrite the Java programs to use a pure-event model that makes translation easy

Demo Time

The End