Mutti
    • 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
    **1. Functional Requirements** --- **1.1 User Requirements** --- **1.1.1 Browsing Programming Languages** - **1.1.1.1** Users **shall be** able to browse a catalog of programming languages sourced from Wikidata. - **1.1.1.2** Users **shall be** able to view detailed information about the language's origin. - **1.1.1.3** Users **should be** able to filter programming languages based on attributes such syntactic similarity or domain of use. - **1.1.1.4** Users **shall be** able to search for programming languages by name or attributes. - **1.1.1.5** Users **should be** able to see related programming languages, such as predecessors, successors, or those with similar features. - **1.1.1.6** Users **should be** able to compare multiple programming languages side by side and see the streghts and weaknesses. - **1.1.1.7** Users **should be** able to bookmark or save programming languages for future reference. - **1.1.1.8** Users **should be** able to report incorrect or outdated information. - **1.1.1.9** Users **should be** able to access code examples or snippets associated with programming languages. --- **1.1.2 Question Search** - **1.1.2.1** Users **shall be** able to search for questions within the forum using keywords. Those keyword may be assigned by admins. - **1.1.2.2** Users **should be** able to filter search results by date range, programming language, tags, or user. - **1.1.2.3** Users **should be** able to sort search results by relevance(?), date posted, or number of responses. - **1.1.2.4** Users **should be** able to receive suggestions for similar questions when viewing a question. (?) - **1.1.2.5** Users **should be** able to save or bookmark search queries for future use. (?) - **1.1.2.6** Users **shall be** able to search within specific forums or categories. - **1.1.2.7** Users **should be** able to search for code snippets within questions and answers. - **1.1.2.8** Users **should be** able to receive notifications for new questions matching their saved search criteria. (?) - **1.1.2.9** Users **shall be** prevented from posting duplicate questions by being prompted with similar existing questions. - **1.1.2.10** Users **should be** able to use advanced search operators (e.g., AND, OR, NOT) in their queries. - **1.1.2.11** Users **should be** able to see highlighted search terms in the search results. --- **1.2 System Requirements** --- **1.2.1 Browsing Programming Languages Functionality** - **1.2.1.1** The system **shall** retrieve programming language data from Wikidata. - **1.2.1.2** The system **shall** provide a user interface that displays programming languages in an organized manner, such as lists or grids (or both). - **1.2.1.3** The system **shall** allow users to view detailed information and basic examples about each programming language. - **1.2.1.4** The system **shall** implement filtering functionality, enabling users to filter programming languages based on fundamental attributes. - **1.2.1.5** The system **shall** implement a search function to search programming languages by name or attributes. - **1.2.1.6** The system **should** display related programming languages based on predefined relationships in the data. - **1.2.1.7** The system **should** allow users to compare multiple programming languages side by side. - **1.2.1.8** The system **should** allow users to bookmark or save programming languages for future reference. - **1.2.1.9** The system **should** provide an option for users to report incorrect or outdated information, which will be reviewed by administrators. (?) - **1.2.1.10** The system **should** support localization, displaying data in different languages if available in Wikidata. (?) - **1.2.1.11** The system **shall** ensure that the user interface for browsing is accessible and user-friendly. - **1.2.1.12** The system **should** provide access to code examples or snippets associated with programming languages. - **1.2.1.13** The system **should** allow users to customize the display settings for browsing programming languages. (?) - **1.2.1.14** The system **shall** ensure data consistency and integrity when fetching and displaying information from Wikidata. --- **1.2.2 Question Search Functionality** - **1.2.2.1** The system **shall** provide a search functionality for users to search questions in the forum using keywords. - **1.2.2.2** The system **shall** include filtering options in the search functionality, such as date range, programming language, tags, or user. - **1.2.2.3** The system **shall** display search results matching the search criteria, including question title, brief excerpt, date, and number of answers. - **1.2.2.4** The system **shall** allow users to sort search results by relevance, date posted, or number of responses. - **1.2.2.5** The system **should** provide suggestions for similar questions when users are viewing a question. - **1.2.2.6** The system **should** allow users to save or bookmark search queries for future use. (?) - **1.2.2.7** The system **shall** enable users to search within specific forums or categories. - **1.2.2.8** The system **shall** make the search functionality accessible from any page within the forum. - **1.2.2.9** The system **should** highlight search terms in the search results. - **1.2.2.10** The system **should** handle misspelled search queries by suggesting corrections. - **1.2.2.11** The system **should** support advanced search operators (e.g., AND, OR, NOT). - **1.2.2.12** The system **shall** prevent duplicate questions by prompting users with similar existing questions when they attempt to post a new question. - **1.2.2.13** The system **shall** ensure that search performance is optimized to return results promptly. - **1.2.2.14** The system **should** allow users to search for code snippets within questions and answers. - **1.2.2.15** The system **should** provide a "Did you mean..." feature for ambiguous or unclear search terms. - **1.2.2.16** The system **should** respect user permissions and privacy settings, displaying only content the user has access to. - **1.2.2.17** The system **should** allow users to receive notifications for new questions matching their saved search criteria. (?) - **1.2.2.18** The system **shall** index all forum content regularly to maintain up-to-date search results. - **1.2.2.19** The system **should** integrate with the code execution platform to allow searching for runnable code examples. --- *Requirements marked with (?) are open to change.* # Diagrams for Browsing Programming Languages and Question Search ### **2.1 Browsing Programming Languages Use Case** ```mermaid flowchart User --> BrowseLanguages; BrowseLanguages -. "include" .-> FilterLanguages; BrowseLanguages -. "include" .-> SearchLanguages; BrowseLanguages -. "include" .-> ViewRelatedLanguages; BrowseLanguages -. "include" .-> CompareLanguages; BrowseLanguages -. "include" .-> BookmarkLanguages; BrowseLanguages --> ViewLanguageDetails; ViewLanguageDetails -. "extend" .-> ReportIncorrectInfo; ViewLanguageDetails -. "extend" .-> ViewCodeSnippets; ViewLanguageDetails -. "extend" .-> CustomizeView; ``` **Explanation:** - **User** initiates the **BrowseLanguages** use case. - **BrowseLanguages** includes functionalities like: - **FilterLanguages** - **SearchLanguages** - **ViewRelatedLanguages** - **CompareLanguages** - **BookmarkLanguages** - **BrowseLanguages** leads to **ViewLanguageDetails**. - **ViewLanguageDetails** can be extended with: - **ReportIncorrectInfo** - **ViewCodeSnippets** - **CustomizeView** --- ### **2.2 Question Search Use Case** ```mermaid flowchart User --> SearchQuestions; SearchQuestions -. "include" .-> FilterSearchResults; SearchQuestions -. "include" .-> SortSearchResults; SearchQuestions -. "include" .-> SearchWithinForums; SearchQuestions -. "include" .-> UseAdvancedSearch; SearchQuestions -. "include" .-> SearchCodeSnippets; SearchQuestions --> ViewQuestionDetails; ViewQuestionDetails -. "extend" .-> SaveSearchQueries; ViewQuestionDetails -. "extend" .-> ReceiveNotifications; ViewQuestionDetails -. "extend" .-> ViewSimilarQuestions; ViewQuestionDetails -. "extend" .-> PreventDuplicateQuestions; ``` **Explanation:** - **User** initiates the **SearchQuestions** use case. - **SearchQuestions** includes functionalities like: - **FilterSearchResults** - **SortSearchResults** - **SearchWithinForums** - **UseAdvancedSearch** - **SearchCodeSnippets** - **SearchQuestions** leads to **ViewQuestionDetails**. - **ViewQuestionDetails** can be extended with: - **SaveSearchQueries** - **ReceiveNotifications** - **ViewSimilarQuestions** - **PreventDuplicateQuestions** --- ### **3. Class Diagram** ```mermaid classDiagram class User { +userID: int +username: string +email: string +bookmarkLanguage(languageID: int) +searchQuestions(query: string) +reportIncorrectInfo(languageID: int, report: string) } class ProgrammingLanguage { +languageID: int +name: string +creator: string +yearCreated: int +paradigm: string[] +typingDiscipline: string +influencedBy: string[] +influenced: string[] +getDetails(): LanguageDetails } class LanguageDetails { +languageID: int +description: string +codeExamples: string[] +relatedLanguages: string[] +displayDetails() } class Bookmark { +userID: int +languageID: int +dateBookmarked: Date } class SearchQuery { +queryText: string +filters: FilterOptions +executeSearch(): SearchResult[] } class FilterOptions { +dateRange: DateRange +languages: string[] +tags: string[] +applyFilters() } class SearchResult { +questionID: int +title: string +excerpt: string +datePosted: Date +numberOfAnswers: int } class Question { +questionID: int +title: string +body: string +datePosted: Date +tags: string[] +codeSnippets: string[] } User --> ProgrammingLanguage : views User --> Bookmark : creates User --> SearchQuery : initiates SearchQuery --> SearchResult : returns SearchResult --> Question : links to ProgrammingLanguage --> LanguageDetails : provides ProgrammingLanguage --> ProgrammingLanguage : related to User --> Question : posts, views ``` **Explanation:** - **User** interacts with **ProgrammingLanguage**, can **bookmark** languages, and **search** for questions. - **ProgrammingLanguage** provides **LanguageDetails**, which include descriptions and code examples. - **SearchQuery** uses **FilterOptions** to refine the search and returns **SearchResult**. - **SearchResult** links to **Question**, which contains the full details. - **ProgrammingLanguage** may be related to other programming languages. --- ### **4. Sequence Diagram** #### **4.1 Browsing Programming Languages Sequence Diagram** ```mermaid sequenceDiagram participant User participant Browser participant PageController participant WikidataAPI participant LanguageController participant Database User->>Browser: Navigate to Browse Languages Browser->>PageController: Request BrowseLanguages Page PageController->>WikidataAPI: Fetch Language List WikidataAPI->>PageController: Return Language Data PageController->>LanguageController: Process Language Data LanguageController->>Database: Store/Update Languages LanguageController->>Browser: Display Language List User->>Browser: Apply Filters/Search Browser->>LanguageController: Request Filtered/Search Results LanguageController->>Database: Query with Filters/Search Terms Database->>LanguageController: Return Filtered Language Data LanguageController->>Browser: Display Filtered Language List User->>Browser: Select Language for Details Browser->>LanguageController: Request Language Details LanguageController->>Database: Retrieve Language Details LanguageController->>Browser: Display Language Details User->>Browser: ViewCodeSnippets/ReportIncorrectInfo/CustomizeView ``` #### **4.2 Question Search Sequence Diagram** ```mermaid sequenceDiagram participant User participant Browser participant SearchController participant ForumDatabase participant WikidataAPI participant ResultPage User->>Browser: Enter Search Query Browser->>SearchController: Submit Query SearchController->>ForumDatabase: Search Questions ForumDatabase->>SearchController: Return Question Results SearchController->>WikidataAPI: Search Wikidata (if applicable) WikidataAPI->>SearchController: Return Wikidata Results SearchController->>ResultPage: Compile and Send Results ResultPage->>Browser: Display Results User->>Browser: Apply Filters/Sort Options Browser->>ResultPage: Request Updated Results ResultPage->>SearchController: Process Filters/Sort SearchController->>ForumDatabase: Query with Filters/Sort ForumDatabase->>SearchController: Return Updated Results SearchController->>ResultPage: Send Updated Results ResultPage->>Browser: Display Updated Results User->>Browser: ViewQuestionDetails Browser->>ForumDatabase: Retrieve Question Details ForumDatabase->>Browser: Send Question Details Browser->>User: Display Question Details User->>Browser: SaveSearchQueries/ReceiveNotifications ``` **Explanation:** - **Browsing Programming Languages:** - The **User** navigates to browse languages. - The **PageController** fetches data from **WikidataAPI**. - Data is processed by **LanguageController** and stored in the **Database**. - The **User** can apply filters or search terms, and the system updates the displayed languages accordingly. - When a language is selected, detailed information is retrieved and displayed. - **Question Search:** - The **User** enters a search query. - The **SearchController** searches the **ForumDatabase** and may also query **WikidataAPI**. - Results are compiled and displayed on the **ResultPage**. - The **User** can apply filters or sorting options to refine results. - Upon selecting a question, details are retrieved from the **ForumDatabase** and displayed. --- ```mermaid sequenceDiagram participant User participant Browser participant LanguageController participant WikidataAPI User->>Browser: Search(keyword) Browser->>Wikidata: getLanguage(keyword) Wikidata->>Browser: top5MatchedWords Browser->>Wikidata: getLanguageDetails(language) Browser->>LanguageController: filterLanguages(filters) LanguageController->>WikidataAPI: queryLanguages(filters) WikidataAPI-->>LanguageController: filteredLanguages LanguageController-->>Browser: displayLanguages(filteredLanguages) User->>Browser: Select Language for Details Browser->>LanguageController: getLanguageDetails(languageId) LanguageController->>WikidataAPI: fetchLanguageDetails(languageId) WikidataAPI-->>LanguageController: languageDetails LanguageController-->>Browser: displayLanguageDetails(languageDetails) ``` ```mermaid flowchart User --> SearchLanguages User --> FilterLanguages User --> ViewQuestionsAboutLanguage SearchLanguages --> Browser Browser --> GetWordsFromAPI Browser --> GetLanguageDetails GetWordsFromAPI --> WikidataAPI GetLanguageDetails --> WikidataAPI ViewQuestionsAboutLanguage --> LanguageController LanguageController --> ShowLanguageDetails LanguageController --> ShowRelatedPosts ShowLanguageDetails --> WikidataAPI ShowRelatedPosts --> WikidataAPI FilterLanguages --> LanguageController FilterLanguages -.-> |extend| ViewQuestionsAboutLanguage LanguageController --> FilteredPosts ```

    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