Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CS2113-T12-1] News on the Go #5

Open
wants to merge 517 commits into
base: master
Choose a base branch
from

Conversation

ningsongshen
Copy link

News on the Go is a desktop command line app for getting your news on the go, i.e. quickly, conveniently, accurately, unbiased, and relevant to you. If you type fast, News on the Go will get your daily news to you faster than browsing Google.

JeffinsonDarmawan pushed a commit to JeffinsonDarmawan/tp that referenced this pull request Mar 14, 2024
yeozongyao added a commit to yeozongyao/tp that referenced this pull request Mar 15, 2024

#### Alternatives Considered
- **Cloud-Based Storage:** Providing cross-device synchronization was deemed unnecessary at this stage, given the application's primary focus on delivering a personalized news experience on individual devices.

## Product scope

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to fill these in :)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can add in more diagrams for a clearer explanation :)


#### Alternatives Considered
- **Cloud-Based Storage:** Providing cross-device synchronization was deemed unnecessary at this stage, given the application's primary focus on delivering a personalized news experience on individual devices.

## Product scope
### Target user profile

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add in more user stories !

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flow of control from UI to DailyNewsCommand and back to UI is not very clear. You could show explicit method calls from the UI to DailyNewsCommand and any data or control flow that returns to the UI.


Below is a snippit of the parser function that handles both of the operations above:
```java
private static void saveDailyArticlesParser() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good for given code, may consider use pseudo-code to increase readibility

- `FilterNewsCommand#info()` — displays the importance, reliability and bias measure of the article to the user.
- `FilterNewsCommand#back()` — Exits the filter topic feature.

Given Below is an example usage scenario and how the filter and topic mechanism behaves at each step.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to have sample output here!

The `Topic` function is complemented by the `Filter` Function which displays the list of articles related to the
specified topic.

#### Filter Function
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to provide Filter function here!

}
```

#### Design Considerations
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this part is good to write the consideration!

Copy link

@Vavinan Vavinan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall good. Consider using "opt" if there is only one path and also make use of algorithm to increase the readability.

.filter(article -> article.endsWith(";" + topic))
.collect(Collectors.toList());

if (!articlesForTopic.isEmpty()) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using pseudo-code or algorithm to increase readability

Alternative 1 (current choice): check for topicIndex in handleCommand
- Pros: easy to implement
- Con: duplicate checking of topicIndex for article commands

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its good that you provided some alternatives with their pros and cons

is used to retrieve the source of a news article.
The function takes in a string and a list of
`NewsArticle` objects. The string is split into an
array and the second element (index 1) is parsed as
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it just index. The usage of "index 1" is not clear here.

topics of the news articles.

The following sequence diagram shows how the topic operation works.
<img src="UML Diagrams/topicFunctionSequence.png">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-04-04 154557

Shouldn't it be "opt" instead of "alt" as it only has one path

ningsongshen and others added 30 commits April 15, 2024 22:58
…Branch

* 'master' of https://github.com/BenjoBurger/tp:
  Final DG changes
  (Adjust line length and import
  Resolve conflicts
  Update DG, Add extract to DG, fix test case
  Update DG design sections, add extract to DG, Fix test cases
…benjoBranch

* 'benjoBranch' of https://github.com/BenjoBurger/tp:
  quote fix
  quote and daily fix at hiteshri's request
  Update PPP links
  remove duplicate extract
  Update PPP
edit UI for daily function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants