rabbit-slide-kou-schoo-readable-code-2014-12 2014.12.9.2 → 2014.12.9.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d66f3f51ad3194fe8c049cf7c4976d5f8ab961b5
4
- data.tar.gz: 139e6e51dd96396bfd3230652ea182be93ecfc48
3
+ metadata.gz: b9f4f6d405244275242d8d66dd89c08468979efb
4
+ data.tar.gz: af2ae4387467ad1eff3d8d9c2c0bbe83ac01184f
5
5
  SHA512:
6
- metadata.gz: 3ff493846ef33d94cd906ea1d9773db9cff8d2edeeda97a63d773df71d79bc6dbc12a8aef8c8200de502940b54fbb63fc4bcc8f0be107f5e59d7829faec1f30c
7
- data.tar.gz: b22c21f78d7e563b0390d45f27a35295d234bc12a741d76281ee23226d3a446bf3f4715544b0696576ad341a3f0241a2febabeeba9c2526a493f65d848125d37
6
+ metadata.gz: 09e5250d18b3a1cb473e08319ee5a53720ac61bd12f1cc8a62b8c2c4b2e0c6090499a020672558b18eaea0003d05afde84775927074370a5f07ad6c952b969de
7
+ data.tar.gz: 3d9b167e50c0ab9c761114bbf7fbd9535b7f7bcf494f994d1d80c2ec13b8d0b6586f6e7fda122a199fd501d0825c4976185a4a131443e852a4a8dbae4d6cd759
@@ -11,7 +11,7 @@
11
11
  : date
12
12
  2014/12/9
13
13
  : allotted-time
14
- 60m
14
+ 40m
15
15
  : theme
16
16
  clear-code
17
17
 
@@ -174,6 +174,22 @@
174
174
  select("year <= 2011")
175
175
  exclude("year <= 2011")
176
176
 
177
+ = 番外1:sort()(1)
178
+
179
+ * どっちの名前がよい?
180
+ * sort()
181
+ * quick_sort()/merge_sort()
182
+
183
+ = 番外1:sort()(2)
184
+
185
+ * ((*ソートすること*))が重要
186
+ * sort()
187
+ * ソート((*方法*))が重要
188
+ * quick_sort()/merge_sort()
189
+
190
+ ヒント:抽象化・カプセル化\n
191
+ (('note:(abstraction barrier, abstraction layer)'))
192
+
177
193
  = 3.2 例:Clip()(1)
178
194
 
179
195
  # coderay python
@@ -216,6 +232,24 @@
216
232
  # ↓
217
233
  def Truncate(text, max_chars):
218
234
 
235
+ = 番外2:add()(1)
236
+
237
+ * どの名前がよい?
238
+ * add()
239
+ * append()/prepend()
240
+
241
+ = 番外2:add()(2)
242
+
243
+ * ((*追加すること*))が重要\n
244
+ (('note:例:集合に追加するとき'))
245
+ * add()
246
+ * 追加する((*場所*))が重要\n
247
+ (('note:例:リストに追加するとき'))
248
+ * append()/prepend()
249
+
250
+ ヒント:抽象化・カプセル化\n
251
+ (('note:(abstraction barrier, abstraction layer)'))
252
+
219
253
  = 3.3 限界値(1)
220
254
 
221
255
  ショッピングカートに入る商品が\n
@@ -245,7 +279,7 @@
245
279
 
246
280
  * (({CART_TOO_BIG_LIMIT}))はあいまい
247
281
  * 未満?以下?→境界値の情報がない
248
- * (({MAX_ITEMS_IN_CARTS}))は明確
282
+ * (({MAX_ITEMS_IN_CART}))は明確
249
283
  * この値が最大値(境界値を含む)
250
284
  * 最大値のときは(({max}))を使おう!\n
251
285
  (('note:(最小値のときは(({min})))'))
@@ -257,16 +291,16 @@
257
291
  # CART_TOO_BIG_LIMIT = 10
258
292
  # if cart.num_items() >= CART_TOO_BIG_LIMIT:
259
293
  # Error("カートにある商品数が多すぎます。")
260
- MAX_ITEMS_IN_CARTS = 10
261
- if cart.num_items() > MAX_ITEMS_IN_CARTS:
294
+ MAX_ITEMS_IN_CART = 10
295
+ if cart.num_items() > MAX_ITEMS_IN_CART:
262
296
  Error("カートにある商品数が多すぎます。")
263
297
 
264
298
  = 他の例
265
299
 
266
300
  * 範囲を指定するときは\n
267
301
  (({first}))と(({last}))を使う
268
- * 包括/排他的範囲には\n
269
- (({begn}))と(({end}))を使う
302
+ * 包含/排他的範囲には\n
303
+ (({begin}))と(({end}))を使う
270
304
  * …
271
305
  * (詳細は本を買ってください)
272
306
 
@@ -294,8 +328,11 @@
294
328
 
295
329
  * 「誤解されない名前」を考えた
296
330
  * (({filter}))はあいまい
331
+ * →(({select}))/(({exclude}))
297
332
  * (({Clip}))もあいまい
333
+ * →(({Truncate}))
298
334
  * (({TOO_BIG_LIMIT}))もあいまい
335
+ * →(({MAX_ITEMS_IN_CART}))
299
336
 
300
337
  = まとめ(3)
301
338
 
@@ -5,12 +5,12 @@ tags:
5
5
  - rabbit
6
6
  - readable-code
7
7
  - schoo
8
- presentation_date: 2014-12-9
9
- version: 2014.12.9.2
8
+ presentation_date: 2014-12-09
9
+ version: 2014.12.9.3
10
10
  licenses:
11
11
  - CC BY-SA 4.0
12
- slideshare_id:
13
- speaker_deck_id:
12
+ slideshare_id: schoo-readable-code-2014-12
13
+ speaker_deck_id: ming-zhu-ridaburukodo-yoriliang-ikodowoshu-kutamefalsesinpurudeshi-jian-de-natekunituku-wojie-shuo-zhe-to-xu-nidu-mijie-kou
14
14
  ustream_id:
15
15
  vimeo_id:
16
16
  youtube_id:
@@ -19,5 +19,5 @@ author:
19
19
  name: Kouhei Sutou
20
20
  email: kou@clear-code.com
21
21
  rubygems_user: kou
22
- slideshare_user:
23
- speaker_deck_user:
22
+ slideshare_user: kou
23
+ speaker_deck_user: kou
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rabbit-slide-kou-schoo-readable-code-2014-12
3
3
  version: !ruby/object:Gem::Version
4
- version: 2014.12.9.2
4
+ version: 2014.12.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-04 00:00:00.000000000 Z
11
+ date: 2014-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rabbit