ゆるふわ読書会
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # ゆるふわ読書会 第二回 課題図書 --- - [リーダブルコード](https://www.amazon.co.jp/dp/4873115655) @jupipi --- - 3章 - filter()は配列から絞る時にプロジェクトでは使われているが、避けるべき? - beginとendはあまり使っている印象がない - ブールはisはよく使っているhasもcan,shouldはあまり - max,minも使うがそれ以外はあまり使わない? - 4章 - コードの「見た目をよく」すれば、表面上の改善だけではなく、コードの構造も改善できる - ぶっちゃけまずは動くコードも書くことが先決なためまだその領域に達せていない - Linterのお陰でコードの整形は担保してくれている。 - 処理事にかたまりにしたり、段落にするのは確かに現場でもやっている(自分ができているかは別) - この章はコーディング規約が書いてあればそれに従い、なければプロジェクトのコードを読んでその通り書くしかなさそう - 5章 - 関数の名前でわかりにくい処理をわかりやすい命名規則をつけることで、わかりやすく(とにかく短くすることしか考えていなかった) - 現場だとコードの処理よりも変数の中身?をコメントで書いてあることが多い気がする - 酷いコードに優れたコメントをつけるより、優れたコードの方が良い - 今のプロジェクトだとそんなに頻繁にコメントを書いてある様子はない(単純にコードが見やすいから?) - 6章 - コードもコメントも考え方的には同じだと読んでいて感じた - 簡潔にかつ読みやすく、短すぎず長すぎず - 正直、わかりやすいコメントを書く領域まで達することができていない @gkzz --- - 3章 - プログラミングの変数の命名力は、最低限の英語力があれば、ドキュメントで使われる単語で知ったほうが良いと思う - 4章 - 改行する、しないはプロジェクトのローカルルールに従う、なければGoogleらが出しているコーディング規約に従う - > 3.2 パッケージ文 - > パッケージ文は 改行してはならない。 文字数制限(4.4節 文字数制限は100文字 )はパッケージ文には適用されない。 - > import文は 改行してはならない。 文字数制限(4.4節 文字数制限は100文字 )はimport文には適用されない。 - cf. [Google Java Style Guide (非公式和訳)](https://kazurof.github.io/GoogleJavaStyle-ja/) - 5章 - コードには How テストコードには What コミットログには Why **`コードコメントには Why not`** https://twitter.com/t_wada/status/904916106153828352?s=20 - コメントの目的は、書き手の意図を読み手に知らせること - **`コメントするべきでは「ない」ことを知る。`** - コー ドを書いているときの自分の考えを記録する。 - 読み手の立場になって何が必要になるかを考える。 - コードからすぐにわかることをコメントに書かない。 - ひどい名前はコメントをつけずに名前を変える - TODO/FIXMEなどが付いたコメントが消えることケースに出会ったことがない - 「コードからすぐ分かることはコメントしない」と「あまり知られていない書き方の解説をするためにコメントする」塩梅とは? - ファイルの機能に関する要約コメントまでいるか - ココでいうコメントとは、たとえばpythonのmethodの下にコメントアウトされたメソッドのディスクリプションのことなら必要と思う。ディスクリプションは__docs__で取得可能。 - 6章 - コメントの改善方法はなるほどと感じた。同時にバーバラミントのロジックピラミッドのイラストを思い出した。本来は自分の閃いたコメントに対して自問自答して上方の密度を高めていくべきだろうけどできていな い。できていないのは自問自答が面倒だと思っているから。 ![](https://i.imgur.com/SeHFZXZ.png =200x) @あれふ --- - 3章 - 処理の目的に対して適切な名前を付けるように意識する - この本では「これが正解!」ということではなく、ちゃんと考えようね、という問いかけ - 名前は何度も叩いて叩いて検討するに値する - コードレビューで議論にしよう - 同じ処理内容でも適切な名前をつけたメソッドでラップする - 4章 - IDEのフォーマッターを必ず使用する - コードレビュー時にフォーマットがかかっていないコードを上げてはいけない - レビューアの脳リソースを奪う害悪 - 保存すると自動でフォーマットされる設定にするとベスト - 定義や引数をスペースで調整して表形式にすると可読性が上がる - Linuxコマンドのヘルプドキュメントは綺麗に整列されていて苦労が垣間見える - 5章 - 意味のあるコメント - コメントに**気持ちを込めるッ!** - 経験則的に「優れたコードであればコメントはいらない」を語弊して認識している人がいる - コメント不要/必要の2択ではない - どんなに優れたコードでも英語圏の人と日本語圏の人では前提が異なる - メソッド名だけで表現するには限界があるのでコメントは補助的に活用した方が良い - 実装する前に「何をするのか」を先にコメントで羅列するといい - 実装してコメントが不要になれば削除 - 読み手の助けになるようであればより具体的にして残す - 6章 - メソッドのドキュメントに使用方法や実例を記述する - JSDoc,JavaDocという便利な機能がある - IDEではドキュメント参照できて**利用する側**にとって役に立つ @akaiwa ---

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully