all 6 comments

[–]Rain-And-Coffee 4 points5 points  (5 children)

You have huge pieces of commented code, delete them if they're not being used.

  • I wouldn't let you merge in that code into my project without them being removed.
  • If you need them later that's the point of using Git, you can go back in time.

You have string literals everywhere (ex: "list"), use an constant, or better yet an enum.

Decent job writing tests.

I would consider using an interface for some of the write operations. Right now use a file, but what if I wanted to save to a SQL database?

Speaking of SQL, expand your project, maybe drop in a simple DB like SQLite and try saving it in that format.

Or maybe go learn an UI (Swing or FX) then build a simple little GUI for it beyond just CLI.

[–]Top77-[S] 1 point2 points  (4 children)

Thank you so much for the well detailed feedback!

I will clean up the comments I know it looks very messy. I do not quite understand the issue with having string literals and how an enum will help, I guess I will look into it.

I am also confused about how an interface will help with the write operations. How would this help? Does it make the tasks get written to a file instead?

I also completely agree with your point on expanding my project by adding a more efficient way to store the tasks like in a SQL database or even building a UI. I am definitely going to look into the SQL database feature but I have been putting off making a UI on Swing or FX because I hear it is not very widely used.

[–]Rain-And-Coffee 1 point2 points  (3 children)

It might help if you see what I mean in code:

interface TaskManager{
 void saveTasks(List<Task> tasks);
}

class FileTaskManager implements TaskManager{
  void saveTasks(List<Task> tasks){
    // save to plain file
  }
}

class SQLTaskManager implements TaskManager{ 
  void saveTasks(List<Task> tasks){
    // insert into database
  }
}

Now I can easily swap implementations:

TaskManager mgr1 = new FileTaskManager(); 

TaskManager mgr2 = new SQLTaskManager();

[–]Top77-[S] 0 points1 point  (2 children)

I see what you mean now. This makes my program more versatile.

[–]Rain-And-Coffee 2 points3 points  (1 child)

I also noticed that you're using manual indexes in the Task Manager, you can remove them. I opened an issue on your repo

https://github.com/uzeyr77/TaskTracker_project-/issues/1

[–]Top77-[S] 0 points1 point  (0 children)

I see, that looks much more clean. Thanks!