4. someday you may be asked if youāre a god and as weāve learned from ghostbusters, you will want to
be able to say yes.
5. Make You A
GOD
The Evented Web
evented programming
6.
7.
8.
9.
10.
11.
12.
13. What are WebHooks?
Why should we all learn to program?
How do WebHooks foster programming?
14. 1
What are WebHooks?
event callbacks over the web. the design pattern or architecture of letting users receive
notiļ¬cations over http. itās not a spec or a protocol, itās more along the lines of ajax: just an
interesting way of doing things.
15. 1
What are WebHooks?
event callbacks over the web. the design pattern or architecture of letting users receive
notiļ¬cations over http. itās not a spec or a protocol, itās more along the lines of ajax: just an
interesting way of doing things.
16. command line: pipes. we talk about the equivalent of pipes on the web and people say RSS! and I say
nooo.... itās something else.
17. Input Output
Program
pipes are amazing in their simplicity. itās all from a bit of infrastructure involving input and output
18. STDIN STDOUT
Program
STDERR
stdin, stdout were available to reroute wherever the user wanted
most common use was chaining commands together: piping
feedback loop, which is the key to emergent systems
19. xargs
wget
echo
mail
grep
wc
cat
so you had all these simple little programs, that might not even be useful alone
20. cat
xargs
wget
echo
mail
grep
wc
string them together...
40. twitter.addWebHook('myupdate',
'http://example.com/eventhandler');
makes twitter an even more powerful platform than it is
41. MAILHOOKS
DEMO
letās see this in action. mailhooks was one of the ļ¬rst āadaptersā i built for the evented web.
42.
43. MORE DEMOS
(and then code)
create postbin, setup/show tender, pivotal tracker, twilio.
demo clickhooks with postbin and and then show the code.
http://2.latest.scriptletsapp.appspot.com/1w47Cs/run
44. webhooks are simple as you saw. their simplicity affords them to be used as a simple
building block in slightly more complex systems like pubsubhubbub.
how many have heard of pubsubhubbub? how many know what it does?
45. not time to play the video, i know brett is here and they talked about it.
basically real-time feeds using webhooks as the core mechanic.
46. not time to play the video, i know brett is here and they talked about it.
basically real-time feeds using webhooks as the core mechanic.
47. all these sites publish content with pubsubhubbub, meaning they all effectively have
webhooks for new content events... as a result, you can consume their content in realtime.
48. simple mechanics, if done right, yield rich, emergent dynamics.
the emergent system with webhooks is the evented web.
49. The Evented Web
(Programmable Web 2.0)
Event Triggers
(WebHooks)
Web APIs Handler Scripts
50. āIn computer programming, hooking is
a technique used to alter or augment the
behavior of [a program], often without
having access to its source code.ā
51.
52.
53. The Evented Web
(Programmable Web 2.0)
Event Triggers
(WebHooks)
Web APIs Handler Scripts
54. twitter.addWebHook('newfollower',
'http://example.com/eventhandler');
the idea is the handler is a URL... whatever. it doesnāt matter whats on the other end.
55. twitter.addEventListener('newfollower', function(event) {
var twitterUser = event.follower;
var friends = facebook.getFriendsNames();
if (twitterUser['name'] in friends) {
twitter.follow(twitterUser);
} else if (twitterUser['following'] > 1000 &&
twitterUser['followers'] < twitterUser['following'] / 2) {
twitter.block(twitterUser);
}
})
56. twitter.addEventListener('newfollower', function(event) {
var twitterUser = event.follower;
var friends = facebook.getFriendsNames();
if (twitterUser['name'] in friends) {
twitter.follow(twitterUser);
} else if (twitterUser['following'] > 1000 &&
twitterUser['followers'] < twitterUser['following'] / 2) {
twitter.block(twitterUser);
}
})
57. twitter.addWebHook('newfollower',
'http://example.com/eventhandler');
because its a url, because itās http ... you already know how to deļ¬ne it. itās a simple web app, or web
script.
58. love it, hate it... its everywhere. commodity hosting. compared to classical cgi and perl, it was
easy. no permissions or cgi-bins... just upload a ļ¬le with ftp.
59. love it, hate it... its everywhere. commodity hosting. compared to classical cgi and perl, it was
easy. no permissions or cgi-bins... just upload a ļ¬le with ftp.
60. love it, hate it... its everywhere. commodity hosting. compared to classical cgi and perl, it was
easy. no permissions or cgi-bins... just upload a ļ¬le with ftp.
61.
62. so i built scriptlets, which is basically that. use php, python, javascript to write simple little
scripts hosted in the cloud. write it, save it, get a url to run it. perfect for webhook handler
scripts.
64. hereās a script used with hookpress to add comment notiļ¬cations via notify.io to wordpress
65. this is the code i used for the clickhooks demo. you can see how simple it is, notify.io does
most of the work.
66. notify.io is a useful part of the ecosystem. it solves the notiļ¬cation part.
āhow do you get events to the desktop?ā pubsubhubbub for example
also a gateway drug for webhooks...
68. What are WebHooks?
The Evented Web blends our existing ecosystem of web APIs with event-driven programming,
creating a web that is both more programmable and real-time.
69. What are WebHooks?
Event callbacks over HTTP
enabling the Evented Web
The Evented Web blends our existing ecosystem of web APIs with event-driven programming,
creating a web that is both more programmable and real-time.
70. And so concludes the
technical portion of the talk.
Questions so far?
71. 2
Why should we all
learn to program?
so many passionate programmers that are so smart and inļ¬uential on society.
gates, jobs, zuckerberg...
exploration of thoughts on signiļ¬cance.
sidenote: programming == holistic programming, not just āsoftware engineeringā
72. āAs programming becomes more
important, it will leave the back room and
become a key skill and attribute of our top
intellectual and social classes, just as
reading and writing did in the past.ā
āMarc Prensky
programming is the new literacy. (rushkoffās talk)
i wanted to explore this idea further ...
74. Technology
==
Tools
anything useful created by the mind
75. think of a world without technology.
humans might not survive denied technology.
some might argue our evolution from prehuman to human was about
fully leveraging/developing our ability to create and work with technology
76.
77. we drove many major species into extinction and become the dominant species on earth... all
with just a little bit of basic technology.
78. The most powerful
force in the world.
kevin kelly concludes (among other things) that technology is the most powerful force int he
world.
79. powā¢er
capacity to cause change
best deļ¬nition of power. simple. more useful.
80. i like to say that a kid with a laptop can change the world.
what is it about the computer?
84. Imagination Compiler
Computing is the ultimate sandbox for our mind, allowing us to explore, model and even
execute whatever systems we can *imagine*, as long as we can ļ¬gure out how to express
them. This is programming.
85. donāt have time for this video, but itās the introduction to the MIT course Structure and
Interpretation of computer programs. Abelson goes over how computer science isnāt really a
science, maybe more engineering or art... he relates it to magic. he also says itās not about
the computer. itās fundamentally about formalizing intuitions about process. how to do
things.
86. donāt have time for this video, but itās the introduction to the MIT course Structure and
Interpretation of computer programs. Abelson goes over how computer science isnāt really a
science, maybe more engineering or art... he relates it to magic. he also says itās not about
the computer. itās fundamentally about formalizing intuitions about process. how to do
things.
88. Knowledge
well it turns out, process is the basis of knowledge. i could go on quite a while about
knowledge, but to keep things on track, weāll simplify it to this:
knowledge is basically a collection of validated models, allowing us to know how to do
things.
how-to is process.
89. Knowledge
==
Power
this now trite idea, ļ¬rst expressed by francis bacon... is something i had to revisit when i
deļ¬ned power as the capacity to cause change. because when framed like this itās obviously
more than a nice correlation: knowledge really *is* the capacity to cause change, therefore in
some way, they actually are quite synonymous.
90. Knowledge
==
Power
this now trite idea, ļ¬rst expressed by francis bacon... is something i had to revisit when i
deļ¬ned power as the capacity to cause change. because when framed like this itās obviously
more than a nice correlation: knowledge really *is* the capacity to cause change, therefore in
some way, they actually are quite synonymous.
91. Programming is the
language of power.
If knowledge is power, then programming is the language of power. Programming is the most
precise expression of how-to knowledge. You don't just program to express so much as you
program to run, to make happen.
92. Programming is about designing systems within the realm of computing, but as we trend
towards ubiquitous computing, the boundary of "computing" and the rest of our world will
start to disappear.
94. has been unraveling right in front of us.
abelson is right: itās not about the ācomputerā ... itās about something more.
not even the ānetworkā. iām not exactly sure what it is... but
95. Programmers are the
most potent technologists.
i would like to make this assertion. the industrial revolution was about mechanization. i think
software and automation are the new mechanization. only this time itās much greater --
software gives us more bang for buck in terms of change caused by effort. it was software
that allowed celebrity conan obrien to, with one click, change a personās life.
96. Technologists shape
humanity.
and i think its undeniable how inļ¬uential people are to society that can create and truly wield
technology.
but to bring it back to a little more concrete terms and where things are going:
97. The world is trending towards
becoming programmable
USA Today on CES: āYouāre going to be hard-pressed to ļ¬nd a new gadget or gizmo in 2010
that doesnāt also connect you to web services.ā Thatās just a step away from having apis and
hooks. Imagine a world where everything has an API and webhooks. Programmers can use it
all as building blocks, literally programming the world around them. Magic indeed.
100. Why should we all learn
to program?
āProgram or be programmed.ā
The world is becoming increasingly programmable.
The power of programming will eventually
outweigh any reason not to.
101. 3
How do WebHooks
foster programming?
obviously that kind of power, capacity to cause change, will be worthy of seeking out on its
own once it becomes more obvious. what do webhooks and the evented web have to
contribute? i think theyāll accelerate the process by making it more obvious, but thereās more.
103. āEducation is not the filling of a pail,
but the lighting of a fire.ā
āWilliam Butler Yeats
framed my idea of education.
inspiration and motivation are the real secrets to education.
teaching is just a means to facilitate learning; learning happens by the individual.
you need to inspire/convince the individual they want to learn ... and they will
104. āThe truth is that reading, writing, and
arithmetic only take about one hundred
hours to transmit as long as the audience is
eager and willing to learn.ā
āJohn Taylor Gatto
world renowned school teacher corroborates this idea.
105. ackoff: one of the greatest thinkers of the 20th century that you probably havenāt heard of.
greenberg: champion of the democratic school.
107. Village that not only didn't have access to computers, but didn't know English. Left the
computer there with CDs (no Internet) and came back 3 months later. An 8 and 12 year old
were playing a game on it and when they realized he had brought the machine, they said (in
English): "We need a faster processor and a better mouse."
108.
109.
110. āCreating content is not what's
important. What is important is
infrastructure and access.ā
āSugata Mitra
Montesorri
Natural language
Google.
taking this idea, and returning to programming...
111. how many of us started programming on something like these?
112. programming was almost unavoidable on them.
how many of you experience a noticeable physiological reaction to this screen?
113. Programming is discovered.
today, the closest thing is myspace: css hacks to pimp your proļ¬le.
but while this IS programming, itās doesnāt convey the POWER of programming
even though thereās automator on mac -- its sterile and limiting, pure utility.
myspace style programming has relevance, expression, and... view source
114. Programming is discovered.
today, the closest thing is myspace: css hacks to pimp your proļ¬le.
but while this IS programming, itās doesnāt convey the POWER of programming
even though thereās automator on mac -- its sterile and limiting, pure utility.
myspace style programming has relevance, expression, and... view source
115. excellent viewsourceposse panel (missed it). my quick idea:
view page source is a huge reason why there are so many web people (esp frontend)
browser as a sandbox to explore and learn.
unfortunately its not the cool stuff. itās not the stuff that changes the world.
116. twitter.addEventListener('newfollower', function(event) {
var twitterUser = event.follower;
var friends = facebook.getFriendsNames();
if (twitterUser['name'] in friends) {
twitter.follow(twitterUser);
} else if (twitterUser['following'] > 1000 &&
twitterUser['followers'] < twitterUser['following'] / 2) {
twitter.block(twitterUser);
}
})
evented web gives us a sandbox to play with code that actually DOES cool and important things that
are relevant to us. making the apps we use do more in a very personal and expressive way. the
possibility space is much larger, and the language is richer, so itās just begging for clever and creative
exploration...
117. How do WebHooks foster
programming?
it gives us a new sandbox to āplayā with our web applications together in new and useful
ways.
it provides the infrastructure to *just code* like on apple II or commodore. No dev environs,
nothing to install. building directly on the shoulders of giants to easily achieve cool, useful,
relevant āhacksā that I think would hook anybody on at least the idea of programming.
118. How do WebHooks foster
programming?
WebHooks and the Evented Web make
programming discoverable again
it gives us a new sandbox to āplayā with our web applications together in new and useful
ways.
it provides the infrastructure to *just code* like on apple II or commodore. No dev environs,
nothing to install. building directly on the shoulders of giants to easily achieve cool, useful,
relevant āhacksā that I think would hook anybody on at least the idea of programming.
119. and thatās how i think, in the long run, webhooks and the evented web will help make us all gods with
the ability to *program* the world around us.