Upgrade to Pro — share decks privately, control downloads, hide ads and more …

読みやすいコードの書き方 第 2 回 / Code readability: Session 2 (ver. 2, Ja)

読みやすいコードの書き方 第 2 回 / Code readability: Session 2 (ver. 2, Ja)

第 2 回: 命名

---

セッションリスト

第 1 回: 導入と原則
- https://speakerdeck.com/munetoshi/code-readability-session-1-ver-2-ja

第 2 回: 命名
- https://speakerdeck.com/munetoshi/code-readability-session-2-ver-2-ja

第 3 回: コメント
- https://speakerdeck.com/munetoshi/code-readability-session-3-ver-2-ja

第 4 回: 状態
- https://speakerdeck.com/munetoshi/code-readability-session-4-ver-2-ja

第 5 回: 関数
- https://speakerdeck.com/munetoshi/code-readability-session-5-ver-2-ja

第 6 回: 依存関係 I
- https://speakerdeck.com/munetoshi/code-readability-session-6-ver-2-ja

第 7 回: 依存関係 II
- https://speakerdeck.com/munetoshi/code-readability-session-7-ver-2-ja

第 8 回: レビュー
- https://speakerdeck.com/munetoshi/code-readability-session-8-ver-2-ja

---

関連書籍 「読みやすいコードのガイドライン - 持続可能なソフトウェア開発のために」
- https://gihyo.jp/book/2022/978-4-297-13036-7

英語版のリスト: https://gist.github.com/munetoshi/65a1b563fb2c271f328c121a4ac63571#file-code-readability-links-md

以前のバージョン (英語): https://speakerdeck.com/munetoshi/code-readability

© 2019-2023 Munetoshi Ishikawa, supported by LINE corporation

Munetoshi Ishikawa

May 11, 2023
Tweet

More Decks by Munetoshi Ishikawa

Other Decks in Programming

