Share
Embed
Transcript
39 slides
-
The Path of Learning JS variables loops arrays objects prototype
mix-ins libraries DOM futures generators closures Beginner Expert with Monday, December 2, 13 -
The Ubiquity of JS web server hardware mobile games Monday,
December 2, 13 -
Teaching JS Online ACE editor + processingJS Talk-throughs Coding Challenges
http://khanacademy.org/cs Monday, December 2, 13 -
I’m surrounded by JS learners! 162,858 challenges completed 300,000 unique
programs created 2,600 Members 105 workshops in 2 years Monday, December 2, 13 -
Let’s Make JS Easier to Learn! Language Design → Debugging
→ Documentation Monday, December 2, 13 -
Language Usability Research http://www.cs.cmu.edu/~pane/cmu-cs-96-132.html (A sampling!) •Variables in math very
different from programming variables •Booleans different from natural language (e.g. inclusive-or vs. exclusive-or) •Arrays start at 0, people usually count from 1 •Variable names and keywords are case sensitive •= is often confused with == •123 is confused with “123” •Some variables are passed by reference, other by value •Having to put “break” in every switch statement causes errors •Unnecessary syntax: a++ and a+=1 http://www.cs.cmu.edu/~NatProg/OldMarch162007/langeval.html https://docs.google.com/document/d/1X_V5b0E4qKeSViZcTvpurLb67NfR5GzTUvnh2zZiaWg/edit?usp=sharing Usability issues for novice programmers: Monday, December 2, 13 -
JS Language Usability? • All of those issues were inherited
from other languages • JS usability itself is not well researched :-( http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.133.4831&rep=rep1&type=pdf Monday, December 2, 13 -
(How you can) Improve the language http://www.ecmascript.org/dev.php “Development of ECMAScript
standards is an open process, and we encourage public participation.” Monday, December 2, 13 -
JSHint on Khan Academy if (i == 0) { }
var i = 2; if (i == 0) { } errors warnings best practices var myName = “spaghetti Monday, December 2, 13 -
Improving JSHint messages rect(193,139,,30); Expected an identifier and instead saw
','. I thought you were going to type an identifier but you typed ‘,’! I think you meant to type a value or variable name before that comma? Original Conversational Specific + Actionable Monday, December 2, 13 -
rect(80, 70, 60, 240,); I thought you were going to
type an identifier but you typed )! → I think you either have an extra comma or a missing argument? var x = 5; x+x=1; Bad assignment! → The left side of an assignment must be a single variable name, not an expression. 140= 141 + 142; Bad assignment! text;() I thought you were going to type an assignment or function call but you typed an expression instead! More Newbie Syntax Errros Monday, December 2, 13 -
(How you can) Improve JSHint https://github.com/jshint/jshint/blob/2.x/src/messages.js •Improve messages •Add more
specific messages •Translate messages Monday, December 2, 13 -
More linting: “BabyHint” elipse(10, 10, 20, 30); spelling wrong arguments
ellipse(1, 1, 20, 30, 5); https://gist.github.com/pamelafox/7745401 Monday, December 2, 13 -
(How you can) Improve Linters https://github.com/nzakas/eslint Add babyhint functionality to
JSHint or ESLint? Monday, December 2, 13 -
The Browser “IDE” Why is hplogo a global var?? What
does undefined mean?? But I used the right method?! Monday, December 2, 13 -
(How you can) Improve Browsers http://www.chromium.org/developers http://codefirefox.org/ Patch the browser
itself Make a dev tool plugin http://developer.chrome.com/extensions/devtools.html http://blog.mozilla.org/addons/2009/01/28/how-to-develop-a-firefox-extension/ Write a blog post Monday, December 2, 13 -
(How you can) Improve the docs Mozilla Developer Network Just
click “Edit” W3schools Click “Report Error” Monday, December 2, 13 -
Let’s Make JS Easier to Learn! Language Design → Debugging
→ Documentation Monday, December 2, 13