A lesson to you all!

For everything that's not in any way related to PureBasic. General chat etc...
Killswitch
Enthusiast
Enthusiast
Posts: 731
Joined: Wed Apr 21, 2004 7:12 pm

A lesson to you all!

Post 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?
~I see one problem with your reasoning: the fact is thats not a chicken~
Hydrate
Enthusiast
Enthusiast
Posts: 436
Joined: Mon May 16, 2005 9:37 pm
Contact:

Post 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.
.::Image::.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8453
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post 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.
BERESHEIT
Killswitch
Enthusiast
Enthusiast
Posts: 731
Joined: Wed Apr 21, 2004 7:12 pm

Post by Killswitch »

I'd not considered the harddrive, I'll have a look into it - thanks!
~I see one problem with your reasoning: the fact is thats not a chicken~
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post 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.
Last edited by Trond on Tue Aug 01, 2006 9:43 pm, edited 1 time in total.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

I've seen jaPBe do that to my files sometimes, but not yet with the new ide
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post 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 .... :)
Dare2 cut down to size
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6175
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

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... )
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post 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:
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6175
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

... 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... )
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post 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.
techjunkie
Addict
Addict
Posts: 1126
Joined: Wed Oct 15, 2003 12:40 am
Location: Sweden
Contact:

Post 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!!
Image
(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post 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
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Post Reply