Transcript

  1. ಡΈ΍͍͢-ίʔυͷ-ॻ͖ํ ୈ-2-ճ
    ໋_໊

    View full-size slide

  2. લճͷ͓͞Β͍: ಋೖͱݪଇ
    ಡΈ΍͍͢ίʔυ: ੜ࢈ੑΛҡ࣋͢Δखஈ
    ϘʔΠεΧ΢τϧʔϧ: ίʔυมߋલΑΓಡΈ΍͘͢
    YAGNI: ඞཁʹͳͬͨͱ͖ʹॳΊ࣮ͯ૷
    KISS: ୯७ͳํ๏Λ࢖͏, ඒ͍͠ != ಡΈ΍͍͢
    ୯Ұ੹೚ݪଇ: ੹೚ൣғΛ໌֬ʹ
    ࣌ظঘૣͳ࠷దԽ: ࠷దԽͷલʹϓϩϑΝΠϦϯάɾݟੵ΋Γ

    View full-size slide

  3. ߨٛͷߏ੒
    - ಋೖͱݪଇ
    - ࣗવݴޠ: ໋໊, ίϝϯτ
    - ܕͷߏ଄: ঢ়ଶ, ؔ਺
    - ܕؒͷߏ଄: ґଘؔ܎I, ґଘؔ܎II
    - ϨϏϡʔ
    ໋໊ > ಋೖ

    View full-size slide

  4. ໋໊ͷର৅
    - Ϋϥε, ΠϯλʔϑΣΠε, ྻڍܕ, ߏ଄ମ, ϓϩτίϧ, τϨΠτ
    - ม਺, ϓϩύςΟ, ϑΟʔϧυ, ύϥϝʔλ, ఆ਺
    - ؔ਺, ϝιου, खଓ͖, αϒϧʔνϯ
    - είʔϓ, ύοέʔδ, Ϟδϡʔϧ, ໊લۭؒ
    - Ϧιʔε, ϑΝΠϧ, σΟϨΫτϦ, ID
    - etc.
    ໋໊ > ಋೖ

    View full-size slide

  5. Α໊͍લͱ͸
    ਖ਼֬
    - isVisible ΛʮԻʯʹ࢖ͬͯ͸͍͚ͳ͍
    આ໌త
    - w / h ΑΓ΋ width / height
    - image ΑΓ΋ imageView / imageBitmap / imageUrl
    ໋໊ > ಋೖ

    View full-size slide

  6. Α໋໊͍Λ͢Δʹ͸
    - ਖ਼͍͠จ๏Λ࢖͏
    - ʮ͍ͭɾͩΕ͕ʯΑΓʮԿʯΛઆ໌͢Δ
    - ҙຯͷڱ͍ޠΛબͿ
    - ࠞཚΛটུ͘ޠΛආ͚Δ
    - ܕ΍୯ҐΛࣔ͢୯ޠΛՃ͑Δ
    - ߠఆతͳදݱΛ࢖͏
    ໋໊ > ಋೖ

    View full-size slide

  7. ࠓճͷ಺༰
    - ਖ਼͍͠จ๏Λ࢖͏
    - ʮ͍ͭɾͩΕ͕ʯΑΓʮԿʯΛઆ໌͢Δ
    - ҙຯͷڱ͍ޠΛબͿ
    - ࠞཚΛটུ͘ޠΛආ͚Δ
    - ܕ΍୯ҐΛࣔ͢୯ޠΛՃ͑Δ
    - ߠఆతͳදݱΛ࢖͏
    ໋໊ > ಋೖ

    View full-size slide

  8. จ๏͕ॏཁͳཧ༝
    ໰୊ 1: CallbackEventMessageClickViewText ͸ԿΛҙຯ͢Δʁ
    ղ౴ 1ʁ: A text of a click view (?) of callback event message (???)
    ໰୊ 2: MessageTextViewClickEventCallback ͸ԿΛҙຯ͢Δʁ
    ղ౴ 2: A callback of click events on a message text view
    ໋໊ > ਖ਼͍͠จ๏Λ࢖͏

    View full-size slide

  9. ਖ਼͍͠จ๏Λ࢖͏
    ʮจ๏ʯ͸ϓϩάϥϛϯάݴޠ΍ن໿ʹґଘ͢Δ
    Java / Kotlin ͷྫΛ঺հ
    ໋໊ > ਖ਼͍͠จ๏Λ࢖͏

    View full-size slide

  10. ໊લͷछྨ 1/2
    - ໊ࢺ: Ϋϥεɾม਺ɾঢ়ଶ΍ଐੑΛࣔؔ͢਺
    imageView, HashSet, indexOf
    - ໋ྩܗ: ؔ਺
    findMessage, compareTo
    ໋໊ > ਖ਼͍͠จ๏Λ࢖͏

    View full-size slide

  11. ໊લͷछྨ 2/2
    - ܗ༰ࢺɾ෼ࢺ: ΠϯλʔϑΣΠεɾঢ়ଶΛࣔ͢ܕ΍஋
    Iterable
    ,
    PLAYING
    ,
    CONNECTED
    - ٙ໰ܗɾࡾਓশͷ(ॿ)ಈࢺ: ਅِ஋ɾਅِ஋Λฦؔ͢਺
    isTextVisible
    ,
    contains
    ,
    equalsTo
    ,
    may
    /
    shouldShow
    - લஔࢺΛ࣋ͭ෭ࢺ: ܕม׵Λ͢Δؔ਺, ίʔϧόοΫؔ਺
    toInt
    ,
    fromMemberId
    ,
    onClickEvent
    ໋໊ > ਖ਼͍͠จ๏Λ࢖͏

    View full-size slide

  12. จ๏: ໊ࢺ
    ॏཁͳ୯ޠΛ࠷ޙʹஔ͘
    (= ࠷ޙͷ୯ޠͰͦΕ͕ԿͰ͋Δ͔ɾԿΛ͢Δ͔Λࣔ͢)
    !
    :
    MessageEventHandler
    ,
    buttonHeight
    !
    :
    xyzHeightForPortrait
    (Ϋϥε໊ͱͯ͠͸ෆద)
    !
    :
    HandlerMessageEvent
    (ϋϯυϥͷ৔߹),
    heightPortrait
    ྫ֎: ʮঢ়ଶ΍ଐੑΛࣔؔ͢਺໊ʯ͸લஔࢺͰऴΘΔ৔߹͕͋Δ
    e.g.,
    indexOf(value)
    ,
    maxValueIn(array)
    ໋໊ > ਖ਼͍͠จ๏Λ࢖͏

    View full-size slide

  13. จ๏: ໋ྩܗ
    ಈࢺΛ࠷ॳʹஔ͘
    "X Λऔಘ͢Δ":
    !
    getX,
    "
    xGet
    "Y Λ౤ߘ͢Δ":
    !
    postY,
    "
    yPost
    "Z ʹରԠͤ͞Δ":
    !
    mapToZ,
    "
    toZMap, zToMap
    ໋໊ > ਖ਼͍͠จ๏Λ࢖͏

    View full-size slide

  14. ؒҧͬͨޠॱ͕࢖ΘΕΔཧ༝
    class UserActionEvent
    class UserActionEventSwipe: UserActionEvent()
    class UserActionEventClickMessageText: UserActionEvent()
    class UserActionEventClickProfileImage: UserActionEvent()
    mutableListOf()
    ίʔυΛʮ࢖͏ଆʯͰͲ͏ݟ͑Δ͔͕ॏཁ
    ݟͨ໨ͷ౷Ұײ ͷΈʹয఺Λ౰ͯͯ͸ͳΒͳ͍
    ໋໊ > ਖ਼͍͠จ๏Λ࢖͏

    View full-size slide

  15. จ๏: ·ͱΊ
    - ໊લͷछྨ
    ໊ࢺɾ໋ྩܗɾܗ༰ࢺɾٙ໰จ(+ࡾਓশ)ɾ෭ࢺ
    - ޠॱͷॏཁੑ
    ίʔυΛʮ࢖͏ଆʯͰͲ͏ݟ͑Δ͔
    ໋໊ > ਖ਼͍͠จ๏Λ࢖͏

    View full-size slide

  16. ࠓճͷ಺༰
    - ਖ਼͍͠จ๏Λ࢖͏
    - ʮ͍ͭɾͩΕ͕ʯΑΓʮԿʯΛઆ໌͢Δ
    - ҙຯͷڱ͍ޠΛબͿ
    - ࠞཚΛটུ͘ޠΛආ͚Δ
    - ܕ΍୯ҐΛࣔ͢୯ޠΛՃ͑Δ
    - ߠఆతͳදݱΛ࢖͏
    ໋໊ > ʮ͍ͭɾͩΕ͕ʯΑΓʮԿʯΛઆ໌͢Δ

    View full-size slide

  17. ʮ͍ͭɾͩΕ͕ʯΑΓʮԿʯΛઆ໌͢Δ
    දݱ͢Δ΂͖಺༰
    !
    ͦͷม਺΍Ϋϥε͕ Կ Ͱ͋Δ͔
    !
    ͦͷؔ਺͕ Կ Λ͢Δ͔
    ݴٴ͢Δ΂͖Ͱͳ͍಺༰
    !
    ͦͷίʔυΛ ͩΕ ͕࢖͏͔
    !
    ͦͷίʔυ͕ ͍ͭɾͲ͜ͰɾͳͥɾͲͷΑ͏ʹ ࢖ΘΕΔ͔
    ໋໊ > ʮ͍ͭɾͩΕ͕ʯΑΓʮԿʯΛઆ໌͢Δ

    View full-size slide

  18. ؔ਺໊ͷྫ: એݴଆ
    !
    ͦͷؔ਺͕ Կ Λ͢Δ͔Λදݱ͢Δ
    class MessageRepository {
    fun storeReceivedMessage(data: MessageData) {
    !
    ͦͷؔ਺͕ ͍ͭ ݺ͹ΕΔ͔Λදݱ͢Δ
    class MessageRepository {
    fun onMessageReceived(data: MessageData) {
    ໋໊ > ʮ͍ͭɾͩΕ͕ʯΑΓʮԿʯΛઆ໌͢Δ

    View full-size slide

  19. ؔ਺໊ͷྫ: ݺͼग़͠ଆ
    !
    ݺͼग़͠ଆͷίʔυͰ Կ͕ى͖Δ͔͕Θ͔Δ
    repository.storeReceivedMessage(messageData)
    presenter.showNewReceivedMessage(messageData)
    !
    ݺͼग़͠ଆͷίʔυͰ Կ͕ى͖Δ͔͕Θ͔Βͳ͍
    repository.onMessageReceived(messageData)
    presenter.onMessageReceived(messageData)
    ໋໊ > ʮ͍ͭɾͩΕ͕ʯΑΓʮԿʯΛઆ໌͢Δ

    View full-size slide

  20. ؔ਺໊ͷྫ: ʮ͍ͭʯ͕Α͘ͳ͍ผͷཧ༝
    ؔ਺ͷ੹೚͕ᐆດʹͳΔ
    class MessageViewPresenter {
    fun onMessageReceived(data: MessageData) {
    // View presentation code for new message ...
    repository.onMessageReceived(data) // !!
    ॏෳݺͼग़͠ͷόάͷݪҼʹͳΔ͜ͱ΋
    repository.onMessageReceived(messageData)
    presenter.onMessageReceived(messageData)
    ໋໊ > ʮ͍ͭɾͩΕ͕ʯΑΓʮԿʯΛઆ໌͢Δ

    View full-size slide

  21. Ҿ਺໊ͷྫ: એݴଆ
    !
    true ͷͱ͖ Կ͕ى͜Δ͔͕Θ͔Δ
    fun showHistory(shouldShowDialogOnError: Boolean)
    !
    true ͷͱ͖ Կ͕ى͜Δ͔Θ͔Βͳ͍
    fun showHistory(isCalledAtMainScreen: Boolean)
    ໋໊ > ʮ͍ͭɾͩΕ͕ʯΑΓʮԿʯΛઆ໌͢Δ

    View full-size slide

  22. Ҿ਺໊ͷྫ: ʮͩΕʯ͕Α͘ͳ͍ཧ༝
    1: ໊લ͕ ࠷৽ͷঢ়گ ͱҰக͠ͳ͘ͳΔ
    // ... from another screen requiring dialog
    showHistory(isCalledAtMainScreen = true)
    2: Ҿ਺͕ ଞͷ໨త ͷͨΊʹ࢖ΘΕΔ
    if (isCalledAtMainScreen) { setScreenTitle("Main") ...
    1 ͱ 2 ͕ಉ࣌ʹى͜Δͱ όά͕ൃੜ͢Δ
    ໋໊ > ʮ͍ͭɾͩΕ͕ʯΑΓʮԿʯΛઆ໌͢Δ

    View full-size slide

  23. ʮԿʯΛઆ໌͢Δ: ྫ֎
    ʮԿʯΛ͢Δ͔͕ܾ·͍ͬͯͳ͍ ந৅ίʔϧόοΫؔ਺
    ྫ: onClicked, onSwiped, onDestroyedɹ
    ໋໊ > ʮ͍ͭɾͩΕ͕ʯΑΓʮԿʯΛઆ໌͢Δ

    View full-size slide

  24. ʮԿʯΛઆ໌͢Δ: ྫ֎
    ʮԿʯΛ͢Δ͔͕ܾ·͍ͬͯͳ͍ ந৅ίʔϧόοΫؔ਺
    ྫ: onClicked, onSwiped, onDestroyedɹ
    ʮ͍ͭɾͲͷΑ͏ʹʯͰ໋໊͔͠Ͱ͖ͳ͍
    ίʔϧόοΫͰ΋ʮԿʯΛ͢Δ͔͕ܾ·͍ͬͯΔ৔߹ʹ஫ҙ
    abstract fun toggleSelectionState()
    ...
    view.setClickCallback { toggleSelectionState() }
    ໋໊ > ʮ͍ͭɾͩΕ͕ʯΑΓʮԿʯΛઆ໌͢Δ

    View full-size slide

  25. ʮԿʯΛઆ໌͢Δ: ·ͱΊ
    ͦΕ͕ʮԿʯͰ͋Δ͔ɾʮԿʯΛ͢Δ͔Λઆ໌͢Δ
    =ʮͩΕɾ͍ͭɾͲ͜ͰɾͳͥɾͲͷΑ͏ʹʯʹ͸ݴٴ͠ͳ͍
    - ੹೚Λ໌ࣔ͢Δ
    - ʮ࢖͏ଆʯͷίʔυΛಡΈ΍͘͢͢Δ
    ྫ֎: ԿΛ͢Δ͔͕ܾ·͍ͬͯͳ͍ந৅ίʔϧόοΫؔ਺
    ໋໊ > ʮ͍ͭɾͩΕ͕ʯΑΓʮԿʯΛઆ໌͢Δ

    View full-size slide

  26. ࠓճͷ಺༰
    - ਖ਼͍͠จ๏Λ࢖͏
    - ʮ͍ͭɾͩΕ͕ʯΑΓʮԿʯΛઆ໌͢Δ
    - ҙຯͷڱ͍ޠΛબͿ
    - ࠞཚΛটུ͘ޠΛආ͚Δ
    - ܕ΍୯ҐΛࣔ͢୯ޠΛՃ͑Δ
    - ߠఆతͳදݱΛ࢖͏
    ໋໊ > ҙຯͷڱ͍ޠΛબͿ

    View full-size slide

  27. ୯ޠͷҙຯͷ޿͞: ྫ 1/2
    ໰୊: initializationFlag ͸ԿΛҙຯ͢Δʁ
    - shouldInitialize
    - isInitializing
    - is/wasInitialized
    - isInitializable
    - isNotInitialized (!!)
    ʢ࠷ޙҎ֎ͷʣ্هͷͲΕ͔Ͱஔ͖׵͑Δ
    ໋໊ > ҙຯͷڱ͍ޠΛબͿ

    View full-size slide

  28. ୯ޠͷҙຯͷ޿͞: ྫ 2/2
    ໰୊: sizeLimit ͸ԿΛҙຯ͢Δʁ
    - max, minʁ
    - height, width, byte, characters, lengthʁ
    maxHeight ౳ͱ໋໊͢Δ
    ໋໊ > ҙຯͷڱ͍ޠΛબͿ

    View full-size slide

  29. ஔ͖׵͑Δ΂͖୯ޠͷྫ
    - flag: is, was, should, can, may, will ...
    - check: is, query, verify, measure, filter, notify, update ...
    - good, fine: valid, completed, reliable, secure, satisfies ...
    - old: previous, stored, expired, invalidated, deprecated ...
    - tmp, retval: ࣮ࡍͷ໊લ
    ࣙॻ΍ྨޠࣙయΛ࢖͏
    ໋໊ > ҙຯͷڱ͍ޠΛબͿ

    View full-size slide

  30. ҙຯͷڱ͍ޠΛબͿ: ·ͱΊ
    - flag ΍ check ౳ͷ ҙຯͷ޿͍୯ޠ Λஔ͖׵͑Δ
    - ࣙॻ ΍ ྨޠࣙయ Λ࢖͏
    ໋໊ > ҙຯͷڱ͍ޠΛબͿ

    View full-size slide

  31. ࠓճͷ಺༰
    - ਖ਼͍͠จ๏Λ࢖͏
    - ʮ͍ͭɾͩΕ͕ʯΑΓʮԿʯΛઆ໌͢Δ
    - ҙຯͷڱ͍ޠΛબͿ
    - ࠞཚΛটུ͘ޠΛආ͚Δ
    - ܕ΍୯ҐΛࣔ͢୯ޠΛՃ͑Δ
    - ߠఆతͳදݱΛ࢖͏
    ໋໊ > ࠞཚΛটུ͘ޠΛආ͚Δ

    View full-size slide

  32. ུޠ: ྫ 1/2
    ໰୊: im ͱ͍͏໊લ͸ԿΛҙຯ͢Δʁ
    input method, illegal message, instance manager ...
    ಠࣗͷུޠΛආ͚Δ
    ʮೝࣝʯ͸ʮ૝ىʯΑΓ΋؆୯3
    3 100 Things: Every Designer Needs to Know About People, Susan Weinschenk, 2011
    ໋໊ > ࠞཚΛটུ͘ޠΛආ͚Δ

    View full-size slide

  33. ུޠ: ྫ 2/2
    ໰୊: str ͱ͍͏໊લ͸ԿΛҙຯ͢Δ?
    string, structure, stream, streak, street, sorted transaction record
    Ұൠతͳུޠ͸ڐ༰Ͱ͖Δ͜ͱ΋
    - URL ΍ TCP ౳ͷ࢖༻͸໰୊ͳ͍
    - string Λҙຯ͢Δ str ͸ ݶΒΕͨείʔϓ ͳΒڐ༰͞ΕΔ͔΋
    ໋໊ > ࠞཚΛটུ͘ޠΛආ͚Δ

    View full-size slide

  34. ϓϩμΫτݻ༗ͷུޠ
    ϓϩμΫτݻ༗ͷུޠ͕࢖ΘΕΔ͜ͱ͕͋Δ
    νʔϜͷ৽نϝϯόʔ͕ཧղͰ͖ΔΑ͏ʹ͢Δ
    - Ϋϥεɾؔ਺ɾม਺ͷυΩϡϝϯςʔγϣϯΛॻ͘
    - ༻ޠूΛผ్༻ҙ͓ͯ͘͠
    ໋໊ > ࠞཚΛটུ͘ޠΛආ͚Δ

    View full-size slide

  35. ࠞཚΛটུ͘ޠΛආ͚Δ: ·ͱΊ
    - ಠࣗͷུޠ: ࢖Θͳ͍
    - Ұൠతͳུޠ: ڐ༰͞ΕΔ͜ͱ͕͋Δ
    - ϓϩμΫτݻ༗ͷུޠ: υΩϡϝϯςʔγϣϯɾ༻ޠूͰઆ໌
    ໋໊ > ࠞཚΛটུ͘ޠΛආ͚Δ

    View full-size slide

  36. ࠓճͷ಺༰
    - ਖ਼͍͠จ๏Λ࢖͏
    - ʮ͍ͭɾͩΕ͕ʯΑΓʮԿʯΛઆ໌͢Δ
    - ҙຯͷڱ͍ޠΛબͿ
    - ࠞཚΛটུ͘ޠΛආ͚Δ
    - ܕ΍୯ҐΛࣔ͢୯ޠΛՃ͑Δ
    - ߠఆతͳදݱΛ࢖͏
    ໋໊ > ܕ΍୯ҐΛࣔ͢୯ޠΛՃ͑Δ

    View full-size slide

  37. ܕ΍୯ҐΛࣔ͢୯ޠΛՃ͑Δ
    ʮ੔਺ܕʯͰ͸୯Ґ΍࣮ମ͕ᐆດͳ͜ͱ͕͋Δ
    - timeout: timeoutInMillis, timeoutInSeconds
    - width: widthInPixels, widthInPoints, widthInInches
    - color: argbColorInt, colorResId
    - i, j, k: userIndex, row, col
    ໋໊ > ܕ΍୯ҐΛࣔ͢୯ޠΛՃ͑Δ

    View full-size slide

  38. ܕ΍୯ҐΛࣔ͢୯ޠΛՃ͑Δ: ༨ஊ
    ΫϥεͰ୯ҐΛදݱ͢Δ͜ͱ΋Մೳ
    class Inch(val value: Int)
    class Centimeter(val value: Int)
    fun setWidth(width: Inch) = ...
    setWidth(Centimeter(10)) // Compile error!
    - Scala ͷ஋Ϋϥε΍ Kotlin ͷΠϯϥΠϯΫϥε౳΋༗ޮ
    - Kotlin ͷ Duration ͷΑ͏ʹ୯ҐΛಁաతʹѻ͏͜ͱ΋Ͱ͖Δ
    ໋໊ > ܕ΍୯ҐΛࣔ͢୯ޠΛՃ͑Δ

    View full-size slide

  39. ࠓճͷ಺༰
    - ਖ਼͍͠จ๏Λ࢖͏
    - ʮ͍ͭɾͩΕ͕ʯΑΓʮԿʯΛઆ໌͢Δ
    - ҙຯͷڱ͍ޠΛબͿ
    - ࠞཚΛটུ͘ޠΛආ͚Δ
    - ܕ΍୯ҐΛࣔ͢୯ޠΛՃ͑Δ
    - ߠఆతͳදݱΛ࢖͏
    ໋໊ > ߠఆతͳදݱΛ࢖͏

    View full-size slide

  40. ߠఆతͳදݱΛ࢖͏
    !
    : ߠఆతͳޠ, isEnabled
    !
    : ൱ఆతͳޠ, isDisabled
    !
    : ߠఆతͳޠ + notɾnoɾnon, isNotEnabled
    !
    : ൱ఆతͳޠ + notɾnoɾnon, isNotDisabled
    isNotDisabled → isEnabled isNotEnabled → isDisabled ͸
    ୯७ʹஔ׵Մೳ
    ໋໊ > ߠఆతͳදݱΛ࢖͏

    View full-size slide

  41. ࠓճͷ಺༰
    - ਖ਼͍͠จ๏Λ࢖͏
    - ʮ͍ͭɾͩΕ͕ʯΑΓʮԿʯΛઆ໌͢Δ
    - ҙຯͷڱ͍ޠΛબͿ
    - ࠞཚΛটུ͘ޠΛආ͚Δ
    - ܕ΍୯ҐΛࣔ͢୯ޠΛՃ͑Δ
    - ߠఆతͳදݱΛ࢖͏
    ໋໊ > ݴޠɾϓϥοτϑΥʔϜɾϓϩμΫτͷن໿ʹै͏

    View full-size slide

  42. ࠓճͷ಺༰: ௥Ճ
    ݴޠɾϓϥοτϑΥʔϜɾϓϩμΫτͷن໿ʹै͏
    ໋໊ > ݴޠɾϓϥοτϑΥʔϜɾϓϩμΫτͷن໿ʹै͏

    View full-size slide

  43. ݴޠɾϓϥοτϑΥʔϜɾϓϩμΫτͷن໿ʹै͏
    ݴޠɾϓϥοτϑΥʔϜݻ༗ͷ ن໿ɾϧʔϧɾෆจ཯ ʹै͏
    - จ๏: itemCount vs. numItem
    - ུޠ: milliSeconds vs. millis vs. ms
    ඪ४ϥΠϒϥϦɾAPI Λࢀর͢Δ
    ෆ໌ͳ఺ʹ͍ͭͯ͸ϓϩμΫτͰن໿ΛఆΊΔ
    ໋໊ > ݴޠɾϓϥοτϑΥʔϜɾϓϩμΫτͷن໿ʹै͏

    View full-size slide

  44. ·ͱΊ
    ໊લ͸ਖ਼͔֬ͭઆ໌తʹ
    - ໊લͷࣔ͢಺༰: ʮ͍ͭɾͩΕʯΑΓʮԿʯ
    - จ๏: ॏཁͳ୯ޠͷҐஔ
    - ୯ޠ: ҙຯ͕ڱ͍ɾলུ͠ͳ͍ɾߠఆత
    ໋໊ > ·ͱΊ

    View full-size slide