alatbah24
    • Create new note
    • Create a note from template
      • 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
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me 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
    • Save as template
    • 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 Create Help
Create Create new note Create a note from template
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
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me 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
    Here’s your personalized workspace. Explore Grammarly’s suggestions to ensure your writing is at its best. # Best practices for Pull Request Reviewers :::info :bulb: The template is for facilitating the best pull request etiquette agreed upon by us as an organization/Team that fits our culture better. ::: ## :book: Topic on the table ## :small_blue_diamond: PR communication **1. Rephrase your objection as a question** Bad: "This change will make XXX impossible." (This is hyperbole; is it impossible?) Good: "How can we do XXX with your change?" **2. Avoid hyperbole** Simply state your concerns and ask questions to help get to the desired outcome. Bad: "This change will destroy performance." Good: "It seems like doing X might be slower than existing Y; have you measured/gathered data to show it isn't?" Better (if you have time): "In the meantime, I am gathering data to try to verify that X is not slower than Y." Also good: "This change changes this single loop O(n) to a doubly nested loop O(n²); won't this affect performance?" **3. Keep snide comments to yourself** Some thoughts are better kept to yourself. If you can't be civil, don't engage. ``` Bad: "I think this change is bad and will ruin everything." Bad: "Are you sure that software engineering is the right career path for you?" ``` **4. Engage positively** Maybe you had a different idea about how to solve a problem. If you engage positively, you might end up discovering a solution that is better than either original option. ``` Bad: "This change sucks, my version is better." Good: "I also have a similar change at this location XXX: maybe we can compare and/or combine ideas." Also good: "I have a similar change in progress, but I chose to do X because ZZZ; why did you choose Y?" ``` **5. Remember that not everybody's experience is identical to yours** An otherwise completely competent engineer could go for years without knowing some fact that you take as common sense. It's okay to state the obvious, as long as you aren't patronizing or snide about it. ``` Bad: "Can't you see that this is wrong?" Good: "This is incorrect because it causes a null pointer exception when X is Y." ``` **6. Don't diminish the complexity of something that's not obvious** Remember that things that are obvious to you may not be obvious to everyone. Suggesting alternative approaches and pointing out useful examples can help get everyone on the same page. ``` Bad: "Why not simply from the nozzle?" Good: "It might be possible to frob the nozzle, which would simplify this part (see XXX for an example)." ``` **7. Be respectful** Sometimes a submission just doesn't meet a minimum standard for quality. It's okay to say so, but it doesn't cost anything extra to be respectful. ``` Bad: "This is stupid code written by a stupid person." Good: "Thanks for your contribution. However, it cannot be accepted in its current form; there are multiple problems (as outlined above)." Also good: "As outlined above, there are multiple problems with this submission. Maybe we could back up a step and talk about the use cases instead? That could help us find a path forward." ``` **8. Manage expectations (and your time)** If a submission is too large to be reasonably reviewed, it is okay to let the submitter know right away. Keep moving forward. ``` Bad: "I'm not merging this, it's too big." Also bad: Ignoring it until it goes away. Good: "Could you please break this down into smaller changes? I do not have a lot of time for code reviews and this one is just too large/complex to review in one pass." ``` **9. Say please** Just saying "please" goes a long way toward showing that you respect the submitter's time, especially when you want something to be different due to formatting or style, which might seem to be a minor detail of the change. Examples: ``` "Could you please separate the whitespace changes into another pull request?" "Could you please align these variable definitions so they're easier to read?" ``` ## :small_blue_diamond: Take a Deeper Dive: Take a deeper dive into the code pull the branch locally and tinker around with the new methods created ## :small_blue_diamond: Provide examples: It's very useful to articulate your code suggestions by not only using words but also providing a sample example to elaborate. It's often time when I read a suggestion and im left with ??? around what is the ask of the reviewer. Ig: We have a User class that was committed and has a lot of responsibilities: ``` class User attr_accessor :name, :email, :phone_number def initialize(name, email, phone_number) @name = name @email = email @phone_number = phone_number end def send_email(message) # Code to send email end def call_user # Code to call user end def update_phone_number(new_phone_number) @phone_number = new_phone_number end end user = User.new(name, email, phone_number) user.send_email(message) user.call_user user.update_phone_number(new_phone_number) ``` A less effective comment: ``` This is a good start, It might be possible to split the responsibilities. ``` A more effective comment This is a good start, It might be possible to split the responsibilities, which would simplify this part see this example. ``` User.new(name, contact) EmailService.new.send_email(to, message) PhoneService.new.call(phone_number) ``` ## :small_blue_diamond: Addressing conversations peers' conversation: It is best practice to address any comment on PR either by emojis or by commenting back on the initial comment and/or resolving the conversation once there is no more back and forth. ## :small_blue_diamond: PR Eyes: It is best practice to have at least two eyes on our PRs. This number is also based on the number of developers on the team. It simply allows spotting any errors or areas of improvement that one may have missed. ## :small_blue_diamond: Approving VS Block PR: **When is a PR approved?** "When all conversation is addressed and suggestions code quality has been meeting with two thumbs up" **When is a PR gets blocked?** "When there is an obvious problem that if metered will cause a problem where we have to rollback code. blocking a PR should be reserved to when aka 'This code will break master lol' " ## :small_blue_diamond: Straight up Chat: It is also very acceptable to chat with the PR author and bring up your concerns or ever have a chance. concerns

    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