How to save code solutions?

How to save code solutions?
0

I just realized that FCC is not saving my solutions to all the coding problems and challenges I have already solved and the only way to save it currently is via JSON. What gives? It’s extremely frustrating to have lost all the solutions I have worked so hard thru. Is there any way to retrieve them or am I screwed?

You could download solutions and save them on your computer, if you really want to save them.

1 Like

There are two different types of saved progress for Free Code Camp: your profile and your browser cache.

A list of your completed challenges is saved to your account in the FCC database. You can see the list of completed challenges by looking at your public portfolio. With a growing curriculum already over 1,400 lessons and a community of millions of people, FCC does not store every solution to every challenge in its database. When you complete a challenge, there is a modal that gives you the option to download your solution. This gives you the option to save a copy of any solution that you may want to reference later. There are some challenges which are classified as projects required for certifications. Your solutions to those can be viewed on your settings page.

Your in-editor code is saved in your browser’s local storage. Recent in-progress code from the challenge editor is also saved in your local browser cache when you run tests. If you are completing lessons and do not see your recent code, then your local storage has been cleared or something is preventing FCC from writing to your browser’s storage. This could be a browser setting, a privacy extension, or a browser version incompatibility. Especially as you get to more complicated challenges that may take multiple sessions, I strongly recommend saving your in-progress work outside of the browser cache.

This is a good opportunity to learn the ins and outs of your GitHub account, but you can also just save locally or use a service like repl.it which allows for versioning.

2 Likes

When I download my solution it saves it in a word document and does show the corresponding code i wrote. I wish I knew what the exact cause is out of the possibilities you outlined. I don’t suppose you could elaborate further so i can figure out why I can’t see my code?

I’m not sure what you mean. When you download a solution, it is saved as a .json file. You don’t want to open it with a word processor, but with a text editor. It does include the code from your solution. If you search the forum for a bit, I believe that you will find some campers have created tools that help format the json into a more human-readable format.

OK thanks I’m not sure myself where I was going wrong before