> I just did something really dumb.
It was an accident. But at least you walked away from
it ... maybe.
> Anyway, just to make sure, there's no magic trick for recovering source
> code from gcc-compiled code, is there?
I'm feeling a little of my own Mea Culpa regarding my initial
response to you on this. BTW, anything I said about your management
and SA staff applies to YOU if you don't have any management
(are working independently). You would be your own management
and you have to provide yourself the tools to enable you to
accomplish the tasks correctly.
> I never use emoticons, but right now I am really bummed :-(
Don't get bummed. Get mad. Like any serious accident:
1) Determine the cause(s)
2) Correct these to make sure it doesn't happen again
Your work habits were an accident waiting to happen IMHO.
I've lost source code only twice, due to my poor work habits,
in a many-year career. Losing source is the one thing I hate
the most because it is a big waste of time and life and it's
very boring going through (especially manual) recovery.
Although it could be an opportunity to do a ground zero rewrite!
The first time, I had a 'cleanup' shell I was developing go
wild and wipe itself out as well as three hours of work.
I had paper backups of most of the modules because I had
just printed them. Having a bug in a module that is operating
in your development area is a risk that comes with the
software development turf.
What did I do about this for the future? I changed my work
habits by creating .save directories and taking snapshots, often,
of the source. This can be also used like a mini version control
if the snapshots are not overwritten. They can be compared
with each other, reverted-to, etc.
The second time I accidentally executed a 'shell archive' in
my CWD. Before I could stop it, it had reverted/overwritten
several source modules.
What did I do for the future? I made sure that my shell archives
where not directly executable as this one was. I had simply
typed the wrong command. Nowadays, I would have to 'dot'
execute one to have such an accident. This is much less likely.
Also, I don't keep 'shars' lying around in the CWD or zip them
up if I do.
A valuable policy: KEEP YOUR OWN BACKUPS IF IT IS POSSIBLE
DO SO ... AND CHECK THEM. BE PARANOID!
THE CLOSER YOU GET TO COMPLETION OF
SOMETHING THE MORE PARANOID YOU SHOULD BE ...
CONSTANTLY ASK YOURSELF THE QUESTION DURING DEVELOPMENT:
WHAT WOULD BE THE IMPACT IF I LOST THE SOURCE RIGHT NOW?
Do not rely on other people to backup your work because:
1) They may not be doing it or there may be a fault
in the backup procedure. I HAVE SEEN THIS MANY TIMES
and it is tragic. Once saw an entire development group
lose a week of work by having a faulty backup procedure.
2) Their backup regime may not meet your backup needs.
3) It is a PIA to go to them for recovery, if not just