Hi!
Jeremie recently added the split second stopwatch exercise to the Elm track, and while reviewing it I suggested that the code would be better as a finite state machine.
Jeremie noted that he wanted to stick close to the problem specs, which I hadn’t read, and is a fair point.
I do think the code would be significantly cleaner as a finite state machine though, a lot of the error cases disappear, and its impossible for a client to use it wrongly. The api also teaches the caller about how it should be used.
I feel that by not doing this, we are at best missing an opportunity to guide students down a good path, and at worst, leading them down a bad path.
What do people think?
Thanks, Cedd
I don’t have an opinion on that matter, but only three tracks have implemented this exercise to date: C# (17 completions), Elixir (1 completion), and Elm (0 completions). If folks do want to change the exercise, we won’t break very many solutions.
I suspect a proof-of-concept using finite state machines would be illuminating for people including myself. If there isn’t consensus on updating the exercise, that implementation can also be spun out as its own track-specific exercise.
1 Like
Thanks Andras. Thats a good point, I’ll try and do that. Probably for C# being as Elm and Elixir are a bit more niche, and functional programming is less well known by the average developer.
2 Likes
I think changing the exercise is fine and you should go ahead 
Ok, thanks.
Is there a process for this? Open a PR in the problem specs repo and then open issues for C#, Elm and Elixir and then open prs for the tracks or something like that?
That said, I’m not sure if SleepinessByte was suggesting changing the exercise on the one track, or in the problem spec.
If you intend to change the problem spec, you should propose what exactly you think it should look like on the forum and get consensus before opening any PR.