Web directions code 13 notes
-
Upload
jaredau -
Category
Technology
-
view
278 -
download
3
description
Transcript of Web directions code 13 notes
![Page 1: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/1.jpg)
See the tries for the trees
http://www.flickr.com/photos/zoer/2363020211/
Tuesday, 7 May 13
![Page 2: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/2.jpg)
3Tuesday, 7 May 13
![Page 3: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/3.jpg)
Tuesday, 7 May 13
![Page 4: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/4.jpg)
Add fast moving imagesTuesday, 7 May 13
![Page 5: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/5.jpg)
Tuesday, 7 May 13
Halo effect
![Page 6: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/6.jpg)
1861
Tuesday, 7 May 13“A general “law of least effort” applies to cognitive as well as physicalexertion. The law asserts that if there are several ways of achieving thesame goal, people will eventually gravitate to the least demanding courseof action. In the economy of action, effort is a cost, and the acquisition ofskill is driven by the balance of benefits and costs. Laziness is built deep into our nature.”
![Page 7: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/7.jpg)
Tuesday, 7 May 13
Personal experienceNegative experienceFundamental attribution error
![Page 8: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/8.jpg)
Tuesday, 7 May 13
![Page 9: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/9.jpg)
Moore’s lawTuesday, 7 May 13
every 2 years the number of transistors increasesThis has also mapped to hard drives and clock speed.
![Page 10: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/10.jpg)
2008
Tuesday, 7 May 13
![Page 11: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/11.jpg)
2008
2011
412 Hz 1 GHzDual-Core
Tuesday, 7 May 13
![Page 12: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/12.jpg)
Wirth’s lawTuesday, 7 May 13
![Page 13: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/13.jpg)
Wirth’s lawGate’s law
Tuesday, 7 May 13
![Page 14: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/14.jpg)
Wirth’s lawGate’s lawMay’s law
Tuesday, 7 May 13
![Page 15: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/15.jpg)
Wirth’s lawGate’s lawMay’s lawPage’s law
Tuesday, 7 May 13
![Page 16: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/16.jpg)
Offset Moore’s lawTuesday, 7 May 13 "software is getting slower more rapidly than hardware becomes faster." this was said in 1995 the year java was released.
![Page 17: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/17.jpg)
JS’s moore law?Tuesday, 7 May 13
As javascript get engines get faster, developers will increase double the size of their libraries every 2 years.This is 2010 to 2013, so it almost lines up.
![Page 18: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/18.jpg)
More complex?Tuesday, 7 May 13
![Page 19: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/19.jpg)
http://upload.wikimedia.org/wikipedia/commons/5/52/Pdp7-oslo-2005.jpeg
Tuesday, 7 May 13
Peter Samson
200 kilohertz
16K
![Page 20: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/20.jpg)
Well, Why?Tuesday, 7 May 13
![Page 21: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/21.jpg)
Constraints drive creativity
Tuesday, 7 May 13
![Page 22: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/22.jpg)
The Somebody Else's Problem Field is a field running on the principle that if something is identified to be somebody else's problem, the brain will edit it out of the person's vision. - Adams
Tuesday, 7 May 13
We have invented phrases that our somebody elses problem’
Ship it. premature optimization...
![Page 23: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/23.jpg)
Back to basicsTuesday, 7 May 13
![Page 24: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/24.jpg)
$(“#selector”);
Tuesday, 7 May 13
![Page 25: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/25.jpg)
BigO
Tuesday, 7 May 13
![Page 26: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/26.jpg)
O(n)Tuesday, 7 May 13
![Page 27: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/27.jpg)
654321 1110987
Tuesday, 7 May 13
![Page 28: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/28.jpg)
654321 1110987
Tuesday, 7 May 13
![Page 29: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/29.jpg)
O(1)Tuesday, 7 May 13
![Page 30: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/30.jpg)
654321 1110987
Tuesday, 7 May 13
![Page 31: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/31.jpg)
654321 1110987
Tuesday, 7 May 13
![Page 32: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/32.jpg)
O(n^2)Tuesday, 7 May 13
![Page 33: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/33.jpg)
654321 1110987
654321 1110987
Tuesday, 7 May 13
![Page 34: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/34.jpg)
654321 1110987
654321 1110987
Tuesday, 7 May 13
![Page 35: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/35.jpg)
O(logn)Tuesday, 7 May 13
![Page 36: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/36.jpg)
10
Tuesday, 7 May 13
![Page 37: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/37.jpg)
104
Tuesday, 7 May 13
![Page 38: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/38.jpg)
104
Tuesday, 7 May 13
![Page 39: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/39.jpg)
10
4
Tuesday, 7 May 13
![Page 40: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/40.jpg)
10
4
15
Tuesday, 7 May 13
![Page 41: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/41.jpg)
10
4
15
Tuesday, 7 May 13
![Page 42: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/42.jpg)
10
4 15
Tuesday, 7 May 13
![Page 43: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/43.jpg)
10
4 15
2 5 11 25
Tuesday, 7 May 13
![Page 44: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/44.jpg)
104
D Y
4O 4N
T A
Tuesday, 7 May 13
o(K) complexity based on lenght of key, not the data. Kind of neat.
![Page 45: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/45.jpg)
O(n log n)
Tuesday, 7 May 13
similar to o n log n but every time we half the work, we need to iterate through a constant.
![Page 46: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/46.jpg)
FunctionalTuesday, 7 May 13
![Page 47: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/47.jpg)
FunctionalTuesday, 7 May 13
![Page 48: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/48.jpg)
Not function()alTuesday, 7 May 13
![Page 49: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/49.jpg)
Tuesday, 7 May 13
![Page 50: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/50.jpg)
Tuesday, 7 May 13
![Page 51: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/51.jpg)
λx.x
Tuesday, 7 May 13
![Page 52: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/52.jpg)
(λx.x) y
Tuesday, 7 May 13
![Page 53: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/53.jpg)
(λx.x) 5
Tuesday, 7 May 13
![Page 54: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/54.jpg)
(λx.x) 5
Tuesday, 7 May 13
![Page 55: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/55.jpg)
5
Tuesday, 7 May 13
![Page 56: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/56.jpg)
Maths is not programming!
Tuesday, 7 May 13
![Page 57: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/57.jpg)
Lambda { |x| x }x => x
Tuesday, 7 May 13
![Page 58: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/58.jpg)
λx. λy .( x + y)
Tuesday, 7 May 13
![Page 59: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/59.jpg)
λy .( 5 + y)
Tuesday, 7 May 13
![Page 60: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/60.jpg)
First class functions!
Tuesday, 7 May 13
![Page 61: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/61.jpg)
function(x) { function(y) { return x + y; }}
Tuesday, 7 May 13
![Page 62: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/62.jpg)
1930
Tuesday, 7 May 13
![Page 63: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/63.jpg)
1975
Tuesday, 7 May 13
Although it was written in some academic papers earlier.
![Page 64: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/64.jpg)
(define (add a) (lambda (b) (+ a b)))
Tuesday, 7 May 13
![Page 65: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/65.jpg)
Side effectsTuesday, 7 May 13
![Page 66: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/66.jpg)
(λx.x) 5
Tuesday, 7 May 13
![Page 67: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/67.jpg)
x => 5
Tuesday, 7 May 13
![Page 68: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/68.jpg)
Referential transparency
Tuesday, 7 May 13
Was actually a term phrased by a philisopher quine.
1960
![Page 69: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/69.jpg)
Change reference. Same context.
Tuesday, 7 May 13
![Page 70: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/70.jpg)
I drank some delicious <>
Tuesday, 7 May 13
![Page 71: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/71.jpg)
I drank some delicious alcohol from scotland.
Tuesday, 7 May 13
![Page 72: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/72.jpg)
I drank some delicious scotch.
Tuesday, 7 May 13
![Page 73: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/73.jpg)
function id(x) { return x;}
Tuesday, 7 May 13
![Page 74: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/74.jpg)
10 + id(5);
Tuesday, 7 May 13
![Page 75: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/75.jpg)
10 + 5;
Tuesday, 7 May 13
![Page 76: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/76.jpg)
function id(x) { y = 30; updateDB(y,x); return x;}
Tuesday, 7 May 13
![Page 77: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/77.jpg)
Sanity
Tuesday, 7 May 13
![Page 78: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/78.jpg)
Higher order programming
Tuesday, 7 May 13
![Page 79: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/79.jpg)
Map
Tuesday, 7 May 13
![Page 80: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/80.jpg)
[-60, -10, -20].map(Math.abs)[-60, -10, -20].map(Math.abs)
[60, 10, 20]
Tuesday, 7 May 13
![Page 81: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/81.jpg)
Filter
Tuesday, 7 May 13
![Page 82: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/82.jpg)
[-60, 10, -20].filter(function(x) { return x > 0});
[10]
Tuesday, 7 May 13
![Page 83: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/83.jpg)
Reduce
Tuesday, 7 May 13
![Page 84: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/84.jpg)
[10, 20,30] .reduce(function(seed, x) { return seed + x }, 0);
60
Tuesday, 7 May 13
![Page 85: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/85.jpg)
1 2 3 4
f(0, 1)
0+1
Tuesday, 7 May 13
![Page 86: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/86.jpg)
1 2 3 4
f(1, 2)
1+2
Tuesday, 7 May 13
![Page 87: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/87.jpg)
1 2 3 4
f(3, 3)
3+3
Tuesday, 7 May 13
![Page 88: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/88.jpg)
1 2 3 4
f(6, 4)
6+4
Tuesday, 7 May 13
![Page 89: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/89.jpg)
Tuesday, 7 May 13December, 2004.
Jeffrey Dean
Jeff Dean puts his pants on one leg at a time, but if he had more legs, you would see that his approach is O(log n).
![Page 90: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/90.jpg)
interface Func<A, B> {
B apply(A x);}
Tuesday, 7 May 13
![Page 91: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/91.jpg)
b = 1;
new Func<Integer, Integer>() {public Integer apply(Integer x) { return x + b; }}
Tuesday, 7 May 13
![Page 92: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/92.jpg)
Syntax mattersTuesday, 7 May 13
![Page 93: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/93.jpg)
Abstract conceptTuesday, 7 May 13
![Page 94: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/94.jpg)
Higher higher order programming
Tuesday, 7 May 13
![Page 95: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/95.jpg)
MonadsTuesday, 7 May 13
![Page 96: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/96.jpg)
s/Maybe/MaybeMonadTuesday, 7 May 13
![Page 97: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/97.jpg)
Chain = bind
>>=
Tuesday, 7 May 13
![Page 98: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/98.jpg)
Of = return
Tuesday, 7 May 13
![Page 99: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/99.jpg)
3 Laws.
Tuesday, 7 May 13
![Page 100: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/100.jpg)
Standards +Academia +Javascript =
Tuesday, 7 May 13
![Page 101: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/101.jpg)
Tuesday, 7 May 13
![Page 102: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/102.jpg)
Fantasy landTuesday, 7 May 13
It was so named after the infamous bug 94 on the promises spec
Dealing with null.
![Page 103: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/103.jpg)
Free.Tuesday, 7 May 13
By adhering to these specs we start go get some things for free.For example in my previous maybe example i wrote map. We don’t actually have to do that. It can be implmented for us. Same with a whole host of functions Lift for example which takes a function and runs it in the monadic context.Again we don’t have to worry about writing any of this, we get it for free.
We get assurances to an extent that these operations will run. Regardless of where or what the monad is dealing with.Just freedom. Is this not the idea of the lazy developer and comforms to DRY, LRU etc etc etc
Unfortuantly we can not get 100% assurance if we were to do this, we would need to rely on another concept from the early computer science days...
![Page 104: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/104.jpg)
Types
Tuesday, 7 May 13
Types can take this concept even further.We don’t have to worry about people doing stupid things with our code as we can remove this ability for them
![Page 105: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/105.jpg)
Still need tests
Tuesday, 7 May 13
![Page 106: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/106.jpg)
Tests are slow
Tuesday, 7 May 13
![Page 107: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/107.jpg)
Just less
Tuesday, 7 May 13
![Page 108: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/108.jpg)
Javascript is untypedTuesday, 7 May 13
![Page 109: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/109.jpg)
Sort ofTuesday, 7 May 13
![Page 110: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/110.jpg)
1 TypeTuesday, 7 May 13
![Page 111: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/111.jpg)
Value Tuesday, 7 May 13
![Page 112: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/112.jpg)
A type system is a tractable syntacticmethod for proving the absence of certainprogram behaviors by classifying phrases
according to the kinds of values theycompute.
Tuesday, 7 May 13
![Page 113: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/113.jpg)
A type system is a tractable syntacticmethod for proving the absence of certainprogram behaviors by classifying phrases
according to the kinds of values theycompute.
Tuesday, 7 May 13
tractable easy to control
![Page 114: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/114.jpg)
A type system is a tractable syntacticmethod for proving the absence of certainprogram behaviors by classifying phrases
according to the kinds of values theycompute.
Tuesday, 7 May 13
![Page 115: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/115.jpg)
15 + 5
Tuesday, 7 May 13
![Page 116: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/116.jpg)
a -> a
Tuesday, 7 May 13
![Page 117: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/117.jpg)
a -> a -> a
Tuesday, 7 May 13
![Page 118: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/118.jpg)
string -> string
Tuesday, 7 May 13
![Page 119: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/119.jpg)
function(string) { return string;}
Tuesday, 7 May 13
![Page 120: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/120.jpg)
[a] -> a
Tuesday, 7 May 13
![Page 121: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/121.jpg)
[string] -> string
Tuesday, 7 May 13
![Page 122: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/122.jpg)
Sanity
Tuesday, 7 May 13
![Page 123: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/123.jpg)
function add(a,b) { return a + b;}
Tuesday, 7 May 13
![Page 124: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/124.jpg)
add(1,2)
Tuesday, 7 May 13
![Page 125: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/125.jpg)
Tuesday, 7 May 13
![Page 126: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/126.jpg)
add(“1”,2)
Tuesday, 7 May 13
![Page 127: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/127.jpg)
Tuesday, 7 May 13
![Page 128: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/128.jpg)
REX.W movq rax,[rbp+0x18] test al,0x1
+JS
Tuesday, 7 May 13
![Page 129: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/129.jpg)
ASM.JS
Tuesday, 7 May 13
![Page 130: Web directions code 13 notes](https://reader034.fdocuments.in/reader034/viewer/2022052321/5554ade5b4c905fd608b538d/html5/thumbnails/130.jpg)
Tuesday, 7 May 13