Suggestion for Saving Code

Back to General discussions forum

DecaHong     2023-10-27 02:05:31

Good Day Admin,

This is a small suggestion based on my observation on the Saving of the Code aspect of this website.

I noticed that you have to click "Submit" first, before your code is saved.

The saving refers to when you can click the programming language (eg: Java) of your choice and it will autofill the code you made before.

I think adding a "Save as Draft" option where you can save your code without Submitting it might be a good idea. In my opinion, submitting code that clearly gives the wrong output because you know it is not yet complete and its purpose is to Save the code for next time, is not that good.

Thank you for your time in reading this.

Rodion (admin)     2023-10-27 04:39:51
User avatar

Hi Friend!

Thanks for suggestion! There is some reason in the flow you propose, however historically it seems people more often develop their code not directly in the form on "task view" page, but on their machine, so they don't feel much necessity in saving drafts (on server at least). On the other hand when solutions are not simply "saved" there, since it is stored as the attempt of solving the task and this involves some more confusing logic :)

Let me instead for now add slightly different trick - let the program code be stored in-browser periodically, so if the page is closed even inadvertently, the code reappears here when it is reopened. For now let this stored solution be removed on submission. Hopefully this may help a bit, even though it is not the same that your proposed (particularly if one needs to store solution and then continue work on different computer - submitting it is the best way yet).

(the change have just been made, feel free to test it, though re-login may be needed to clear cached older scripts)

DecaHong     2023-10-27 07:38:21

Hello Admin Rodion,

I would like to thank you for the insight on other people using their machine to code. With this knowledge, I have to agree that saving drafts in the server would not be the best idea.

Your alternative suggestion of using cache to save the script is perfect. I have also tested it out and can confirm that it is working properly.

Thank you for the consideration to my problem.

Have a good day ahead!

Please login and solve 5 problems to be able to post at forum