ゆるふわ読書会
      • 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 New
    • Engagement control
    • Make a copy
    • 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 Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Make a copy 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
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # ゆるふわ読書会 第三回 課題図書 --- - [リーダブルコード](https://www.amazon.co.jp/dp/4873115655) @jupipi --- - 7章 - if(調査対象の式{あまり変化しない} > 比較対象の式{変化する式}) - if/else文の書き方 条件は否定形より肯定系を使う - 関心を引く条件や目立つ条件を先に書く - 三項演算子は割と出てくることが多い(特にフロントエンド側の処理のさいが多い) - do/while文はあまり出てこない?ような気がする - if (条件)return文ですぐにreturnする文を書くことは多い - gotoなんて見たことナッシング - 構成要素がよくわからん(スレッド、シグナル/割り込みハンドラ、例外、関数ポインタと無名関数、仮想メソッド - 8章 - 個人的にはこの章の考え方は一番身に付けたい(普段の課題を分割する方法にも通じる思考のような気がする) - 説明変数はわかりやすい名前をつける - 優雅な手法を見つけるは発想を逆転して終点から始まるという発想はなかった - 巨大な文を分割する時に要約変数として関数の最上部にまとめる - 9章   - 変数のスコープは縮めた方が良い(メソッドをできるだけstaticにする)   - 大きなクラスを小さなクラスに分割する   - submmittedはよくわらかん   - 8章の要約変数と定義の位置を下げるは同じ意味では?どゆこと? @gkzz --- - 7章 - if文における左辺と右辺に書くこと - 数学でも左辺に変数、右辺に変数に代入されるものを書くからしっくりきた - 複数の条件が連なるときに最初に書く条件 - 単純なものは同意。 - 関心を引くものは実装社の主観によるところが多い感がしてなんとも。 - 否定形と肯定系については、条件式に続くケースがシンプルなものを書くようにしている。 - if-else文の条件が視界に入るように。 - ネストの深さの対処法として早くreturnするというのはコーディングレビューで学んだ - ネストの深さとif-eleeの条件式の順番の決め方はトレードオフにも。 - 8章 - ド・モルガンの法則。 - boolean値のようなものを定義して、boolean値がカラ、Falseであるかみたいな書きっぷりはすることがある。 - 第三者でも分かる命名規則として、is_activeが思いついたけど、もう少し具体的にするとしたらなんだろう? - xxx_found,xxxFoundとか? - 9章 - 最後のwhile -> for-loopを使っての改善事例 - 抽象化して法則、フレームワークとして落とし込むとしたらどうすればよいのだろう。 - 本書で記載されているように、「変数を減らすこと」くらい? @aitsuba --- - 7章 - 条件式の引数の並び順 - Javaはequalsで比較する場合があるため、 - - if(HOGE.equals(hogehoge)){ ... } - - の場合左に変化しない値を書くことを強制される。(ヌルポを防ぐため) - ヨーダ記法は完全非推奨 - 引数名自体に意味をもたせるべき - if/else ブロックの並び順 - 「!」は個人的に見づらいので嫌いです。 - 三項演算子 - 一行で書きたいときによく使う(HTMLのインラインで書きたいときとか) - do/while ループは避ける - モダンな言語ではループしなくていいようなライブラリが追加されたりしてる印象 - (JavaのStreamAPIなど) - 基本的にループが必要な処理はコレクションに対しての操作に使うので他の方法があればそっちを使う - 関数から早く返す - 関数内で変数を作ってそれをreturnで返す書き方をする人がよくいるが、やめたほうがいいと思う - returnで都度値を返したほうが戻り値がなにかわかりやすくなる。 - 悪名高き goto - 使ったことない - ネストを浅くする - ネストの深さは闇の深さ - 設計書の条件をそのままコードに落とすと深くなりがち - モジュールごとに分割することが重要 - returnを使う - まとめ - 複雑になりそうなら別の方法を考える - 8章 - 説明変数 - 要約変数 - 名前は知らなかったけどこれもよく使う - 条件判定結果自体を変数に入れて使い回す書き方は結構好きで、 - if文の引数内が複雑になるだけでバグが頻発するのでシンプルにするためにも重要 - 三項演算子が使いやすくなる - ド・モルガンの法則を使う - よくわからなかったので誰か教えて(´・ω・`) - まとめ - ちゃんとモジュールに分割しなさいということだと思った - 9章 - JavaScriptのグローバルスコープ - 情報が古い - varによる変数定義は非推奨となっており、 - strictモードによって変数定義をしないとエラーとなるようにできる - let constを使うことでブロックスコープを生成することができる。

    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