Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Let's Use More JavaScript, OK?

Let's Use More JavaScript, OK?

Presentation given at Penn State Web Conference in June 2014.

0953b75cd018be4c5bc5ebe973616df4?s=128

Jason Rhodes

June 10, 2014
Tweet

More Decks by Jason Rhodes

Other Decks in Programming

Transcript

  1. Let’s Use More JavaScript, OK?

  2. describe javascript in a few words? how would you

  3. None
  4. Wat @garybernhardt https://www.destroyallsoftware.com/talks/wat

  5. 1 + 3 ! => 4

  6. "hel" + "lo" ! => "hello"

  7. [] + [] ! => ""

  8. {} + {} ! => 0

  9. None
  10. typeof 5 ! => Number

  11. typeof "hello" ! => String

  12. typeof [1,2,3] ! => Object

  13. typeof [1,2,3] ! => Object

  14. typeof null ! => Object

  15. typeof null ! => Object

  16. None
  17. typeof NaN ! => Number

  18. typeof NaN ! => Number

  19. None
  20. None
  21. ! Got a question? ASK TWITTERS!

  22. None
  23. None
  24. JavaScript, the worst invention ever. –Bert Bos computer scientist former

    W3C chairman CSS Working Group
  25. None
  26. None
  27. The most brittle part of the stack is JavaScript. –Jeremy

    Keith web evangelist
  28. None
  29. None
  30. None
  31. None
  32. {{ JavaScript 18 other languages

  33. =

  34. ===

  35. Why?

  36. READY, SET, HISTORY

  37. ASSEMBLY

  38. None
  39. None
  40. FORTRAN Formula Translating System

  41. None
  42. FORTRAN code example

  43. COBOL Common Business Oriented Language

  44. COBOL “Hello World”

  45. The use of COBOL cripples the mind; its teaching should,

    therefore, be regarded as a criminal offense. “ –Edsger Dijkstra, 1975
  46. ALGOL Algorithmic Language

  47. ALGOL example code

  48. LISP List Processing

  49. LISP: the most intelligent way to misuse a computer. “

  50. C

  51. None
  52. A C program is like a fast dance on a

    newly waxed dance floor by people carrying razors. “ –Waldi Ravens
  53. FORTRAN COBOL BASIC ALGOL C LISP Simula Smalltalk C++, PHP,

    Objective-C, Java Ruby Scheme Self
  54. LIKEABILITY ADOPTION AVAILABILITY EASE OF USE Likeability doesn’t matter. 1.

  55. LIKEABILITY ADOPTION AVAILABILITY EASE OF USE Likeability doesn’t matter. 1.

  56. People hate JavaScript. (They should get over it.)

  57. ! 25 Scheme 27 Lisp 36 Smalltalk ! ?? ALGOL

  58. ! ☔️ 1 C 2 Java 3 PHP 5 C++

    25 Scheme 27 Lisp 36 Smalltalk ! ?? ALGOL
  59. JavaScript is everywhere. 2. Likeability doesn’t matter. 1.

  60. JavaScript is 2. Likeability doesn’t matter. 1. JavaScript is awesome.

    3.
  61. FUNCTIONS!!!

  62. FUNCTIONS!!!

  63. FUNCTIONS!!!

  64. FUNCTIONS!!!

  65. FUNCTIONS!!!

  66. FUNCTIONS!!!

  67. FUNCTIONS!!!

  68. Prototype Inheritance

  69. None
  70. None
  71. None
  72. 1 episode: 10 months 1 batch: 30 days Entire programming

    language: 10 days
  73. LiveScript

  74. LiveScript

  75. LiveScript Java

  76. JavaScript JScript

  77. European Computer Manufacturers Association (ECMA)

  78. JavaScript JScript ECMAScript

  79. ES1 (June 1997) ES2 (June 1998) ES3 (December 1999)

  80. DOM AND THE DARK YEARS OF THE DOM CSS 1

    XML RDF HTML 4.0
  81. Jesse James Garrett 2005

  82. None
  83. NOT BAD

  84. None
  85. None
  86. The first time you run $(’.foo’).fadeOut(), you feel like a

    god damn wizard. “ –Oscar Godson, jQuery Made Me Become A Programmer
  87. None
  88. None
  89. None
  90. None
  91. ES5

  92. ES5 Shim github.com/es-shims/es5-shim

  93. small reusable libraries

  94. … 451!

  95. None
  96. None
  97. None
  98. None
  99. None
  100. youtube.com/watch?v=ztspvPYybIY

  101. None
  102. None
  103. http://addyosmani.com/writing-modular-js/

  104. None
  105. myproject/ main.js

  106. myproject/ main.js sayHello.js

  107. None
  108. None
  109. FILE SCOPE sayHello.js

  110. FILE SCOPE sayHello.js

  111. main.js

  112. None
  113. None
  114. browserify main.js -o bundle.js $

  115. myproject/ main.js sayHello.js bundle.js

  116. None
  117. None
  118. None
  119. None
  120. None
  121. None
  122. Likeability doesn’t matter. 1.

  123. Likeability doesn’t matter. 1.

  124. JavaScript is everywhere. 2. Likeability doesn’t matter. 1.

  125. None
  126. None
  127. JavaScript is 2. Likeability doesn’t matter. 1. JavaScript is awesome.

    3.
  128. None
  129. None
  130. None
  131. None
  132. None
  133. Rate this talk! bit.ly/psuprogramming THANKS. Follow me/AMA twitter.com/rhodesjason