Ewan10 / Task-Manager

0 stars 0 forks source link

Enable tasks marked as done, better type to store the due date of a task, allow user to choose the file name for save. #14

Closed Ewan10 closed 2 years ago

Ewan10 commented 2 years ago

After doing all the changes but the removal of List the program was working. After I removed the List and use only the Hahsmap it broke. So the problem lies in the save or load methods where the major substitution between List and Map occurred. I also used an automatic formatting feature on save. Have a look on the five java files if you find the formatting satisfactory.

Dont't you have a look on the save-load methods at some point in case you see what is wrong? Some statements in the load method need replacement and I don't understand the error messages. It becomes very tedious psychologically when I write code and then I must replace it especially with code that I cannot find and write easily. I can search to see how I can parse a Hashmap to Gson but it is not certain whether I can find a solution.

I thought the use of Map since the first version of the project when I didn't use any libraries and did everything manually. The guidelines of management say that when the goal becomes overchallenging the achiever loses the motivation. Similarly when it is underchallenging. I spent a week searching how to parse the list with the joda fields. It becomes overchallenging and overwhelming.

Ewan10 commented 2 years ago

I see a bug. If the program starts for the first time the user didn't specify any file for loading and then I try to load from the default file fileStorage.json. This raises exception as this file does not exist. Then you are tempted to think "I am going to store some flag so I check the value of this flag and if it is set or reset I am not going to load or I am not going to load otherwise." But if you start the program for the first time it is impossible to have somewhere stored that variable-flag. Do you see the issue?

I 'll do review request tomorrow.

Ewan10 commented 2 years ago

Just today I managed to run the task.sh file you sent me two months ago. I didn't have a clue how to use it. So far I had pasted the long command for building and run with arguments in a text file and I would copy it manually and paste it on the command line. I couldn't correlate the code inside the task.sh with running the program. I studied it yesterday though and now I know. I conceived that it was a script for taking arguments and emitting the long spaghetti like command for build and run. Yeah. We are on the way for more hilarious incidents to come.

thompsy commented 2 years ago

So, I've left a few follow-up comments above.

You mention that you're seeing a FileNotFound exception. You should update the TaskManager.load() code to create the file if it does not exist.

You've added tasks.sh to the .gitignore. Can I ask why? That prevents us tracking any changes to that file which doesn't seem like a good idea.