Page 1 of 1

A lesson to you all!

Posted: Tue Aug 01, 2006 8:39 pm
by Killswitch
I've been quitely working on a new version of my compiler for just under a month now, and I've written about 2000 lines of code. Anyway, about an hour ago I had a flash of inspiration and fired up PB to hammer out some new code.

Most of the files in the project opened fine, but the little binary file viewer came up for the main project file. All the bytes read 0. 'Christ!' I thought, but I stayed calm and tried opening up the file again. Same thing. Tried in notepad, nothing. Damn I was getting frustrated, I (stupidly) hadn't made any backups and while that file didn't make up the majority of the code it contained some important and lengthy procedures which I didn't fancy writing again.

I spent the best part of the hour trying to open, recover, find, repair and/or retrieve the file but with no luck. As a last resort I decided to check the PureBasic\Compilers folder to see if there was, well, anything there. Thankfully Main.pb had been the last file I'd compiled and sitting right there was PB_Editor_Output.pb which had all of my lost code.

Some of you might've heard my sigh of relief!

The moral of the story is ALWAYS BACKUP YOUR CODE!

And, as a side note, is there any explination for the blanking out of the file in the first place?

Posted: Tue Aug 01, 2006 8:41 pm
by Hydrate
Oh god ive had that happen before, but i save my source code twice on my harddrive, and now once on a memory stick, whY? Well, i had some trouble where my hardrive corrupted, and i lost everything, and im not loosing anything to that again.

Posted: Tue Aug 01, 2006 9:28 pm
by netmaestro
Most likely a hard disk error. If it happened to me I'd run an exhaustive diagnostic test on it using the latest version supplied by the HD vendor. See how that goes, but if it's an older drive I'd consider replacing it with a new one. They're certainly cheap enough these days.

Posted: Tue Aug 01, 2006 9:31 pm
by Killswitch
I'd not considered the harddrive, I'll have a look into it - thanks!

Posted: Tue Aug 01, 2006 9:35 pm
by Trond
Oh, I would go amok if something "important" I wrote just was zeroed out! Luckily that has never happened to me yet. Although I sometimes deletes the wrong files, just Shift+Delete, Enter and I think "woops! What was that?" And I see the file I tried to delete and obviously something else has gone.

Edit: 2000 lines is a lot of code. I've got a little compiler in pascal and that is only 1500 lines and it's got both integers and floats (and knows how to mix them). I look forward to seeing your creation.

Posted: Tue Aug 01, 2006 9:36 pm
by dracflamloc
I've seen jaPBe do that to my files sometimes, but not yet with the new ide

Posted: Tue Aug 01, 2006 11:57 pm
by Dare
Trond wrote:.. just Shift+Delete, Enter and I think "woops! What was that?" And I see the file I tried to delete and obviously something else has gone.
I can relate. But I still hold down the shift .... :)

Posted: Wed Aug 02, 2006 10:35 am
by blueznl
that's why i keep hundreds of backups :-)

Posted: Wed Aug 02, 2006 12:19 pm
by Psychophanta
blueznl wrote:that's why i keep hundreds of backups :-)
Me too, not hundreds but almosy a ton. Almost everyday: to 2 pendrives, to 4 external HD-USB, to CDRW at home, to another CDRW at car, to my gmail account, to my another gmail account, to a web space, to another web space... :wink:

Posted: Wed Aug 02, 2006 4:28 pm
by blueznl
... but i wasn't joking :-)

Posted: Sat Aug 12, 2006 2:54 pm
by Trond
YESTERDAY
---------------
Yesterday,
All those backups seemed a waste of pay.
Now my database has gone away.
Oh I believe in yesterday.

Suddenly,
There's not half the files there used to be,
And there's a milestone
hanging over me
The system crashed so suddenly.

I pushed something wrong
What it was I could not say.

Now all my data's gone
and I long for yesterday-ay-ay-ay.

Yesterday,
The need for back-ups seemed so far away.
I knew my data was all here to stay,
Now I believe in yesterday.

Posted: Sat Aug 12, 2006 3:14 pm
by techjunkie
Trond wrote:YESTERDAY
---------------
Yesterday,
All those backups seemed a waste of pay.
Now my database has gone away.
Oh I believe in yesterday.
*LOL* Very funny! :lol: Now you have to record it and let us hear your beautiful voice Trond!!

Posted: Sat Aug 12, 2006 3:18 pm
by Inf0Byt3
Just for the matter, I just accidentally deleted my whole work again (don't worry i had backups) and I searched for some recovery programs on the net. I found something really cool and freeware made by AVIRA, the people behind Antivir (one of the best av's out-there) and it recovered all my files perfectly... Here's the link if you want to try it :

http://www.free-av.com/antivirclassic/a ... erase.html