Overview

GhostList is a self-erasing to-do list application built in Java. It lets users add tasks that automatically disappear after a set time, which in this version is 15 seconds. This keeps the list clean and promotes quick task completion. This project shows how to use Java's ArrayLists, Timer, and Scanner for managing tasks and user input.

Inspiration

I came up with the idea for GhostList from the challenge of managing overwhelming to-do lists. Often, people add tasks but forget or ignore them, leading to a cluttered list. I wanted to design a simple and enjoyable app that encourages productivity while keeping the interface neat. Tasks appear and then vanish like a “ghost.”

"Tasks appear, then disappear. GhostList makes them fade, my dear."

Hypothesis:

I thought that a self-erasing to-do list would help users manage their tasks better. It would automatically remove completed or ignored tasks after a short time, leading to a cleaner and more engaging task management experience.

Key Learnings

While building GhostList, I learned:

  • Java fundamentals: Effectively working with ArrayLists, loops, and conditionals.
  • Timers and scheduling: Using Timer and TimerTask to schedule actions.
  • User input handling: Managing Scanner inputs while avoiding newline and type mismatch issues.
  • Debugging asynchronous behavior: Making sure tasks were removed correctly without impacting others.

Implementation

Core Structure: I used ArrayList to store tasks. Input Handling: I captured user inputs via Scanner to create an interactive console interface. Auto-Delete Feature: I implemented Timer and TimerTask to remove tasks automatically after 15 seconds. Task Management: I safely removed tasks using references to prevent index-related errors. The auto-delete timing can be represented mathematically as: $$ t_{delete} = 15 \text{ seconds} $$ where $$ t_{delete} is the time after which a task disappears.

How I Tested It:

I built a Java console application using ArrayList to store tasks. I used Timer and TimerTask to schedule automatic task deletion after 15 seconds. I manually added multiple tasks to ensure they appeared, stayed visible for 15 seconds, and then vanished correctly. I tested edge cases such as:

  • Adding multiple tasks quickly
  • Viewing tasks while some were about to be deleted
  • Handling invalid inputs

What Worked:

Tasks were successfully added and showed up in the list. Automatic deletion after 15 seconds worked well in most cases. The console interface stayed interactive and responsive while tasks were being removed in the background.

What Didn’t Work:

Sometimes, quickly adding multiple tasks caused slight delays in the deletion messages showing up in the console. Handling Scanner input needed careful attention, especially when switching between numbers (nextInt()) and text (nextLine()). Users could not customize the deletion time in this initial version, which is something to improve in the future.

Future Improvements

  • Customizable timers for different tasks.
  • A GUI for a more interactive experience.
  • Temporary task storage in a database or file before auto-deletion.
  • Notifications before task deletion for better user engagement.

Conclusion

GhostList taught me how to combine basic Java features with problem-solving skills. The idea of tasks showing up and disappearing gives a unique, gamified approach to task management.

Built With

Share this project:

Updates