Lost my CODE!

Windows, I use windows

Damn end users

[derail-alert]
I love how Apple can get away with advertising quite blatantly to complete and total morons, calling the machine they failed to use correctly the problem. :stuck_out_tongue:
[/derail-alert]

Wait, you never saved that file in 2 weeks?

I’m sorry, but that’s just silly!

Its impossible to not save the file in 2 weeks, unless he never ran the program 1 time in those 2 weeks. The code must be saved for it to be compiled. If he didn’t save it 1 time, that means he didn’t run it even once.

Try opening source code from My Computer (Ow wow I don’t know how the things where you browse folders in Windows). I think something like this happened to me once on my shitty laptop which would turn off randomly sometimes. My file was empty, but in folder explorer the file was like it was before.

Source hosting is free… Like what is so difficult about taking 10 minutes to learn how to use it.

No - the file just got corrupted. I have the same problem with my work PC. I get a blue screen on it from time to time and then every open file is filled with binary nulls…
Unfortunately this also happens to my locally cloned git repo - So any non-pushed changes are also lost :frowning:

Get over with. This might actually not be that bad at all. Redoing something that you already did just helps you practice and usually results in cleaner code anyway. So see this as an oportunity and not as a problem.

Back in the days when I started programming I always started from scratch and so basically memorized all the 68k assemly code you need to write an Atari ST overscan demo with side scrolling text and raster interrupt colorizing without even looking up interrupts, adresses or clock cycles. 8)

You can restore files from Windows 8 file history. Link here http://windows.microsoft.com/en-IN/windows-8/how-use-file-history if you have it enabled. I recommend you to enable it to not suffer anytime again.

I guess from the screenshot that you use Eclipse, so tried the Local History feature? I don’t use Eclipse, so I don’t know how long its’ history lasts…

Also, try opening it up outside of eclipse. Navigate to your workspace and look for files that look like this: GameScreen.java~

If you get really desperate, you could try decompiling any class files that eclipse has generated.

Oh god, it worked. I have my precious code back.

@SHC
I have that off, but I’ll set that up before I do any coding.

And after loosing my code, anything that I ran told me that the this pproject had errors before they would run… odd

A lot of people here have mentioned online repo backups. While they are nice, and mostly fool proof, letting something you are working on sit in one place, no matter where it is, is a bad idea. You should have a repo, either local or internet based, a local copy on your machine and a backup storage (external hd/flashdrive/etc).

The reason I mention this is because within the last few months a webhosting/repo site was hacked and ransomed for the content and when the admin tried to retake control of the site the cracker wiped out most of the content on the site. This obviously resulted in that site closing immediately and many developers were left without their code and I’m sure that left a bad taste in their mouths.

I’ll post an update when I find the name of the site.

github ? … j/k :wink:

get a root-server or two, install hg or git and backup your code there.

What’s wrong with github? ??? :persecutioncomplex:

It’s public.

Bitbucket has free private repos. (for up to 5 team members IIRC) There’s some others that have them too.

i’m not serious.

At the very least, Google Drive or Dropbox.

Cas :slight_smile:

Always be prepared to the worst case scenarios. It should not be a big deal if suddenly your HD fails or computer set on fire. Because eventually something will happen.

Whats wrong with public?
You can sell open-source software.