bdebon / choiceof.dev

Developers have to cope with pretty hard choices every day. This is a collection of the most complex and funny choices. What will be yours?
https://choiceof.dev
GNU General Public License v3.0
473 stars 93 forks source link

Do not display choices already displayed #146

Open Eblancho opened 1 year ago

Eblancho commented 1 year ago

After spending several minutes on the app, I often saw the same questions multiple times. For example, PHP/JS came up very very often.

Yet I haven't seen deploy-friday-or-light-theme, fingers-on-screen-or-no-touching or center-div-or-solving-poincaret

I guess it's the concern of randomness but it would be nice to have a system that allows not to display questions already seen. And when all the questions are passed, a screen with "You have already answered all our choices ! Come back in a few days, there will certainly be other vicious dev choices for you !" or something like that.

I don't really have a quick fix :

Tracking the history of a logged user is dead because it requires a authentication and it kills the "fast use" of the application. Tracking the user with his IP... meh if someone else on my network wants to play it's not crazy.

There must be a way to do it with cookies but I very rarely use them to propose a solution.

Anyway, I bring the problem but no solution, sorry haha.

P.S: Thank you for this project, I rarely do issues for projects outside of my work, it's cool. I will try to participate when I have a bit more time.

fgremez commented 1 year ago

@Eblancho same questions on same session ?

Anyway, you can use cookies or localStorage without authentication. If @bdebon ask i can try

Eblancho commented 1 year ago

I just tried again and indeed no, maybe f5 without wanting it and therefore reset the loop. Sorry if this is not a bug.

Nevertheless, at the end of the choices I start again and I turn thus in circle, maybe it's necessary to have an end page.

bdebon commented 1 year ago

Yes there is definitely a loop at the end, but if you don't refresh you will not see the same question. Feel free to implement a localstorage history of the question already seen and maybe an end screen if you have a cool idea. I would actually like a end screen saying : congratulations, you reached the end, do you want to add your own question to the website? Follow this link. And the link would get you to the corresponding section in the readme