the ag_deck
+ - 0:00:00
Notes for current slide
Notes for next slide

earth

1 / 145

earth
turtle

2 / 145

earth
turtle turtle turtle turtle turtle turtle turtle turtle turtle turtle turtle turtle turtle turtle turtle turtle turtle turtle

3 / 145
4 / 145

nyan turtle

5 / 145

> typeof universe

'recursive space turtles'

> universe instanceof RecursiveSpaceTurtles

'who's to say really?'

6 / 145

hi my name is @ag_dubs

7 / 145

real eyes

8 / 145

i am developer

9 / 145

npm install

ag_dubs

10 / 145

npm install

a-brief-history

11 / 145

i like to think about thinking

13 / 145

i like to think about thinking

especially the type of thinking that happens when people write code

14 / 145

why ideas

15 / 145

teaching is nature's way of letting you know how sloppy your thinking is

16 / 145

nodetogether

17 / 145

nodetogether

18 / 145

nodetogether

19 / 145

nodetogether

@node_together

20 / 145

howpublish

21 / 145

how do you decide what goes in a module?

22 / 145

testing

testing

24 / 145

reuse

25 / 145

garyjoke spicyjan

26 / 145

reuse

27 / 145

throw dart

28 / 145

haverbeke1 haverbeke2

29 / 145

people got mad

30 / 145

modularity seemed, as both concept and physical reality, similar to time

31 / 145

too many

32 / 145

explore

33 / 145

a brief history of time

34 / 145

our picture of the universe

turtle

35 / 145

packages people 'npm install' a lot

http://npmjs.com. Accessed 10 November 2016.
37 / 145

module counts

http://modulecounts.com. Accessed 10 November 2016.
38 / 145

npm is the LARGEST MODULE REPOSITORY IN THE WORLD.

39 / 145

npm is the LARGEST MODULE REPOSITORY IN THE UNIVERSE??!!1

40 / 145

npm is the LARGEST MODULE REPOSITORY IN THE UNIVERSE??!!1

but why?

41 / 145

all the things

42 / 145

why so many modules?

43 / 145

require('dijkstra');

dijkstra

44 / 145

The programmer is in the unique position... They have to be able to think in terms of conceptual hierarchies that are much deeper than a single mind ever needed to face before... the automatic computer confronts us with a radically new intellectual challenge that has no precedent in our history.

Edsgar Dijkstra

On the cruelty of really teaching computing science, EWD1036-0.
45 / 145

lol "automatic computer"

46 / 145

modularity is a way of addressing this challenge

47 / 145

what is modularity?

turtle

48 / 145

Modular programming is a software design technique that emphasizes separating the functionality of a program into independent, interchangeable modules, such that each contains everything necessary to execute only one aspect of the desired functionality.

Modular Programming. Wikipedia. https://en.wikipedia.org/wiki/Modular_programming. Accessed 9 May 2016.
49 / 145

"one aspect"

50 / 145

small modules philosophy

51 / 145

It's all about containing complexity... By making small focused modules you can easily build large complex systems without having to know every single detail of how everything works. Our short term memory is finite.

Sindre Sorhus

https://github.com/sindresorhus/ama/issues/10#issuecomment-117766328
52 / 145

how small is too small?

53 / 145

one-line-node-modules

54 / 145

left-pad

55 / 145

warning

56 / 145

left-pad

57 / 145

left-pad

58 / 145

left-pag

59 / 145

left-pad

60 / 145

shit

61 / 145

shit

62 / 145

did we forget to program when we stopped writing C?

63 / 145

did we forget to program when we stopped writing C?

... or when we stopped writing assembly?

64 / 145

did we forget to program when we stopped writing C?

... or when we stopped writing assembly?

... or when we stopped doing electrical engineering?

65 / 145

no true programmer!

66 / 145

no true scotsman!

67 / 145

no true programmer

68 / 145

no true programmer

no

69 / 145

When applications are done well, they are just the really application-specific, brackish residue that can't be so easily abstracted away. All the nice, reusable components sublimate away onto github and npm where everybody can collaborate to advance the commons.

substack

http://substack.net/how_I_write_modules
70 / 145

communism all the way down

71 / 145

commons are Hard...

72 / 145

rollingweekly

73 / 145

require('gall');

gall systemantics

74 / 145

A complex system that works is invariably found to have evolved from a simple system that worked. A complex system designed from scratch never works and cannot be patched up to make it work. You have to start over with a simple system.

John Gall

75 / 145

what is simplicity?

turtle

76 / 145

simpleeasy

Rich Hickey, "Simple, Made Easy" http://www.infoq.com/presentations/Simple-Made-Easy Strangeloop 2011
77 / 145

what is information?

78 / 145

require('cesar');

hidalgo

79 / 145

why information grows

80 / 145

why can order in the universe deteriorate even as it grows on Earth?

81 / 145

Information is not a thing; rather it is the arrangement of physical things. It is physical order, like what distinguishes different shuffles of a deck of cards. What is surprising to most people, however, is that information is meaningless.

82 / 145

it's not what the modules contain

it's how we slice them

83 / 145

the trouble with modularity

turtle

84 / 145

The more I modularize my code. The bigger it gets.

Nolan Lawson

"The cost of small modules". Read the Tea Leaves. 15 August 2016.
85 / 145

Over 400ms is being spent simply walking the Browserify tree.

Sam Saccone

"The cost of small modules". Read the Tea Leaves. 15 August 2016.
86 / 145

the cost of small modules

87 / 145

duckhorse

88 / 145

How many modules are in a typical web application?

  • requirebin.com: 91 modules

  • keybase.io: 365 modules

  • m.reddit.com: 1050 modules

  • Apple.com: 1060 modules

https://nolanlawson.com/2016/08/15/the-cost-of-small-modules/
89 / 145

modulepackers

90 / 145

webpack and browserify

every module gets its own function

(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
module.exports = 0
},{}],2:[function(require,module,exports){
module.exports = 1
},{}],3:[function(require,module,exports){
module.exports = 10
},{}],4:[function(require,module,exports){
module.exports = 100
// etc.
91 / 145

rollup and closure

hoist everything into a single function

(function () {
'use strict';
var module_0 = 0
var module_1 = 1
// ...
total += module_0
total += module_1
// etc.
92 / 145

loadtime

93 / 145

it's not what the modules contain

it's how we put them together

94 / 145

Yes, small modules are easier to write. Yes, they're easier to test. Yes, it's easier to adhere to semver. These are all things that make your life as a library author easier. As we've seen, they come at a cost for others.

Rich Harris

https://medium.com/@Rich_Harris/small-modules-it-s-not-quite-that-simple-3ca532d65de4#.9qtsjcmd6
95 / 145

the small modules philosophy:

96 / 145

the small modules philosophy:

  • ✅ benefits the library writers

97 / 145

the small modules philosophy:

  • ✅ benefits the library writers

  • 😩 disadvantages application writers

98 / 145

the small modules philosophy:

  • ✅ benefits the library writers

  • 😩 disadvantages application writers

  • 🙅🏾 harms end users

99 / 145

how did we end up here?

100 / 145

require('kuhn');

kuhn

101 / 145

Scientists work from models acquired through education and through subsequent exposure to the literature often without quite knowing or needing to know what characteristics have given these models the status of community paradigms.

Thomas Kuhn

Kuhn, Thomas. "The Structure of Scientific Revolutions", pg 46 (1962)
102 / 145

inconvenience

103 / 145

require('ceejbot');

ceejbot

104 / 145

Your monolith is complex. A split system is more complex.

CJ Silverio

105 / 145

solution

106 / 145

require('hickey');

hickey

107 / 145

Most of the big problems in software are problems of misconception.

Rich Hickey

"Hammock Driven Development". Clojure Conj, 2010. https://www.youtube.com/watch?v=f84n5oFoZBc.
108 / 145

software development is change management

turtle

109 / 145

require('hawking');

hawking

110 / 145

It is an interesting reflection on the general climate of thought before the twentieth century that no one had suggested that the universe was expanding or contracting.

Steven Hawking

A Brief History of Time. Bantam Books Trade Paperbacks: 6, 1988.
111 / 145

require('parnas');

david parnas decomposing criteria paper

112 / 145

[Start] with a list of difficult design decisions or design decisions which are likely to change. Each module is then designed to hide such a decision from the others.

David Parnas

Parnas, D. L. 1972 On the Criteria To Be Used in Decomposing Systems into Modules. Association for Computing Machinery, Inc: Programming Techniques, 1053-1058.
113 / 145

the goal of modularity is not to make things easier but to hide the things that are hard

114 / 145

how to computer?

turtle hiding

115 / 145

None of us are born knowing how to write software.

Rich Hickey

116 / 145

failure

117 / 145

all is not lost, dogs know calculus

118 / 145

dogcalc

119 / 145

dogcalc

120 / 145

dogcalc

121 / 145

corgis are made of star stuff

122 / 145

corgis are made of star stuff

and so are we

123 / 145

dylan

124 / 145

despair?

125 / 145

require('sartre');

sartre

126 / 145

tef tweet

127 / 145

require('tef');

tef

128 / 145

Write code that is easy to delete, not easy to extend. Instead of building re-usable software, we should try to build disposable software. I don't need to tell you that deleting code is more fun than writing it.

Tef

http://programmingisterrible.com/post/139222674273/write-code-that-is-easy-to-delete-not-easy-to
129 / 145

if u love it

130 / 145

split your code: isolate the hard-to-write and the likely-to-change parts from the rest of the code, and each other.

131 / 145

what is spacetime?

132 / 145

spacetime

refers to whatever external reality underlies our collective experiences of the space between things and the time between events.

"Are Space and Time An Illusion" PBS Space Time, https://www.youtube.com/watch?v=YycAzdtUIko.
133 / 145

why not just time? why not just space?

134 / 145

why add space time as an extra concept?

135 / 145

Suppose 2 observers are moving at relative speeds to each other...

  • they can't agree on how much time passes between events

  • they can't agree on how much space

  • they can't EVEN agree on the chronological order of events

136 / 145

... yet neither of them is wrong.

137 / 145

what is time is a tough question, it's not even the full question

138 / 145

what is modularity is a tough question, it's not even the full question

139 / 145

modularity is an old problem that we are dealing with at a new scale

140 / 145

we need new and better ways to see the implications of modularity

141 / 145

we need new and better ways to see the implications of modularity

through both time AND space

142 / 145

julia how to be a wizerd

Julia Evans, @b0rk

143 / 145

npm install

a-brief-history

{ "name": "a brief history and mishistory of modularity", "author": "ashley williams @ag_dubs", "version": "1.0.0", "dependencies" : { "Edsger Dijkstra": "On the Cruelty of Really Teaching Computer Science", "Stephen Hawking": "A Brief History of Time", "Rich Hickey": "Hammock Driven Development", "Rich Hickey": "Design, Composition, Performance", "Tef": "Write code that is easy to delete, not easy to extend.", "CJ Silverio": "Cheating Gall's Law", "Nolan Lawson": "The cost of small modules", "Substack": "How I write modules", "Sindre Sohrus": "Small Modules: Tales from a Serial Module Author" }

144 / 145

squirtle

145 / 145

earth
turtle

2 / 145
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow