Skip to content

Aryaman Bansal#684

Open
ary-ban wants to merge 60 commits into
nus-cs2103-AY2526S1:masterfrom
ary-ban:master
Open

Aryaman Bansal#684
ary-ban wants to merge 60 commits into
nus-cs2103-AY2526S1:masterfrom
ary-ban:master

Conversation

@ary-ban

@ary-ban ary-ban commented Sep 6, 2025

Copy link
Copy Markdown

Larry — your friendly CLI task buddy

“Your mind is for having ideas, not holding them.” – David Allen (source)

Larry is a text-based task manager you run in the terminal. It’s quick to use, easy to learn, and boring surprisingly fun. ✨


What Larry does

  • Capture tasks in three flavors: Todo, Deadline, Event

  • Organize with simple commands: list, mark, unmark, delete

  • Stay in flow with a lightweight, no-mouse workflow

  • Exit cleanly with bye


Why people like it

  1. Speed: No windows, no distractions, just type and go.

  2. Clarity: Consistent output with [T], [D], [E] type badges.

  3. Simplicity: Commands are short, memorable, and forgiving 🙂


Quick start

Requires a recent JDK (e.g., 17). Run these from the repository root.
New to Markdown? See GitHub’s guide: Mastering Markdown.

# compile
find src/main/java -name "*.java" > sources.txt
javac -d out @sources.txt

run

java -cp out larry.Larry

Try a quick session:

todo read book
deadline return book /by Sunday
event project meeting /from Mon 2pm /to 4pm
list
mark 2
unmark 2
delete 1
bye

Commands at a glance

  • todo <description> — add a todo

  • deadline <description> /by <when> — add a deadline

  • event <description> /from <start> /to <end> — add an event

  • list — show all tasks

  • mark <index> / unmark <index> — toggle done state

  • delete <index> — remove a task

  • bye — quit Larry

Inline example: deadline submit report /by 2025-10-01.


Demo (UI output)

Got it. I've added this task:
  [T][ ] read book
Now you have 1 task in the list.

Got it. I've added this task:
[D][ ] return book (by: Sunday)

Here are your tasks:

  1. [T][ ] read book
  2. [D][ ] return book (by: Sunday)
  3. [E][ ] project meeting (from: Mon 2pm to: 4pm)

Sample code (syntax highlighting)

package larry;

public class Larry {
public static void main(String[] args) {
new App().run(); // entrypoint that loops over user input
}
}

The main loop parses a command, updates the in-memory task list, and prints the result.


For reviewers / contributors

Area What to look for
Parsing Clear split of command word vs. arguments
Model Consistent toString() with [T]/[D]/[E] badges
UX Helpful messages for malformed inputs
  • Focus on command parsing clarity and error messages.

  • Confirm index bounds checks (mark 999, delete 0).

  • Skim model classes (Task, Todo, Deadline, Event, TaskType) for readability.


Roadmap (task list)

  • Persistence to file

  • Command aliasing / shortcuts

  • GUI option (JavaFX)

  • Checkstyle config & formatting pass 😉

# Larry — your friendly CLI task buddy

“Your mind is for having ideas, not holding them.” – David Allen ([source](https://dansilvestre.com/productivity-quotes))

Larry is a text-based task manager you run in the terminal. It’s quick to use, easy to learn, and boring surprisingly fun. ✨


What Larry does

  • Capture tasks in three flavors: Todo, Deadline, Event
  • Organize with simple commands: list, mark, unmark, delete
  • Stay in flow with a lightweight, no-mouse workflow
  • Exit cleanly with bye

Why people like it

  1. Speed: No windows, no distractions, just type and go.
  2. Clarity: Consistent output with [T], [D], [E] type badges.
  3. Simplicity: Commands are short, memorable, and forgiving 🙂

Quick start

Requires a recent JDK (e.g., 17). Run these from the repository root.
New to Markdown? See GitHub’s guide: [Mastering Markdown](https://guides.github.com/features/mastering-markdown/).

# compile
find src/main/java -name "*.java" > sources.txt
javac -d out @sources.txt

# run
java -cp out larry.Larry

Try a quick session:

todo read book
deadline return book /by Sunday
event project meeting /from Mon 2pm /to 4pm
list
mark 2
unmark 2
delete 1
bye

Commands at a glance

  • todo <description> — add a todo
  • deadline <description> /by <when> — add a deadline
  • event <description> /from <start> /to <end> — add an event
  • list — show all tasks
  • mark <index> / unmark <index> — toggle done state
  • delete <index> — remove a task
  • bye — quit Larry

Inline example: deadline submit report /by 2025-10-01.


Demo (UI output)

Got it. I've added this task:
  [T][ ] read book
Now you have 1 task in the list.

Got it. I've added this task:
  [D][ ] return book (by: Sunday)

Here are your tasks:
1. [T][ ] read book
2. [D][ ] return book (by: Sunday)
3. [E][ ] project meeting (from: Mon 2pm to: 4pm)

Sample code (syntax highlighting)

package larry;

public class Larry {
    public static void main(String[] args) {
        new App().run(); // entrypoint that loops over user input
    }
}

The main loop parses a command, updates the in-memory task list, and prints the result.


For reviewers / contributors

Area What to look for
Parsing Clear split of command word vs. arguments
Model Consistent toString() with [T]/[D]/[E] badges
UX Helpful messages for malformed inputs
  • Focus on command parsing clarity and error messages.
  • Confirm index bounds checks (mark 999, delete 0).
  • Skim model classes (Task, Todo, Deadline, Event, TaskType) for readability.

Roadmap (task list)

  • Persistence to file
  • Command aliasing / shortcuts
  • GUI option (JavaFX)
  • Checkstyle config & formatting pass 😉

damithc and others added 11 commits July 11, 2024 16:52
In build.gradle, the dependencies on distZip and/or distTar causes
the shadowJar task to generate a second JAR file for which the
mainClass.set("seedu.duke.Duke") does not take effect.
Hence, this additional JAR file cannot be run.
For this product, there is no need to generate a second JAR file
to begin with.

Let's remove this dependency from the build.gradle to prevent the
shadowJar task from generating the extra JAR file.

@estherkyx estherkyx left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Overall LGTM! Keep up the good work 💯

Comment thread src/main/java/Larry.java Outdated
Comment on lines +10 to +15
System.out.println(" Hello! I'm Larry");
System.out.println(" What can I do for you?");
}

private static void exit() {
System.out.println(" Bye. Hope to see you again soon!");

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 strings printed here have leading spaces, was this intentional?

Comment thread src/main/java/Larry.java Outdated
Comment on lines +88 to +92
} else if (input.toLowerCase().startsWith("deadline")) {
String body = input.length() > 8 ? input.substring(8).trim() : "";
int byIdx = body.toLowerCase().indexOf("/by");
String desc = (byIdx == -1) ? body : body.substring(0, byIdx).trim();
String by = (byIdx == -1) ? "" : body.substring(byIdx + 3).trim();

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 putting the parsing logic in another class or function would make your code neater 👍

Comment thread src/main/java/Larry.java Outdated
Comment on lines +27 to +32
private static void printList(List<Task> tasks) {
System.out.println("Here are the tasks in your list:");
for (int i = 0; i < tasks.size(); i++) {
System.out.println((i + 1) + "." + tasks.get(i));
}
}

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 like how you extracted printList as a separate function from the main code, it makes your codebase much neater :)

Comment thread src/main/java/Larry.java Outdated
Comment on lines +60 to +65
int idx = parseIndex(input.substring(7));
if (!isValidIndex(idx, tasks)) {
System.out.println("Invalid task index.");
continue;
}
Task t = tasks.get(idx - 1);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These lines are repeated in "mark" as well, maybe a separate function would make it less repetitive?

Enable assertions for Gradle run and tests (-ea), and add asserts in TaskList for index bounds and non-null tasks, Parser for non-null inputs, and Storage for non-null results.

Why: Catch programmer mistakes early while keeping user-facing validation unchanged. Improves reliability with minimal code."
Extract a helper to build 'task added' messages and reuse it in todo, deadline, and event flows.

Why: Reduces duplication, improves readability, and keeps output identical so existing tests and text-UI checks remain valid.
Add a simple help command listing supported commands and their syntax. Available in GUI (string response via LarryCore) and CLI (Ui.showHelp). Why: Improves discoverability without affecting existing features/tests.
@ary-ban ary-ban force-pushed the master branch 2 times, most recently from 8ce6813 to e60fff4 Compare September 25, 2025 14:18
Normalize common short forms (t, dl, ev, ls, mk, um, del, f, h, q) to their canonical commands in Parser so users can type quicker. Help output updated to document aliases.

Why: Improves usability with minimal risk—no storage/model changes and backward compatible with existing commands.

# Conflicts:
#	data/larry.txt
#	src/main/java/larry/parser/Parser.java
Create an AI.md file under the docs folder to document AI usage in the project
Use relative path from docs/
This commit, as well as the preceding few commits, have been accompanied by full commit messages to add details to the changes made
Doc-only tweak so the branch has a visible diff for a PR.
Assertions: add short note in README about -ea
Doc-only change to create a PR for Week 5 requirement.
UI advertises 'help (h)' but 'h' was not recognized.\n\nAdding the alias improves parity between UI hints and parsing behavior.
Replace assertions (disabled unless -ea) with Objects.requireNonNull in commandWord/argsOf to prevent NPEs reliably.
Return -1 for null input instead of throwing NPE when trim() is called.
Reduces duplication and clarifies intent in find() by centralizing case-insensitive substring matching.
Avoids potential NPEs when callers pass null; preserves behavior otherwise.
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.

4 participants