[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.
[/derail-alert]
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.
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
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)
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…
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.
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.