Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

A static site generator should be your next language learning project

1,325 views

Published on

When learning a new language, some folks prefer to read the language documentation, or work through simple exercises like you might find on http://exercism.io -- but I prefer to have something more like an actual project. I find that holds my focus a little better, and that I do a better job of absorbing the new language syntax and features if I'm using them for something real.

In this talk, I'm going to outline why writing a static website generator is the perfect task for this sort of language learning project. I'll cover the code you'll need to write in order to develop a simple template-based website generation system, and show how this particular project actually manages to hit all the points you need to understand to claim basic understanding of a language.

Published in: Software
  • Be the first to comment

  • Be the first to like this

A static site generator should be your next language learning project

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

×