Help for a beginner

Hello i have recently purchased an arduino kit that comes with projects and the code is already written and organized into folders. I was working on one of the basic projects and tried to change the code around and accidentally closed the window. When i go back to the file it does not show the original code but my version instead and for some reason it did not ask me if i would like to save changes. My question is should i in the properties settings for the coded files change it to (read only) or does it not make sense to do that with the IDE software. Thank you

Examples that come with libraries (and show up in the File->Examples menu) are read-only.

If you've accidentally changed something somewhere else, it's best to download it again.

The IDE preferences has a setting to save/not save.

Get in the habit of making backups.
And/Or
When you edit an old sketch, immediately save it as junk.
.

If I am modifying an existing program - the first thing I do is save as a different name - usually I append either a number or letter sample-01 or sample-A - - if the changes are major or in a new direction I will save with a name that reflects what I am now trying to do

Or just use git :slight_smile:

I prefer Subversion myself. I could never get the hang of Git.

All incoming source code examples get saved into Subversion. All real code I write gets saved into Subversion at the end of the day or the end of a logical unit of work. Then if I accidentally change something I have a good way to separate the accidental changes from the intentional (pin numbers changed, for example.)