Skip to content

[CS2113-W14-4] Internity#8

Open
V1T0bh wants to merge 789 commits into
nus-cs2113-AY2526S1:masterfrom
AY2526S1-CS2113-W14-4:master
Open

[CS2113-W14-4] Internity#8
V1T0bh wants to merge 789 commits into
nus-cs2113-AY2526S1:masterfrom
AY2526S1-CS2113-W14-4:master

Conversation

@V1T0bh
Copy link
Copy Markdown

@V1T0bh V1T0bh commented Sep 17, 2025

Internity is a CLI based app for managing internship applications. Internity can help you manage and keep track of your internship applications more efficiently, perfect for Computer Science students who need to manage hundreds of applications.

Copy link
Copy Markdown

@NigelYeoTW NigelYeoTW left a comment

Choose a reason for hiding this comment

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

Overall lgtm, just some minor issues with magic numbers, etc, keep it up! 🔥

Comment thread src/main/java/internity/cli/ArgumentParser.java Outdated
Comment thread src/main/java/internity/commands/ExitCommand.java Outdated
Comment thread src/main/java/internity/core/InternshipList.java Outdated
Comment thread src/main/java/internity/core/InternshipList.java Outdated
Comment thread src/main/java/internity/core/Storage.java Outdated
Comment thread src/main/java/internity/utils/DateFormatter.java Outdated
try {
String[] parts = args.split("\\s+(?=company/|role/|deadline/|pay/)");

if (parts.length != 4 ||
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Consider extracting out long logic statements for readability

Comment thread src/main/java/internity/Internity.java Outdated
@ZT712002
Copy link
Copy Markdown

Is there missing activation bars here?
user_sq

@ZT712002
Copy link
Copy Markdown

If it returns a new delete command, shouldn't it point to the side of the box? (Refer to week 10.1 CS2113 )
missing constructor for delete

@ZT712002
Copy link
Copy Markdown

If it returns a new list command, shouldn't it point to the box?(refer to w10.1 cs2113)
missing construct for list

@ZT712002
Copy link
Copy Markdown

If it's a new findcommand(), should it be a constructor instead of activation of an already instantialized object?
findcommand_missingcon

@ZT712002
Copy link
Copy Markdown

For AddCommand and exit command, if it returns a new object, shouldnt it have a constructor for its sequence diagram instead of calling an activation bar ?
missing constructor for 2 commands

Copy link
Copy Markdown

@sanjay-shiva-kumar sanjay-shiva-kumar left a comment

Choose a reason for hiding this comment

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

Overall, this is a very thorough and polished developer guide. There are just a few details that are not working/incomplete, and some of the diagrams can be simplified.

Comment thread docs/DeveloperGuide.md Outdated

### Delete feature

**API**: [`DeleteCommand.java`](https://github.com/AY2526S1-CS2113-W14-4/tp/blob/master/src/main/java/internity/commands/DeleteCommand.java)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This link for DeleteCommand is broken.
Screenshot 2025-10-29 122255

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Noted

Comment thread docs/DeveloperGuide.md Outdated

### Storage Component

**API**: [`Storage.java`](https://github.com/AY2526S1-CS2113-W14-4/tp/blob/master/src/main/java/internity/core/Storage.java)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The link for Storage is broken.
image

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Noted

Comment thread docs/DeveloperGuide.md Outdated

## Instructions for manual testing

{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should this line be deleted?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Noted

Comment thread docs/DeveloperGuide.md
Comment on lines +672 to +678
### Adding an internship

### Updating an internship

### Deleting an internship

### Listing and sorting all internships
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Will these sections be written in the future?

Comment thread docs/DeveloperGuide.md Outdated
Comment on lines +521 to +606
* **Alternative 1 (current choice):** Pipe-delimited text format.
* Pros: Human-readable, easy to debug and manually edit if needed.
* Pros: Simple parsing logic without external dependencies.
* Pros: Works across all platforms without binary compatibility issues.
* Cons: Slightly larger file size compared to binary formats.
* Cons: No built-in schema validation.
* Cons: Performance degrades with very large files (not an issue for target use case of ~1000 entries).

* **Alternative 2:** JSON format using a library.
* Pros: Structured format with built-in validation.
* Pros: Easier to extend with new fields.
* Pros: Better for complex nested data structures.
* Cons: Less human-readable due to verbose syntax.
* Cons: Overkill for simple tabular data.

* **Alternative 3:** Binary serialization using Java's `ObjectOutputStream`.
* Pros: Compact file size.
* Pros: Fast serialization/deserialization.
* Cons: Not human-readable or editable.
* Cons: Platform-dependent binary format could cause issues.

**Aspect: Error handling strategy**

* **Alternative 1 (current choice):** Skip corrupted lines with warnings, continue loading valid entries.
* Pros: Maximizes data recovery - users don't lose all data due to one corrupted line.
* Pros: Application remains usable even with partial data corruption.
* Pros: Warnings inform users of data issues without blocking usage.
* Cons: Silent data loss is possible if users don't notice warnings.
* Cons: Corrupted data is permanently lost on next save.
* Cons: Code complexity increases as edge cases need to be accounted for.

* **Alternative 2:** Fail fast - throw exception and abort load on any corrupted line.
* Pros: No silent data loss - users are immediately aware of corruption.
* Pros: Forces users to fix or remove corrupted data.
* Cons: Users cannot access any data if even one line is corrupted.
* Cons: Poor user experience for a minor data issue.

* **Alternative 3:** Load all lines (including corrupted ones) into a separate "invalid entries" list for user review.
* Pros: No data loss - even corrupted entries are preserved.
* Pros: Users can manually review and fix corrupted entries.
* Cons: Significantly more complex implementation.
* Cons: Requires additional UI for managing invalid entries.
* Cons: Invalid entries could accumulate over time.

**Aspect: When to save**

* **Alternative 1 (current choice):** Auto-save after every command that modifies data.
* Pros: Minimizes data loss risk - data is never more than one command out of sync.
* Pros: Simple mental model for users - changes are always saved.
* Pros: No need for users to remember to save manually.
* Cons: Higher I/O overhead (mitigated by small file sizes).
* Cons: Performance impact if storage is slow (e.g., network drive).

* **Alternative 2:** Save only on explicit "save" command or application exit.
* Pros: Better performance with fewer write operations.
* Pros: Users have control over when data is persisted.
* Cons: Risk of data loss if application crashes or user forgets to save.
* Cons: Inconsistent with modern application expectations.
* Cons: More complex implementation (need to track dirty state).

* **Alternative 3:** Periodic auto-save every N seconds or N operations.
* Pros: Balances performance and data safety.
* Pros: Reduces risk of data loss compared to manual save.
* Cons: More complex implementation (requires background thread or operation counter).
* Cons: Users could still lose up to N operations of data.
* Cons: Unpredictable save timing could confuse users.

**Aspect: File location and structure**

* **Alternative 1 (current choice):** Single file at `./data/internships.txt` with both username and internships.
* Pros: Simple file structure, easy to locate and backup.
* Pros: All data in one place for easy migration.
* Pros: Atomic writes ensure consistency (file is completely written or not at all).
* Cons: Single point of failure - if file is corrupted, all data is affected.

* **Alternative 2:** Separate files for username and internships.
* Pros: Better separation of concerns.
* Pros: Reduces risk of username corruption affecting internship data.
* Cons: More complex file management.
* Cons: Two files must be kept in sync.

* **Alternative 3:** User-home directory with platform-specific application data folder.
* Pros: Follows OS conventions for application data storage.
* Pros: Better for multi-user systems.
* Cons: Harder for users to locate and backup data.
* Cons: More complex path resolution logic.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Would this section benefit from being more concise/less comprehensive?

Comment thread docs/DeveloperGuide.md

The following sequence diagram illustrates the load operation:

![Storage Load Sequence Diagram](diagrams/StorageLoadSD.png)
Copy link
Copy Markdown

@sanjay-shiva-kumar sanjay-shiva-kumar Oct 29, 2025

Choose a reason for hiding this comment

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

Is this sequence diagram more comprehensive than comprehensible?
image

Comment thread docs/DeveloperGuide.md

The following class diagram shows the Storage component and its relationships:

![Storage Component Class Diagram](diagrams/StorageCD.png)
Copy link
Copy Markdown

@sanjay-shiva-kumar sanjay-shiva-kumar Oct 29, 2025

Choose a reason for hiding this comment

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

Can this class diagram be made more readable?
image

Comment thread docs/DeveloperGuide.md

### Add feature

![Add Command: Sequence Diagram](diagrams/AddCommandSD.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

One of the activation bars in this diagram is too long

Comment thread docs/DeveloperGuide.md Outdated
The list mechanism is implemented by the `ListCommand` class, which allows users to view all internships in their list.

Below is the sequence diagram for a common usage of the list feature:
![List Feature: Sequence Diagram](diagrams/ListFeatureSD.png)
Copy link
Copy Markdown

@Michael-Low Michael-Low Oct 29, 2025

Choose a reason for hiding this comment

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

Is it intentional for some of the participants (e.g. InternshipList) to call themselves even though they are not currently executing?
ListFeatureSD

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The activation bars also have to be consistent (if you show an activation bar, you must show it in all cases).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The activation bar also extends too far past both the top and bottom arrow

Copy link
Copy Markdown

@darshhs darshhs 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 job! It's very comprehensive and detailed. Most of the images were useful in understanding how the application works

Comment thread docs/DeveloperGuide.md

The following class diagram shows the Storage component and its relationships:

![Storage Component Class Diagram](diagrams/StorageCD.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think this can be simplified to only show how the components interact with each other.

Comment thread docs/DeveloperGuide.md Outdated
The list mechanism is implemented by the `ListCommand` class, which allows users to view all internships in their list.

Below is the sequence diagram for a common usage of the list feature:
![List Feature: Sequence Diagram](diagrams/ListFeatureSD.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same question as the above commenter, I don't understand how InternshipList and ListCommand are related, prehaps you can give a description of how the important methods work?

Comment thread docs/DeveloperGuide.md

**Step 2.** `InternshipList.loadFromStorage()` calls `Storage.load()`, which returns an `ArrayList<Internship>`.

**Step 3.** Inside `Storage.load()`:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The description for step 3 could be more concise, only explain the important aspects.

Comment thread docs/DeveloperGuide.md

**Aspect: Index base convention**

* **Alternative 1 (current choice):** Users provide 1-based indices, converted to 0-based internally in `ArgumentParser`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This section could have a separate section? like all possible alternatives for each feature

Copy link
Copy Markdown

@Pavithra6-Srinivasan Pavithra6-Srinivasan left a comment

Choose a reason for hiding this comment

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

Maybe you can consider removing some parts that have too many details and include only the important points. Other than that good job!

Comment thread docs/DeveloperGuide.md
![Architecture Diagram](diagrams/ArchitectureOverview.png)\

The diagram below shows a simplified **Class Diagram** of all of Internity's classes and their relationships.
![Internity Class Diagram](diagrams/InternityCD.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do you think the icons beside each class should be there?

Comment thread docs/DeveloperGuide.md
Below is the sequence diagram for a common usage of the list feature:
![List Feature: Sequence Diagram](diagrams/ListFeatureSD.png)

#### Design considerations
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This section is abit confusing, maybe you can split it up and add them under their respective features instead?

Comment thread docs/DeveloperGuide.md
Comment on lines +246 to +264
Given below is an example usage scenario and how the delete mechanism behaves at each step.

**Step 1.** The user launches the application and the `InternshipList` contains 3 internships. The user executes `delete 2` to delete the 2nd internship in the list.

**Step 2.** The `CommandParser` validates the input and splits it into command word `"delete"` and arguments `"2"`.

**Step 3.** The `CommandFactory` delegates to `ArgumentParser.parseDeleteCommandArgs("2")`, which:
* Parses `"2"` as an integer
* Converts the 1-based index (2) to 0-based index (1)
* Creates and returns a new `DeleteCommand(1)`

**Step 4.** `InternityManager` calls `DeleteCommand.execute()`, which:
* Calls `InternshipList.get(1)` to retrieve the internship details (for displaying to the user)
* Calls `InternshipList.delete(1)` to remove the internship from the list
* This method validates that the index is within bounds before removal
* Calls `InternshipList.size()` to get the updated list size
* Calls `Ui.printRemoveInternship()` to display a confirmation message

**Step 5.** After the command completes, `InternityManager` automatically calls `InternshipList.saveToStorage()`, which in turn calls `Storage.save()` to persist the changes to disk.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can the example be shorter, like just describe briefly what component does what

Comment thread docs/DeveloperGuide.md

The following sequence diagram illustrates the complete delete operation flow:

![Delete Command Sequence Diagram](diagrams/DeleteCommandSD.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

can the diagram be more specific about the "delete" part and abstract out all the logic before (like the "add" diagram above)

Comment thread docs/DeveloperGuide.md

### Find feature

![Find Command: Sequence Diagram](diagrams/FindCommandSD.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can the steps of the feature be listed out briefly?

Copy link
Copy Markdown

@muadzyamani muadzyamani 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 job on the Developer Guide. Just a few polishing steps needed in certain areas and resolving a few critical inconsistencies.

Comment thread docs/DeveloperGuide.md Outdated
- Uses the `ArgumentParser` to interpret argument strings.
- Returns a fully constructed `Command` object.
4. The `Command` object executes its logic (e.g. adds a new internship to `InternshipList`).
5. Finally, the result of the execution is printed ot the console via the `Ui`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should this be 'printed to'?

Comment thread docs/DeveloperGuide.md Outdated
```
2. The `UsernameCommand` constructor validates that the argument is non-null and non-blank.
3. When `execute()` is called:
- The provided username is stored via `InternshipList.setUSername(username)`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should this method be .setUsername(username)?

Comment thread docs/DeveloperGuide.md

---

### Find feature
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This section seems more detailed than other sections which is alright but slightly inconsistent with other sections like 'Delete feature' which is focused more on the flow. Consider shortening to match the style of other sections.

Comment thread docs/DeveloperGuide.md
![Storage Component Class Diagram](diagrams/StorageCD.png)

The class diagram illustrates:
* **Storage** manages file I/O operations and uses helper methods for parsing and formatting
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Perhaps you could be more consistent here by using backticks (...) to format class names, method names and commands instead of bolding.

lukeai-tan and others added 30 commits November 4, 2025 00:40
Update documentation - Ben's PPP, UG, DG
fix UG spacing and add dashboard
update UG to fix weird bug again
Removed duplicate description of the Nearest Deadline feature and added an example.
Refactor Nearest Deadline description in UserGuide
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.