Feedback needed for a Tui Timer in Rust

While doing it I started struggling with limitations for the initial argument (Which has to deal with the time, let's say you want to start with 15min... So you call "[project] 15m").

But this struggling ended up in a situation where you could write 15m5m, these would sum up and end up at 20m. Same with hours and seconds, so, while in a normal timer you could only call something like 01h20m15s, here you could call:

1h10m3h50s1h5m10s

(5h15m60s)

I feel like that's kind of unique.

What do you all think? Should I keep it? Or fix?

If you are new to programming, the first thing I would recommend you is to not get stressed. If you get bored about this project, let it be and move on to the next one that excites you.

Now that if you have stress under control, you should pursuit making invalid states unrepresentable. This is fundamental for any good software design and a core skill for your career as a software developer.

1 Like

That is indeed kind of unique. You have come up with a notation for addition without using "+" :slight_smile:

I see two options:

  1. Make your codes behaviour your specification and declare it good.
  2. Bow to perceived normality and fix the code to do that instead.

Up to you.

1 Like

I see what you mean. I'm not new, also even fixed the problem and formatted it for a normal behaviour, it was not big deal.

It was after solving the problem that I thought, "hold on, couldn't that be more stars in the project?" as I pretend to post it.

I think I've came to the conclusion of having two different branches, a messy (on the weird format) and default one.