A static site generator
should be your next
language learning project
john sj anderson | @genehack | ! seagl 2017
why&how2learn — SeaGL 2017 — @genehack 1
hi, i’m
john.
a/k/a @genehack
why&how2learn — SeaGL 2017 — @genehack 2
vp, technology
infinity
interactive
why&how2learn — SeaGL 2017 — @genehack 3
ex-biologist
perl tribe
polyglot coder
why&how2learn — SeaGL 2017 — @genehack 4
a static site generator
should be your next
language learning project
why&how2learn — SeaGL 2017 — @genehack 5
the why and the how of
learning
a new programming language
why&how2learn — SeaGL 2017 — @genehack 6
premise:
lifelong
learning
is critical.
why&how2learn — SeaGL 2017 — @genehack 7
the only constant thing is people
telling you over and over that
the only constant thing is
change.
why&how2learn — SeaGL 2017 — @genehack 8
“Learn at least one
new language
every year.”
— David Thomas & Andrew Hunt, “The Pragmatic Programmer”, 1999
why&how2learn — SeaGL 2017 — @genehack 9
“Learn at least one
new JavaScript framework
every month”
— Me, This Talk, Right Now.
why&how2learn — SeaGL 2017 — @genehack 10
some of the languages i’ve “learned”
basic
pascal
applescript
why&how2learn — SeaGL 2017 — @genehack 11
some of the languages i’ve “learned”
perl
ruby
python
why&how2learn — SeaGL 2017 — @genehack 12
some of the languages i’ve “learned”
javascript
php
cwhy&how2learn — SeaGL 2017 — @genehack 13
some of the languages i’ve “learned”
lisp
clojure
scalawhy&how2learn — SeaGL 2017 — @genehack 14
some of the languages i’ve “learned”
node
swift
c♯why&how2learn — SeaGL 2017 — @genehack 15
how do you
learn a
language?
why&how2learn — SeaGL 2017 — @genehack 16
read
books and docs
why&how2learn — SeaGL 2017 — @genehack 17
dopractice exercises
why&how2learn — SeaGL 2017 — @genehack 18
learning
projects
why&how2learn — SeaGL 2017 — @genehack 19
my language learning project of choice:
static site
generatorswhy&how2learn — SeaGL 2017 — @genehack 20
whatis a static site generator?
why&how2learn — SeaGL 2017 — @genehack 21
ssgwhy&how2learn — SeaGL 2017 — @genehack 22
some inputs
➡
a websitewhy&how2learn — SeaGL 2017 — @genehack 23
nodatabase!
why&how2learn — SeaGL 2017 — @genehack 24
can be very
simple
why&how2learn — SeaGL 2017 — @genehack 25
why&how2learn — SeaGL 2017 — @genehack 26
single
pagewhy&how2learn — SeaGL 2017 — @genehack 27
part of a larger
sitewhy&how2learn — SeaGL 2017 — @genehack 28
regenerated
every day
why&how2learn — SeaGL 2017 — @genehack 29
wrote ~10-15
years ago
why&how2learn — SeaGL 2017 — @genehack 30
or can be
kinda
complicated
why&how2learn — SeaGL 2017 — @genehack 31
why&how2learn — SeaGL 2017 — @genehack 32
company
sitewhy&how2learn — SeaGL 2017 — @genehack 33
weblog
with tags, archive, et cetera
why&how2learn — SeaGL 2017 — @genehack 34
so why are
ssgs great for
learning?
why&how2learn — SeaGL 2017 — @genehack 35
iterative
& incremental
why&how2learn — SeaGL 2017 — @genehack 36
they hit on all the
classicswhy&how2learn — SeaGL 2017 — @genehack 37
hello
world
as a ssg
why&how2learn — SeaGL 2017 — @genehack 38
o hai
there
why&how2learn — SeaGL 2017 — @genehack 39
1. read input from file
2. process the input
3. write output to file
why&how2learn — SeaGL 2017 — @genehack 40
why&how2learn — SeaGL 2017 — @genehack 41
let’s
pause
herewhy&how2learn — SeaGL 2017 — @genehack 42
1. read input from file
2. process the input
3. write output to file
why&how2learn — SeaGL 2017 — @genehack 43
in those 3 steps we just did a
whole bunch
of stuffwhy&how2learn — SeaGL 2017 — @genehack 44
writing some code
and
getting it to build/run
why&how2learn — SeaGL 2017 — @genehack 45
reading & writing
files
why&how2learn — SeaGL 2017 — @genehack 46
getting data into a
variable
why&how2learn — SeaGL 2017 — @genehack 47
interpolating
a variable into output
why&how2learn — SeaGL 2017 — @genehack 48
o/
yay!why&how2learn — SeaGL 2017 — @genehack 49
next:
two input files
why&how2learn — SeaGL 2017 — @genehack 50
as well:
templates!
why&how2learn — SeaGL 2017 — @genehack 51
which means:
figuring out
packages
why&how2learn — SeaGL 2017 — @genehack 52
note:
probably don’t
write your own template engine
why&how2learn — SeaGL 2017 — @genehack 53
also:
loops & conditional logic
oh my
why&how2learn — SeaGL 2017 — @genehack 54
after
that…why&how2learn — SeaGL 2017 — @genehack 55
the sky’s
the limitwhy&how2learn — SeaGL 2017 — @genehack 56
add a
weblogwhy&how2learn — SeaGL 2017 — @genehack 57
add other
processors
why&how2learn — SeaGL 2017 — @genehack 58
add a subcmd-style
appwhy&how2learn — SeaGL 2017 — @genehack 59
and then you can get
fancy…
why&how2learn — SeaGL 2017 — @genehack 60
HTTP
serverwhy&how2learn — SeaGL 2017 — @genehack 61
automatically rebuild output when input is
modified
why&how2learn — SeaGL 2017 — @genehack 62
only rebuild output when
necessary
why&how2learn — SeaGL 2017 — @genehack 63
finallywhen you think you’re “done”…
why&how2learn — SeaGL 2017 — @genehack 64
go back & take another
look
why&how2learn — SeaGL 2017 — @genehack 65
don’twrite your $oldlang in your
$newlang
why&how2learn — SeaGL 2017 — @genehack 66
so, to
sum up:
why&how2learn — SeaGL 2017 — @genehack 67
continuing to learn
is vital!why&how2learn — SeaGL 2017 — @genehack 68
figure out
how to make that happen
why&how2learn — SeaGL 2017 — @genehack 69
both in terms of
“maintain interest in it”
why&how2learn — SeaGL 2017 — @genehack 70
and in terms of
“be good at it”
why&how2learn — SeaGL 2017 — @genehack 71
disclaimer:
this talk is based on
my opinions and experiences
why&how2learn — SeaGL 2017 — @genehack 72
your mileage
will vary
why&how2learn — SeaGL 2017 — @genehack 73
thanks!
why&how2learn — SeaGL 2017 — @genehack 74
special thanks
@qedunham
why&how2learn — SeaGL 2017 — @genehack 75
special thanks
@vmbrasseur
@garethgreenaway
why&how2learn — SeaGL 2017 — @genehack 76
seagl
organizers
why&how2learn — SeaGL 2017 — @genehack 77
you!
why&how2learn — SeaGL 2017 — @genehack 78
why&how2learn — SeaGL 2017 — @genehack 79
questions?
why&how2learn — SeaGL 2017 — @genehack 80

A static site generator should be your next language learning project