Duo Zhang
    • 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
    • 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 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
    # Software Methodology Recitation 1: Getting Started with IntelliJ, GitHub, and GitHub Copilot Welcome to the first recitation for Software Methodology! In this tutorial, we will guide you through installing IntelliJ IDEA (Community or Pro version), using GitHub for version control, and registering for GitHub Copilot. --- ## 1. Installing IntelliJ IDEA IntelliJ IDEA is an integrated development environment (IDE) used for Java development and more. You can install either the Community Edition or the Pro version (free for students using an EDU email). ### 1.1 Downloading IntelliJ IDEA 1. Go to the [IntelliJ IDEA download page](https://www.jetbrains.com/idea/download/). 2. Choose your operating system (Windows, macOS, or Linux). 3. Select either the **Community** or **Ultimate** version. - The **Community** version is free and includes all essential features. - The **Ultimate** version is free for students with an EDU email (free license can be applied at [Free JetBrains Student License](https://www.jetbrains.com/community/education/#students/). 4. Click **Download**. ### 1.2 Installing IntelliJ IDEA #### Windows: 1. Run the installer you downloaded. 2. Follow the installation prompts, choosing the default options. 3. Once installed, launch IntelliJ IDEA. #### macOS: 1. Open the downloaded `.dmg` file. 2. Drag the IntelliJ IDEA icon into the **Applications** folder. 3. Open **IntelliJ IDEA** from the **Applications** folder. #### Linux: 1. Extract the `.tar.gz` file you downloaded. 2. Open a terminal and navigate to the extracted directory. 3. Run `./idea.sh` to launch IntelliJ IDEA. ### 1.3 Registering for the Ultimate Edition 1. After installing IntelliJ IDEA, if you wish to use the **Ultimate** edition, click on **Activate** when prompted. 2. Choose **Log in with JetBrains Account**. 3. Sign in using your EDU email to get free access to the Ultimate version. --- ## 2. Using GitHub for Version Control (Command Line Guide) GitHub is a powerful tool for version control and collaboration. In this section, we will focus on using GitHub through the command line to manage your repositories and projects effectively. ### 2.1 Setting Up Git Locally Before using GitHub, you need to have Git installed on your machine. You can check if Git is already installed by running the following command: ```bash git --version ``` If Git is not installed, follow the [Git installation guide](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git). Once installed, set up your global configuration with your username and email (these details will be associated with your commits): ```bash git config --global user.name "Your Name" git config --global user.email "your.email@example.com" ``` ### 2.2 Creating a New GitHub Repository To start version control, create a repository on GitHub: 1. Go to [GitHub](https://github.com/) and sign in. 2. Click on **New Repository**. 3. Choose a repository name, description (optional), and visibility (public or private). 4. Click **Create Repository**. Now, you'll need to connect your local project to this repository. ### 2.3 Initializing a Local Repository Navigate to your project directory in the terminal: ```bash cd /path/to/your/project ``` Initialize Git in the project directory: ```bash git init ``` This creates a `.git` folder in your project directory, which tracks changes and allows you to manage versions. ### 2.4 Adding and Committing Files You need to add files to the staging area before committing them. This tells Git which files you want to include in your next commit. To add all files: ```bash git add . ``` To add specific files: ```bash git add filename.txt ``` Once files are staged, commit them with a meaningful message: ```bash git commit -m "Initial commit" ``` ### 2.5 Connecting to GitHub Remote Repository To link your local repository to the GitHub repository you created, add the remote URL: ```bash git remote add origin https://github.com/your-username/your-repo-name.git ``` Verify the remote has been added by running: ```bash git remote -v ``` ### 2.6 Pushing Changes to GitHub Now that the repository is connected, you can push your local changes to GitHub. Use the following command to push your commits to the `main` (or `master`) branch: ```bash git push -u origin main ``` This command pushes the commits and sets the `origin` repository as the default remote for future pushes. ### 2.7 Cloning an Existing Repository If you want to work on an existing project, you can clone a repository from GitHub. ```bash git clone https://github.com/your-username/your-repo-name.git ``` This command will create a local copy of the repository. ### 2.8 Checking the Status of Your Repository You can check the current status of your repository, such as which files are modified, untracked, or staged, by using: ```bash git status ``` ### 2.9 Pulling Changes from GitHub If you’re collaborating on a project, you’ll need to pull changes from the remote repository to ensure your local version is up to date. ```bash git pull origin main ``` This command fetches and merges changes from the remote repository into your local copy. ### 2.10 Branching and Merging Git allows you to work on different features or fixes by creating branches. Here’s how to create a new branch: ```bash git checkout -b feature-branch ``` After making changes and committing them, you can switch back to the main branch: ```bash git checkout main ``` To merge the feature branch back into the main branch: ```bash git merge feature-branch ``` ### 2.11 Resolving Merge Conflicts When merging branches, you may encounter merge conflicts if different changes were made to the same part of a file. Git will notify you of the conflict. To resolve it: 1. Open the conflicting file and decide how to integrate the changes. 2. After resolving conflicts, add the resolved file(s): ```bash git add filename.txt ``` 3. Commit the merge: ```bash git commit -m "Resolved merge conflict" ``` ### 2.12 Viewing Commit History You can see the history of commits by running: ```bash git log ``` This will display a list of commits, including author names and commit messages. To view a simplified one-line version of the log: ```bash git log --oneline ``` ### 2.13 Pushing to and Pulling from Forked Repositories If you’re contributing to an open-source project or working from a forked repository, you’ll often need to add an upstream remote in addition to your origin remote. Add the upstream repository URL like this: ```bash git remote add upstream https://github.com/original-owner/repository.git ``` To pull changes from the original repository: ```bash git pull upstream main ``` ### 2.14 Connecting to Github with SSH(Recommended) Please refer to [About SSH](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/about-ssh) --- ## 3. Registering for GitHub Copilot GitHub Copilot is an AI tool that helps you write code more efficiently. ### 3.1 Signing Up for GitHub Copilot Refer to [Apply to GitHub Education as a student](https://docs.github.com/en/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-education-for-students/apply-to-github-education-as-a-student) ### 3.2 Using GitHub Copilot in IntelliJ IDEA 1. Install the **GitHub Copilot** plugin in IntelliJ: - Go to **File** > **Settings** > **Plugins**. - Search for **GitHub Copilot** and click **Install**. 2. Once installed, restart IntelliJ. 3. After restarting, you will see GitHub Copilot suggestions in your code editor as you type. --- ## 4. Understanding Java, JVM, and JDK As part of this course, you'll be using Java for your software development. To effectively work with Java, it's important to understand the following key concepts: Java, JVM (Java Virtual Machine), and JDK (Java Development Kit). ### 4.1 What is Java? **Java** is a high-level, object-oriented programming language used for building a wide variety of applications. Whether you're developing desktop software, mobile apps, or large-scale enterprise systems, Java offers a versatile and robust platform. - **Key Features of Java:** - **Object-Oriented**: Everything in Java is represented as objects. - **Platform-Independent**: Java programs can run on any operating system without modification. - **Secure and Robust**: Java includes runtime checks, memory management, and strong type checking. - **Multi-threaded**: Java supports concurrent execution of multiple threads, enhancing performance. Java's most celebrated feature is its platform independence, which is achieved through the use of the JVM. ### 4.2 What is JVM (Java Virtual Machine)? The **Java Virtual Machine (JVM)** is an integral part of Java's "write once, run anywhere" philosophy. It is the engine that allows Java programs to run on any device or operating system. When you write Java code and compile it, the Java compiler (`javac`) translates the code into **bytecode** (platform-independent code). The JVM interprets or compiles this bytecode into machine code that can be executed by the host system. - **How JVM Works**: 1. You write and compile Java code into **bytecode** (.class files). 2. The JVM reads and executes this bytecode, converting it into machine-specific instructions. 3. This allows the program to run on any system where the JVM is installed, ensuring platform independence. The JVM is the foundation for running all Java applications, ensuring that they run consistently across different platforms. ### 4.3 What is JDK (Java Development Kit)? The **Java Development Kit (JDK)** is a complete software development environment for building Java applications. It includes everything needed to develop, compile, and run Java programs. - The JDK contains: 1. **Java Compiler (`javac`)**: Compiles Java source code into bytecode. 2. **JVM**: Executes the compiled bytecode. 3. **Libraries**: Standard Java libraries used for building Java applications. 4. **Development Tools**: Tools for debugging, profiling, and managing Java programs. The JDK is essential for developers because it provides the compiler and libraries needed to write and build Java applications. Without the JDK, you wouldn't be able to compile Java programs or execute them. ### 4.4 Relations Between Java, JVM, and JDK - **Java** is the programming language that you write your code in. - **JVM** is the platform that allows your compiled Java bytecode to run on any device or operating system. - **JDK** is the toolkit that includes both the Java compiler and the JVM, along with libraries and other development tools. The relationship between these components is essential for understanding how Java works: 1. You write code in **Java**. 2. The **JDK** compiles your code into **bytecode**. 3. The **JVM** runs the bytecode, translating it into machine code that your operating system can execute. --- This section gives you a foundational understanding of Java, JVM, and JDK, which are essential to Java development and will be used throughout this course. ## Conclusion You are now set up with IntelliJ IDEA, GitHub for version control, and GitHub Copilot! These tools will enhance your development workflow, making it easier to collaborate and code efficiently. Good luck, and happy coding! ---

    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