The Little JavaScripter


Dhaval Trivedi

Amazon


@dhavaltrivedi




Warnings




1. This talk will make

no sense.




2. This talk will hurt your feelings.




My resume




Knowledge






"Problems cannot be solved by

the same level of thinking

that created them."




Knowledge about knowledge








"Flow"

My method is different. I do not rush into actual work. When I get an idea I start at once building it up in my imagination. I change the construction, make improvements and operate the device in my mind. It is absolutely immaterial to me whether I run my turbine in thought or test it in my shop. I even note if it is out of balance. There is no difference whatever, the results are the same. In this way I am able to rapidly develop and perfect a conception without touching anything. When I have gone so far as to embody in the invention every possible improvement I can think of and see no fault anywhere, I put into concrete form this final product of my brain. Invariably my device works as I conceived that it should, and the experiment comes out exactly as I planned it. In twenty years there has not been a single exception. Why should it be otherwise? Engineering, electrical and mechanical, is positive in results. There is scarcely a subject that cannot be mathematically treated and the effects calculated or the results determined beforehand from the available theoretical and practical data. The carrying out into practice of a crude idea as is being generally done is, I hold, nothing but a waste of energy, money and time.

Feynman's 2nd Divorce



"He begins working calculus problems in his head as soon as he awakens. He did calculus while driving in his car, while sitting in the living room, and while lying in bed at night."




Hammock Driven

 Development




Not so uncommon




Visualization




"What you cannot visualize, cannot master."

- Dhaval Trivedi




How we code




Thinking/Visualizing

 Change




Thinking/Visualizing

Computation








Pure Functions





What is Lisp?

A programming language?




Which Paradigm?




A programmable,

programming language.




How?




Functions = Data




Coads = Data

(Example)




Macros

(Vim!)




Which Paradigm?





If you give someone Fortran, he has Fortran. If you give someone Lisp, he has any language he pleases. 

- Guy Steele




Preface




Muscle Memory

(Vim FTW!)



Being able to write what we want to do instead of how we do it

=

working at higher level of abstraction.















JavaScript




Java in Browser.



Lisp. 

In C's Clothing.






JavaScript has more in common with functional languages like 
Lisp or Scheme than with C or Java.






Examples




It's not about beautiful code.

It's about powerful code.




It's not about writing optimized code.

It's about writing optimizable code.

Side Effects of Functions with No Side 

Effects (pun intended)



  1. Testable
  2. Parallelisable
  3. Optimisable 
  4. Memoizable
  5. Phenomenal. Almost Magical.




Fun / Play



Programming is

 too serious an activity

 to be taken seriously.




Feynman on Play




Why’s poignant guide




Examples




Time for a song!




Be kind.










Thanks!

thelittlejavascripter3

By dytrivedi

thelittlejavascripter3

  • 2,468