I think this is a bug so I post it in this category,
It happened to me several times, with different languages :
I translate my solutions from one language to another to get the achievements, say Perl -> PHP for example.
I copy-paste my code from Perl to PHP and begin the translation.
Once it’s done, I run it and see that I have an execution error, so I think I’ve probably made a mistake during the translation, and I need to see my original code in Perl.
I go back to Perl in the IDE : my code was deleted ! Everything’s back to the default code. I just lose all my work in this language.
Please do something for this, I’m tired of rewriting my solutions each time…
We are aware of this issue. It’s will be fixed very soon.
Btw, you can retrieve your previous solutions from “Results” menu => “History” tab
Okay, thanks for the tip, sorry I’ve missed this feature !
Keep up the good work ~
On a similar note: when I solve a puzzle in different languages, I can usually retrieve my code for any language I submitted – except for some seemingly random exceptions (e.g. C and C++ for Power of Thor).
Is it the same issue?
PS. Yes, I can find my code via history tab.
We’ve released a fix a few hours ago. Can you check if it’s now working for all of you?
Sorry to res a zombie topic but I feel like this happened to me somewhere last week in a community puzzle that doesn’t have its own thread. I was puzzeling https://www.codingame.com/ide/puzzle/bulls-and-cows and I had an almost correct solution in C#. (I even wrote out some of my own testcases and kept them in a comment.) Before submitting the C# attempt I rewrote everything in C++ (, using a different approach but some of the knowledge I gained from my original experiment). After successfully submitting the C++ solution it seems I lost my C# code (which I wanted to fix).
I don’t think in this scenario its super bad that code was lost but if this is some kind of bug and can happen in other situations that could be very demotivational to programmers.
In the IDE, only the last played code is saved. If you want to save/use multiple languages, you have to submit, so you can found them in the History tab.
Thank you for clearing that up! I guess I never noticed on other problems I solved in multiple languages because I opened multiple browser tabs (or had one open on my PC and one on my laptop) I think I only found out because I started writing my own testcases and saving them as a comment in the source.
I feel like that language switching button could one day be enhanced with some kind of warning if you want to throw all that code in the textbox away? The restore button thankfully already has something like that since its comically close to the expand button.