rabbit-slide-kou-rubykaigi-2013 2013.6.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.rabbit ADDED
@@ -0,0 +1 @@
1
+ be-a-library-developer.rab
data/README.rd ADDED
@@ -0,0 +1,48 @@
1
+ = Be a library developer!
2
+
3
+ Is there a gem author around you? Did you meet any author of the gems
4
+ used? Did you contact with any author of the gems used on the
5
+ Internet?
6
+
7
+ Do you think that "the author is cool!", "the author is awesome!" or
8
+ "I respect the author!"? Do you want to be a gem author?
9
+
10
+ This talk doesn't describe about how to create a gem because it is
11
+ easy. "gem" is a package of Ruby library (, tool and so on) for easy
12
+ to install. This talk describes about developing a library that is gem
13
+ content.
14
+
15
+ This talk is based on my experience as a library developer. This talk
16
+ describes about how to write codes, how to write documents, release,
17
+ support and mental set for a better "library developer". I hope that
18
+ this talk is a trigger for increasing the number of better "library
19
+ developers".
20
+
21
+ == License
22
+
23
+ CC BY-SA 3.0
24
+
25
+ Use the followings for notation of the author:
26
+
27
+ * Kouhei Sutou
28
+
29
+ == For author
30
+
31
+ === Show
32
+
33
+ rake
34
+
35
+ === Publish
36
+
37
+ rake publish
38
+
39
+ == For viewers
40
+
41
+ === Install
42
+
43
+ gem install rabbit-slide-kou-rubykaigi-2013
44
+
45
+ === Show
46
+
47
+ rabbit rabbit-slide-kou-rubykaigi-2013.gem
48
+
data/Rakefile ADDED
@@ -0,0 +1,21 @@
1
+ # Copyright (C) 2013 Kouhei Sutou <kou@clear-code.com>
2
+ #
3
+ # License: CC BY-SA 3.0
4
+
5
+ require "rabbit/task/slide"
6
+
7
+ # Edit ./config.yaml to customize meta data
8
+
9
+ spec = nil
10
+ Rabbit::Task::Slide.new do |task|
11
+ spec = task.spec
12
+ # task.spec.files += Dir.glob("doc/**/*.*")
13
+ # task.spec.files -= Dir.glob("private/**/*.*")
14
+ spec.add_runtime_dependency("rabbit-theme-clear-code")
15
+ end
16
+
17
+ desc "Tag #{spec.version}"
18
+ task :tag do
19
+ sh("git", "tag", "-a", spec.version.to_s, "-m", "Publish #{spec.version}")
20
+ sh("git", "push", "--tags")
21
+ end
@@ -0,0 +1,562 @@
1
+ = Be a library developer!
2
+
3
+ : subtitle
4
+ ((*R*))emember ((*t*))han ((*I*))magine
5
+
6
+ : author
7
+ Kouhei Sutou
8
+ : institution
9
+ ClearCode Inc.
10
+ : date
11
+ 2013/06/01
12
+ : allotted-time
13
+ 25m
14
+ : theme
15
+ .
16
+
17
+ = Table of contents
18
+
19
+ * Share this talk's goal
20
+ * Describe key idea
21
+ * Apply the key idea
22
+ * Wrap up & The next step
23
+
24
+ = Share the goal
25
+
26
+ * ((*Share this talk's goal*))
27
+ * Describe key idea
28
+ * Apply the key idea
29
+ * Wrap up & The next step
30
+
31
+ = This talk's goal
32
+
33
+ (('tag:as-large-as-possible'))
34
+ You know how to develope more better softwares
35
+
36
+ = More better?
37
+
38
+ By example
39
+
40
+ = API
41
+
42
+ = API: 1
43
+
44
+ # coderay ruby
45
+ context.save
46
+ context.circle(50, 50, 10)
47
+ context.stroke
48
+ context.restore
49
+
50
+ (('tag:center'))(('note:from cairo gem'))
51
+
52
+ = API: 1 (better)
53
+
54
+ # coderay ruby
55
+ context.save do
56
+ context.circle(50, 50, 10)
57
+ context.stroke
58
+ end
59
+
60
+ (('tag:center'))(('note:from cairo gem'))
61
+
62
+ = API: 1 (better)
63
+
64
+ # coderay ruby
65
+ context.save do
66
+ context.circle(50, 50, 10)
67
+ context.stroke
68
+ end
69
+
70
+ (('tag:center'))(('note:from cairo gem'))
71
+
72
+ = API: 2
73
+
74
+ # coderay ruby
75
+ # low level
76
+ window.get_property("opacity")
77
+ # better
78
+ window.opacity
79
+
80
+ (('tag:center'))(('note:from gtk2 gem'))
81
+
82
+ = API: 3 (better?)
83
+
84
+ # coderay ruby
85
+ # low level
86
+ window.get_property("visible")
87
+ # better
88
+ # ???: hint: "visible" is bool
89
+
90
+ (('tag:center'))(('note:from gtk2 gem'))
91
+
92
+ = API: 3 (better)
93
+
94
+ # coderay ruby
95
+ # low level
96
+ window.get_property("visible")
97
+ # better
98
+ window.visible?
99
+
100
+ (('tag:center'))(('note:from gtk2 gem'))
101
+
102
+ = API: 4
103
+
104
+ # coderay ruby
105
+ # better for record as collection
106
+ record["name"]
107
+ # better for record as object
108
+ record.name
109
+
110
+ (('tag:center'))(('note:from groonga gem'))
111
+
112
+ = API: 5
113
+
114
+ # coderay ruby
115
+ require "gst"
116
+ # ???
117
+ Gst.init # <- What?
118
+ Gst::ElementFactory.make("playbin")
119
+
120
+ (('tag:center'))(('note:from gstreamer gem'))
121
+
122
+ = API: 5
123
+
124
+ # coderay ruby
125
+ require "gst"
126
+ # For advanced use
127
+ Gst.init("--gst-debug=*:9")
128
+ Gst::ElementFactory.make("playbin")
129
+
130
+ (('tag:center'))(('note:from gstreamer gem'))
131
+
132
+ = API: 5 (better)
133
+
134
+ # coderay ruby
135
+ require "gst"
136
+ # Make optional
137
+ # Gst.init
138
+ Gst::ElementFactory.make("playbin")
139
+
140
+ (('tag:center'))(('note:from gstreamer gem'))
141
+
142
+ = Implementation
143
+
144
+ # coderay ruby
145
+ class << Gst
146
+ def const_missing(name)
147
+ init; const_get(name); end
148
+ def init(*argv)
149
+ # ...initialize library...
150
+ class << self
151
+ remove_method(:init)
152
+ remove_method(:const_missing)
153
+ end; end; end
154
+
155
+ = Docuemnt
156
+
157
+ = Document: 1
158
+
159
+ Install:
160
+
161
+ For Debian GNU/Linux:
162
+ % sudo apt-get install libgtk2.0-dev
163
+ % gem install gtk2
164
+ For OS X:
165
+ ...
166
+
167
+ = Document: 1 (better)
168
+
169
+ Install:
170
+
171
+ % gem install gtk2
172
+
173
+ = Release
174
+
175
+ = Release: 1
176
+
177
+ Announce:
178
+
179
+ Ruby 1.8.7 was released on June 1st, 2008. In commemoration
180
+ of the thrid anniversary of Ruby 1.8.7, we have a new
181
+ patchlevel release today. It includes several bug fixes.
182
+ For the detail please read the ChangeLog.
183
+
184
+ = Release: 1: not good
185
+
186
+ ((*read the ChangeLog*))
187
+
188
+ = Release: 1: better
189
+
190
+ How?\nLet's think later
191
+
192
+ = Confirmation
193
+
194
+ = This talk's goal
195
+
196
+ (('tag:as-large-as-possible'))
197
+ You know how to develope more better softwares
198
+
199
+ = More better
200
+
201
+ Showed\nby examples
202
+
203
+ = Table of contents
204
+
205
+ * Share this talk's goal
206
+ * ((*Describe key idea*))
207
+ * Apply the key idea
208
+ * Wrap up & The next step
209
+
210
+ = Key idea
211
+
212
+ ((*R*))emember\n((*t*))han\n((*I*))magine
213
+
214
+ = Imagine
215
+
216
+ * Difficult
217
+ * Because you didn't know
218
+ * Many programmers can't imagine about other people
219
+
220
+ = Remember
221
+
222
+ * Easy
223
+ * Because you know
224
+ * Many Japanese Rubyists can't remember wait time
225
+
226
+ = To remember,
227
+
228
+ * Experience
229
+ * Ask
230
+ * Observe
231
+
232
+ = Experience!
233
+
234
+ * ((*Experience*))
235
+ * Ask
236
+ * Observe
237
+
238
+ = What should you experience?
239
+
240
+ = What
241
+
242
+ Library user
243
+
244
+ = Library user?
245
+
246
+ You experienced!
247
+
248
+ = Key idea
249
+
250
+ ((*R*))emember\n((*t*))han\n((*I*))magine
251
+
252
+ = Remember
253
+
254
+ = Apply the key idea
255
+
256
+ * Share this talk's goal
257
+ * Describe key idea
258
+ * ((*Apply the key idea*))
259
+ * Wrap up & The next step
260
+
261
+ = API
262
+
263
+ = API: 1
264
+
265
+ # coderay ruby
266
+ context.save
267
+ context.circle(50, 50, 10)
268
+ context.stroke
269
+ context.restore
270
+
271
+ (('tag:center'))(('note:from cairo gem'))
272
+
273
+ = API: 1: Point
274
+
275
+ # coderay ruby
276
+ context.save # Setup
277
+ context.circle(50, 50, 10)
278
+ context.stroke
279
+ context.restore # Teardown
280
+
281
+ (('tag:center'))(('note:from cairo gem'))
282
+
283
+ = Remember
284
+
285
+ File
286
+
287
+ = Remember: File
288
+
289
+ # coderay ruby
290
+
291
+ # Setup
292
+ file = File.open(path)
293
+ file.read
294
+ # Teardown
295
+ file.close
296
+
297
+ = Remember: File
298
+
299
+ # coderay ruby
300
+ # Ensure teardown
301
+ File.open(path) do |file|
302
+ file.read
303
+ raise "error!"
304
+ end
305
+
306
+ = do ... end style
307
+
308
+ Merit:\n
309
+ Ensure close
310
+
311
+ = API: 1
312
+
313
+ # coderay ruby
314
+ context.save # Setup
315
+ context.circle(50, 50, 10)
316
+ context.stroke
317
+ context.restore # Teardown
318
+
319
+ (('tag:center'))(('note:from cairo gem'))
320
+
321
+ = API: 1 (better)
322
+
323
+ # coderay ruby
324
+ # Ensure teardown
325
+ context.save do
326
+ context.circle(50, 50, 10)
327
+ context.stroke
328
+ end
329
+
330
+ (('tag:center'))(('note:from cairo gem'))
331
+
332
+ = API: 2
333
+
334
+ # coderay ruby
335
+ # low level
336
+ window.get_property("opacity")
337
+ # better
338
+ window.opacity
339
+
340
+ (('tag:center'))(('note:from gtk2 gem'))
341
+
342
+ = API: 2: Point
343
+
344
+ property\n==\nattribute
345
+
346
+ = Remember
347
+
348
+ Normal object
349
+
350
+ = API: 2
351
+
352
+ # coderay ruby
353
+ # low level
354
+ window.get_property("opacity")
355
+ # better
356
+ window.opacity
357
+
358
+ (('tag:center'))(('note:from gtk2 gem'))
359
+
360
+ = API: 3 (better?)
361
+
362
+ # coderay ruby
363
+ # low level
364
+ window.get_property("visible")
365
+ # better
366
+ # ???: hint: "visible" is bool
367
+
368
+ (('tag:center'))(('note:from gtk2 gem'))
369
+
370
+ = Remember
371
+
372
+ Predicate
373
+
374
+ = Remember: Predicate
375
+
376
+ # coderay ruby
377
+ [].empty?
378
+ 0.zero?
379
+
380
+ = API: 3 (better)
381
+
382
+ # coderay ruby
383
+ # low level
384
+ window.get_property("visible")
385
+ # better: "?" suffix
386
+ window.visible?
387
+
388
+ (('tag:center'))(('note:from gtk2 gem'))
389
+
390
+ = API: 4
391
+
392
+ # coderay ruby
393
+ # better for record as collection
394
+ record["name"]
395
+ # better for record as object
396
+ record.name
397
+
398
+ (('tag:center'))(('note:from groonga gem'))
399
+
400
+ = API: 5
401
+
402
+ # coderay ruby
403
+ require "gst"
404
+ # ???
405
+ Gst.init # <- What?
406
+ Gst::ElementFactory.make("playbin")
407
+
408
+ (('tag:center'))(('note:from gstreamer gem'))
409
+
410
+ = API: 5
411
+
412
+ # coderay ruby
413
+ require "gst"
414
+ # For advanced use
415
+ Gst.init("--gst-debug=*:9")
416
+ Gst::ElementFactory.make("playbin")
417
+
418
+ (('tag:center'))(('note:from gstreamer gem'))
419
+
420
+ = Remember
421
+
422
+ Socket
423
+
424
+ = Socket in C
425
+
426
+ # coderay c
427
+ int fd;
428
+ struct sockaddr *address;
429
+ fd = socket(PF_INET, SOCK_STREAM, 0);
430
+ /* address.sa_family = ...; */
431
+ connect(fd, address, address_size);
432
+
433
+ = Socket in Ruby
434
+
435
+ # coderay ruby
436
+ TCPSocket.new("www.ruby-lang.org", 80)
437
+
438
+ = Point
439
+
440
+ Provide defaults
441
+
442
+ = API: 5 (better)
443
+
444
+ # coderay ruby
445
+ require "gst"
446
+ # Make optional
447
+ # Gst.init
448
+ Gst::ElementFactory.make("playbin")
449
+
450
+ (('tag:center'))(('note:from gstreamer gem'))
451
+
452
+ = Docuemnt
453
+
454
+ = Document: 1
455
+
456
+ Install:
457
+
458
+ For Debian GNU/Linux:
459
+ % sudo apt-get install libgtk2.0-dev
460
+ % gem install gtk2
461
+ For OS X:
462
+ ...
463
+
464
+ = Remember
465
+
466
+ You installed Nokogiri
467
+
468
+ = Remember: Nokogiri
469
+
470
+ % gem install nokogiri
471
+ ...
472
+ libxml2 is missing. ...
473
+ ...
474
+ *** extconf.rb failed ***
475
+
476
+ = Remember: Nokogiri
477
+
478
+ % sudo apt-get install libxml2-dev
479
+
480
+ = Remember: Nokogiri
481
+
482
+ % gem install nokogiri
483
+ ...
484
+ libxslt is missing. ...
485
+ ...
486
+ *** extconf.rb failed ***
487
+
488
+ = Document: 1 (better)
489
+
490
+ Install:
491
+
492
+ % gem install gtk2
493
+ (with auto "apt-get install")
494
+
495
+ = Release
496
+
497
+ = Release: 1
498
+
499
+ Announce:
500
+
501
+ Ruby 1.8.7 was released on June 1st, 2008. In commemoration
502
+ of the thrid anniversary of Ruby 1.8.7, we have a new
503
+ patchlevel release today. It includes several bug fixes.
504
+ For the detail please read the ChangeLog.
505
+
506
+ = Release: 1: not good
507
+
508
+ ((*read the ChangeLog*))
509
+
510
+ = Release: 1: better
511
+
512
+ How?\nLet's think later
513
+
514
+ TODO
515
+
516
+ = Wrap up
517
+
518
+ * Share this talk's goal
519
+ * Describe key idea
520
+ * Apply the key idea
521
+ * ((*Wrap up*)) & The next step
522
+
523
+ = This talk's goal
524
+
525
+ (('tag:as-large-as-possible'))
526
+ You know how to develope more better softwares
527
+
528
+ = Key idea
529
+
530
+ ((*R*))emember\n((*t*))han\n((*I*))magine
531
+
532
+ = Remember than Imagine
533
+
534
+ * Imagine
535
+ * Difficult
536
+ * Remember
537
+ * Easy
538
+
539
+ = For development
540
+
541
+ * Experience library user
542
+ * You must done!
543
+ * Then ((*remember*)) the experience
544
+
545
+ = The next step
546
+
547
+ * Share this talk's goal
548
+ * Describe key idea
549
+ * Apply the key idea
550
+ * Wrap up & ((*The next step*))
551
+
552
+ = Be a library developer
553
+
554
+ = Why?
555
+
556
+ * It is good experience for "remember than imagine"
557
+ * "library developer" experience is useful to
558
+ develope other softwares such as Ruby
559
+
560
+ = Conclusion
561
+
562
+ TODO
data/config.yaml ADDED
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: rubykaigi-2013
3
+ base_name: be-a-library-developer
4
+ tags:
5
+ - rabbit
6
+ - rubykaigi
7
+ - library
8
+ presentation_date: 2013/06/01
9
+ version: 2013.6.1.0
10
+ licenses:
11
+ - CC BY-SA 3.0
12
+ slideshare_id:
13
+ speaker_deck_id:
14
+ ustream_id:
15
+ vimeo_id:
16
+ author:
17
+ markup_language: :rd
18
+ name: Kouhei Sutou
19
+ email: kou@clear-code.com
20
+ rubygems_user: kou
21
+ slideshare_user: kou
22
+ speaker_deck_user: kou
metadata ADDED
@@ -0,0 +1,113 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rabbit-slide-kou-rubykaigi-2013
3
+ version: !ruby/object:Gem::Version
4
+ version: 2013.6.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Kouhei Sutou
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-05-23 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rabbit
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 2.0.2
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 2.0.2
30
+ - !ruby/object:Gem::Dependency
31
+ name: rabbit-theme-clear-code
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ description: ! 'Is there a gem author around you? Did you meet any author of the gems
47
+
48
+ used? Did you contact with any author of the gems used on the
49
+
50
+ Internet?
51
+
52
+
53
+ Do you think that "the author is cool!", "the author is awesome!" or
54
+
55
+ "I respect the author!"? Do you want to be a gem author?
56
+
57
+
58
+ This talk doesn''t describe about how to create a gem because it is
59
+
60
+ easy. "gem" is a package of Ruby library (, tool and so on) for easy
61
+
62
+ to install. This talk describes about developing a library that is gem
63
+
64
+ content.
65
+
66
+
67
+ This talk is based on my experience as a library developer. This talk
68
+
69
+ describes about how to write codes, how to write documents, release,
70
+
71
+ support and mental set for a better "library developer". I hope that
72
+
73
+ this talk is a trigger for increasing the number of better "library
74
+
75
+ developers".'
76
+ email:
77
+ - kou@clear-code.com
78
+ executables: []
79
+ extensions: []
80
+ extra_rdoc_files: []
81
+ files:
82
+ - .rabbit
83
+ - config.yaml
84
+ - Rakefile
85
+ - README.rd
86
+ - be-a-library-developer.rab
87
+ - pdf/rubykaigi-2013-be-a-library-developer.pdf
88
+ homepage: http://slide.rabbit-shocker.org/authors/kou/rubykaigi-2013/
89
+ licenses:
90
+ - CC BY-SA 3.0
91
+ post_install_message:
92
+ rdoc_options: []
93
+ require_paths:
94
+ - lib
95
+ required_ruby_version: !ruby/object:Gem::Requirement
96
+ none: false
97
+ requirements:
98
+ - - ! '>='
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ required_rubygems_version: !ruby/object:Gem::Requirement
102
+ none: false
103
+ requirements:
104
+ - - ! '>='
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
107
+ requirements: []
108
+ rubyforge_project:
109
+ rubygems_version: 1.8.23
110
+ signing_key:
111
+ specification_version: 3
112
+ summary: Be a library developer!
113
+ test_files: []