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

JavaScript is Everywhere? Cool, let's try to level up programming.

febuiles
October 19, 2013

JavaScript is Everywhere? Cool, let's try to level up programming.

Dear jQuery plugin writer, say hello to three of my friends: abstraction, actors and functional programming.

Talk given at http://jsconf.co. Notes and more details about the talk can be found here: http://mheroin.com/jsconf/. Typography and colors were borrowed from Zach Holman's "If I Only Knew This Shit in College" (http://zachholman.com/talk/if-only-i-knew-this-shit-in-college/)

febuiles

October 19, 2013
Tweet

More Decks by febuiles

Other Decks in Technology

Transcript

  1. JAVASCRIPT IS EVERYWHERE?
    COOL, LET’S LEVEL UP PROGRAMMING
    FEDERICO BUILES
    @FEBUILES

    View Slide

  2. View Slide

  3. MOTIVATION

    View Slide

  4. Our capacity to create new
    things is limited by what our
    computers can do.

    View Slide

  5. What our computers can do is
    [only] limited by what we can
    tell them to do

    View Slide

  6. What we can tell them to do is
    limited by... us?

    View Slide

  7. bar charts, our effort vs.
    computer

    View Slide

  8. View Slide

  9. This protocol is what allows
    us to express ideas to the
    computer

    View Slide

  10. One part of this protocol are
    programming languages

    View Slide

  11. View Slide

  12. Having a better protocol
    allows us to create greater
    things

    View Slide

  13. JAVASCRIPT

    View Slide

  14. JAVASCRIPT IS EVERYWHERE

    View Slide

  15. JAVASCRIPT IS EVERYWHERE
    BROWSER

    View Slide

  16. JAVASCRIPT IS EVERYWHERE
    SERVERS

    View Slide

  17. JAVASCRIPT IS EVERYWHERE
    EDUCATION

    View Slide

  18. JAVASCRIPT IS EVERYWHERE
    ELECTRONICS

    View Slide

  19. EVERYWHERE IS JAVASCRIPT
    0_0

    View Slide

  20. TOMORROW’S LANGUAGES ARE
    DIRECTLY INFLUENCED BY THE
    LANGUAGES WE USE TODAY

    View Slide

  21. Mandatory cliché quote: “The best
    way to predict the future is to
    invent it."
    Alan Kay

    View Slide

  22. JavaScript is a mainstream
    language and it’ll affect the
    future of programming

    View Slide

  23. JavaScript is a mainstream
    language and it’ll affect the
    future of programming
    Let’s try to improve a bit.

    View Slide

  24. 3ABSTRACTION
    ACTORS
    FUNCTIONAL
    PROGRAMMING

    View Slide

  25. ACTORS
    FUNCTIONAL
    PROGRAMMING
    1ABSTRACTION

    View Slide

  26. [1] We Really Don’t Know How to
    Compute
    http://www.infoq.com/presentations/We-Really-Dont-Know-How-To-Compute
    [2] Up and Down the Ladder of
    Abstraction
    http://worrydream.com/LadderOfAbstraction/

    View Slide

  27. ABSTRACTION
    ACTORS
    FUNCTIONAL
    PROGRAMMING
    2

    View Slide

  28. “According to Carl Hewitt, unlike previous
    models of computation, the Actor model was
    inspired by physics including general relativity
    and quantum mechanics.”
    Wikipedia

    View Slide

  29. ACTOR
    SEND MESSAGES
    SPAWN ACTORS
    PREPARE FOR NEXT
    MESSAGE

    View Slide

  30. SEND MESSAGES
    SPAWN ACTORS
    PREPARE FOR NEXT
    MESSAGE
    ACTOR

    View Slide

  31. SEND MESSAGES
    SPAWN ACTORS
    PREPARE FOR NEXT
    MESSAGE
    ACTOR

    View Slide

  32. SEND MESSAGES
    SPAWN ACTORS
    PREPARE FOR NEXT
    MESSAGE
    ACTOR

    View Slide

  33. ACTOR
    SEND MESSAGES
    CREATE ACTORS
    PREPARE FOR NEXT
    MESSAGE
    CONCURRENTLY

    View Slide

  34. “This will take a
    while. I better
    spawn 10k agents
    and let the others
    know about them”

    View Slide

  35. “This will take a
    while. I better
    spawn 10k agents
    and let the others
    know about them”
    SEND MESSAGES
    CREATE ACTORS
    PREPARE FOR NEXT
    MESSAGE

    View Slide

  36. “This will take a
    while. I better
    spawn 10k agents
    and let the others
    know about them”
    SEND MESSAGES
    CREATE ACTORS
    PREPARE FOR NEXT
    MESSAGE

    View Slide

  37. “This will take a
    while. I better
    spawn 10k agents
    and let the others
    know about them”
    SEND MESSAGES
    CREATE ACTORS
    PREPARE FOR NEXT
    MESSAGE

    View Slide

  38. THE ACTOR DOES NOT KNOW
    WHO THE SENDER OF A
    MESSAGE WAS

    View Slide

  39. NOW YOU’RE FORCED INTO ASYNC.
    THE ACTOR DOES NOT KNOW
    WHO THE SENDER OF A
    MESSAGE WAS

    View Slide

  40. ACTOR
    IDENTIFIED BY AN ADDRESS

    View Slide

  41. View Slide

  42. [1] A Universal Modular ACTOR
    Formalism for Artificial Intelligence
    http://worrydream.com/refs/Hewitt-ActorModel.pdf
    [2] The Future of Programming
    http://worrydream.com/dbx/
    [3] Erlang & Scala

    View Slide

  43. ABSTRACTION
    ACTORS
    FUNCTIONAL
    PROGRAMMING
    3

    View Slide

  44. View Slide

  45. View Slide

  46. View Slide

  47. ;
    ;

    View Slide

  48. View Slide

  49. View Slide

  50. View Slide

  51. View Slide

  52. View Slide

  53. View Slide

  54. View Slide

  55. View Slide

  56. View Slide

  57. View Slide

  58. View Slide

  59. MAP/REDUCE

    View Slide

  60. MAP/REDUCE
    HADOOP

    View Slide

  61. MAP/REDUCE
    HADOOP
    BIG
    DATA!

    View Slide

  62. [1] Why Functional Programming
    Matters
    http://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.pdf
    [2] Functional JavaScript
    http://shop.oreilly.com/product/0636920028857.do
    [3] Underscore.js
    http://underscorejs.org/

    View Slide

  63. "Google uses Bayesian
    filtering the way Microsoft
    uses the if statement."
    Ex-Microsoft Employee ca. 2005

    View Slide

  64. http://mheroin.com/jsconf
    [email protected]
    @febuiles

    View Slide