A lesson to you all!
-
Killswitch
- Enthusiast

- Posts: 731
- Joined: Wed Apr 21, 2004 7:12 pm
A lesson to you all!
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?
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?
~I see one problem with your reasoning: the fact is thats not a chicken~
- netmaestro
- PureBasic Bullfrog

- Posts: 8453
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
-
Killswitch
- Enthusiast

- Posts: 731
- Joined: Wed Apr 21, 2004 7:12 pm
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.
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.
Last edited by Trond on Tue Aug 01, 2006 9:43 pm, edited 1 time in total.
-
dracflamloc
- Addict

- Posts: 1648
- Joined: Mon Sep 20, 2004 3:52 pm
- Contact:
that's why i keep hundreds of backups 
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
- Psychophanta
- Always Here

- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
... but i wasn't joking 
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
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.
---------------
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.
-
techjunkie
- Addict

- Posts: 1126
- Joined: Wed Oct 15, 2003 12:40 am
- Location: Sweden
- Contact:
*LOL* Very funny!Trond wrote:YESTERDAY
---------------
Yesterday,
All those backups seemed a waste of pay.
Now my database has gone away.
Oh I believe in yesterday.

(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
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
http://www.free-av.com/antivirclassic/a ... erase.html
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
