• Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Almost lost all files

Sign in to follow this  


Upgrading to a new linux distro I backed up my files before erasing the hard drive, then discovered that they had somehow become corrupted. Fortunately I had decided to be anal an actually backed up the data on 2 computers, or else I would likely have lost everything. Ouch, that would have hurt.

Even still, it was a pain to get the files off the secondary backup (a really old laptop) as the adaptor for the network card on the laptop finally decided to die. So I ended up using an ipod to transfer the files between computers - but at least everything turned out ok. I think in the future i'll just create a separate /home partition so that I won't have to deal with this type of thing.

I've also recently changed my coding style slightly to look more like this:

int* foo = new int(5);

// Do something with foo ........

// old way
if (foo == NULL)
// do something

// new way
if (NULL == foo)
// do something

// this prevents me from accidentally doing something like
if (foo = NULL) // which is probably not what i'm meaning to do
// and likely caused by a lack of caffeine

// also
if (NULL = foo) // won't compile

Then again, if invoked with a -Wall switch, g++ will give a warning with if (foo = NULL), so it doesn't seem like that big of a deal. But if you're not invoking g++ with the display all warnings flag, it will happily give you an app with a possibly hard to find bug.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement