-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
449 lines (367 loc) · 12.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Gizra</title>
<meta name="description" content="A framework for easily creating beautiful presentations using HTML">
<meta name="author" content="Hakim El Hattab">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/black.css" id="theme">
<link rel="stylesheet" href="css/custom.css">
<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed" rel="stylesheet">
<link href="//fonts.googleapis.com/css?family=Abril+Fatface" rel="stylesheet" type="text/css">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match(/print-pdf/gi) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName('head')[0].appendChild(link);
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<!-- About -->
<section data-background="https://cloud.githubusercontent.com/assets/125707/12092123/dd49649a-b303-11e5-9355-e49a3881f5bd.png">
<span style="background-color: black; opacity: 0.85; padding: 20px 40px;">
<span style="font-family: Abril Fatface; color: #e27058; font-size: 50px;">
gizra
</span>
<span>// @amitaibu</span>
</span>
<aside class="notes" data-markdown>
* CTO, co-owner of Gizra
* Fancy clients.
* And then, like any sales pitch I'm doing, 60 seconds later we talk
about how most IT projects fail.
</aside>
</section>
<section>
<h2>Defintion of success</h2>
<ul>
<li>On Time</li>
<li>On Budget</li>
<li>Customer is Happy</li>
</ul>
<aside class="notes" data-markdown>
* When I say fail, I mean they don't answer one of the three.
* Unholy trinity - all of them
* It will be published, but later with more money and more frustration
</aside>
</section>
<section>
<h2>How to Solve it</h2>
<ul>
<li>Communication</li>
<li>Setting expectations</li>
</ul>
<aside class="notes" data-markdown>
* For a long time I thought that was the solution.
* I now think it's only the technicque.
</aside>
</section>
<section>
<h2>How to Solve it, 2017</h2>
<ul>
<li>Find and develop only the <a target="_blank" href="https://github.com/Gizra/unio/issues/744#issuecomment-299962554">essence</a></li>
<li>Timebox the efforts</li>
</ul>
<aside class="notes" data-markdown>
* Basically it means, don't develop everything.
* Project is the sum of it's issues
* Setting the hours is setting the expectations
* Also self fullfiling prophesy - developer can code for ever.
* Everybody can set estimation
* Time is more important than the task
* Escalation
</aside>
</section>
<section>
<h2>Cost of bugs</h2>
<aside class="notes" data-markdown>
* The thing that ruins our plans and estimation is bugs.
* Bugs are very costly (even more than they might appear)
* Need to fix, costs you money
* Takes your time - deadline
* Devs/ Account manager moral
</aside>
</section>
<section>
<h2>Correctness</h2>
<aside class="notes" data-markdown>
* My expectations of computer and programming languages after being in the
functional programming world for 2 years.
</aside>
</section>
<section>
<h2>Elm</h2>
<small>Generate JavaScript with great performance and no runtime exceptions</small>
<aside class="notes" data-markdown>
* Frustrated with Angular, I was poking around React, and soon found myself with Elm
* Functional programming language. It compiles to JS. But it's not Typescirpt
* It doesn't try to fix JS. But rather say, JS is wonderful, but as humans we shouldn't interact with it.
* Staticlly typed. It has an amazing compiler which makes sure there are no runtime exceptions. It's immutable.
* In general after years of Angualr 1, and playing a bit with React, Front end has became fun again.
* Development is much faster and more stable than ever, Admitedlly, ever since I divied into Elm and FP I started using it I've started seeing the flaws in Drupal.
</aside>
</section>
<!-- Counter Example -->
<section>
<img src="https://cloud.githubusercontent.com/assets/125707/9739824/2fcc8cd0-565a-11e5-8024-0d01200773cd.jpg" />
</section>
<section>
<pre style="width: 100%;"><code data-trim class>
module Counter exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (onClick)
-- MODEL
type alias Model =
Int
emptyModel : Model
emptyModel =
0
-- UPDATE
type Msg
= Decrement
| Increment
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
Decrement ->
( model - 1
, Cmd.none
)
Increment ->
( model + 1
, Cmd.none
)
-- VIEW
view : Model -> Html Msg
view model =
div []
[ button [ onClick Decrement ] [ text "-" ]
, div [] [ text (toString model) ]
, button [ onClick Increment ] [ text "+" ]
]
</code></pre>
<aside class="notes" data-markdown>
* Mandatory counter example, but soon we'll go over fancier examples.
</aside>
</section>
<section>
<h3>Compile Error Vs Runtime Mistakes</h3>
<aside class="notes" data-markdown>
* No Runtime exceptions in Elm
* Shift as much runtime mistakes to compile time error
</aside>
</section>
<section>
<h2>Types 101</h2>
</section>
<!-- Bool type -->
<section>
<pre>
<code class="elm" data-trim>
type Bool = False | True
</code>
</pre>
</section>
<!-- User type -->
<section>
<pre>
<code class="elm" data-trim>
type alias Name
= String
type UserType
= Anonymous
| Authenticated Name
| Premium Name Date
</code>
</pre>
<aside class="notes" data-markdown>
* User type can be either one.
* Pending and Authenticated are wrapping a value.
</aside>
</section>
<section>
<h2>
Cart example
</h2>
</section>
<section>
<h2>Maybe values</h2>
</section>
<!-- User type Url -->
<section>
<pre>
<code class="elm" data-trim>
type alias User =
{ avatarUrl : String
, name : String
}
emptyUser =
{ avatarUrl = ""
, name = ""
}
type alias Model =
{ user : User
}
emptyModel =
{ user = emptyUser
}
</code>
</pre>
<aside class="notes" data-markdown>
* Example without Maybe. But this is wrong.
</aside>
</section>
<section>
<pre>
<code class="elm" data-trim>
type alias Model =
{ user : Maybe User
}
emptyModel : Model
emptyModel =
{ user = Nothing
}
modelWithUser : Model
modelWithUser =
{ user = Just <| User "https://example.com/avatar" "amitaibu"
}
viewUser : Maybe User -> Html msg
viewUser mUser =
case mUser of
Nothing ->
text "Loading"
Just user ->
text user.name
</code>
</pre>
<aside class="notes" data-markdown>
* We know there is no User.
</aside>
</section>
<section>
<pre>
<code class="elm" data-trim>
type RemoteData e a
= NotAsked
| Loading
| Failure e
| Success a
type alias WebData a =
RemoteData Http.Error a
</code>
</pre>
<aside class="notes" data-markdown>
* A common pattern in Elm
* It helps us to re-think with types
</aside>
</section>
<section>
<pre>
<code class="elm" data-trim>
type alias Model =
{ user : WebData User
}
emptyModel =
{ user = NotAsked
}
debugUser =
{ user = Success <| User "https://example.com/avatar" "amitaibu"
}
viewUser : WebData User -> Html msg
viewUser webDataUser =
case webDataUser of
Success user ->
text user.name
Failure err ->
text "Something went wrong"
_ ->
text "Loading..."
</code>
</pre>
<aside class="notes" data-markdown>
* Using webdata, starting with NotAsked
* How easy to put a spinner, because you have the exact state.
</aside>
</section>
<section>
<h2>Testing</h2>
<ul>
<li><a target="blank" href="https://github.com/Gizra/unio/blob/10f994afb73ba57859facc24b1f7f4ea414c0cf6/client/test/specs/registration.js#L24">WebDriver IO</a></li>
<li><a target="blank" href="https://github.com/Gizra/unio/blob/10f994afb73ba57859facc24b1f7f4ea414c0cf6/client/src/elm/Embed/Test.elm#L95">Elm unit tests</a></li>
<li><a target="blank" href="https://github.com/Gizra/unio/blob/10f994afb73ba57859facc24b1f7f4ea414c0cf6/server/unio/modules/custom/unio_restful/tests/UnioRestfulResourceAccess.test#L250">SimpleTest</a></li>
</ul>
</section>
<section>
<h2>Travis CI</h2>
<img src="https://cloud.githubusercontent.com/assets/125707/25797315/5255232e-33e5-11e7-9518-514363605d1f.jpg" alt="">
</section>
<section>
<img src="https://cloud.githubusercontent.com/assets/125707/25798189/da80b968-33e8-11e7-885c-d9a9526d7759.jpg" alt="">
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// Full list of configuration options available at:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: false,
progress: false,
history: true,
center: true,
transition: 'none', // none/fade/slide/convex/concave/zoom
// Optional reveal.js plugins
dependencies: [{
src: 'lib/js/classList.js',
condition: function() {
return !document.body.classList;
}
}, {
src: 'plugin/markdown/marked.js',
condition: function() {
return !!document.querySelector('[data-markdown]');
}
}, {
src: 'plugin/markdown/markdown.js',
condition: function() {
return !!document.querySelector('[data-markdown]');
}
}, {
src: 'plugin/highlight/highlight.js',
async: true,
callback: function() {
hljs.initHighlightingOnLoad();
}
}, {
src: 'plugin/zoom-js/zoom.js',
async: true
}, {
src: 'plugin/notes/notes.js',
async: true
}, {
src: 'socket.io/socket.io.js',
async: true
}, {
src: 'plugin/notes-server/client.js',
async: true
}]
});
</script>
</body>
</html>