fikri icon indicating copy to clipboard operation
fikri copied to clipboard

Feature/refactor

Open madeindjs opened this issue 9 years ago • 5 comments

Hello @askn ,

I improve your code in more OOP style. Also I add Unit Test with spec. So tu ensure project works correctly you simpy need to run

$ crystal spec

I also deleted the Task..

$ ./fikri init

.. now you simply have to add/list task and the file will be automatically created.

I hope you'll enjoy my work. Don't hesitate if you see something wrong :)

Alex

madeindjs avatar Feb 13 '17 07:02 madeindjs

Hello Alex, I thank you for your time improving my code. I think you did a good job. But I'd rather prefer that you don't change the part that is reflected to the end user (the format that is printed on the screen). I'd like this to stay as it is. screen shot 2017-02-15 at 09 57 34

askn avatar Feb 15 '17 06:02 askn

Hello Aşkın,

I have no problem to change the output format but in the new version I do not use ID.. In my mind task name should be unique and there are no need to store anything more.

So to toggle a task you just have to:

$ ./fikri -t my task

... and the output will alway be as the first output from your screenshot. Something like this

$ ./fikri -l my task
    X a task not completed
    V a tasks completed 

What do you think about?

madeindjs avatar Feb 15 '17 07:02 madeindjs

Yes, I did understand you. But because of the task is too long, it would be difficult to use. Probably "id" could also be written inside of the file.

askn avatar Feb 15 '17 08:02 askn

Dear Aşkın,

I added ID system on tasks. I think it should be alright now.

madeindjs avatar Feb 24 '17 08:02 madeindjs

Thank you, it’s awesome. But I have found a little bug. If I add the same task, the id gets -1

askn avatar Mar 07 '17 12:03 askn