Jason Salas' WebLog

On-air and online: making people laugh, making people think, pissing people off

Sponsors

ASP.NET sites that kick ass

Pals with blogs

Podcasts I listen to

ASP.NET Web Matrix ate my code

Now, this isn't so much a rip on Microsoft ASP.NET Web Matrix as it is on my own company's negligence into proper infrastructure and IT planning.  Short story ==> power outage, data corrupted, work re-hashed. 

Exhaustive story ==> earlier today, I was working on a code module for an upcoming project and was making a minor tweak to a page displaying customized data through cookies and database calls.  We had a semi-large power spike, which, of course, due to the skimpy fact that no one around here runs any UPS or battery back-up systems of any variety - thanks so much - my workstation was kicked totally offline, while the file in question was open in Web Matrix.  Upon rebooting, the file I was working on was blank when opened, despite being 6K in size.  After messing with it some more, I figured it got corrupted and gave up...I re-wrote the thing from scratch, trying to painstakingly re-create the logic, in about 45 minutes.  Thank goodness it's still a test module I've been working with for the last 2 months.  I can't imagine how I'd get around working with corrupted production code that I hadn't seen/touched in months.

At any rate, I'm not sure if this is something common to Web Matrix, as this has never happened in any other program in similar situations.  I've read stories in the past about cannibalistic IDEs, but I wasn't able to correlate power outages and data corruption. 

Anyone have a clue?

Comments

mike said:

If the file is 6K, there's got to be something in it. What do you see if you open it in Notepad or equivalent?
# June 21, 2004 11:11 PM

Jason Salas said:

Hi Mike,

This is what literally the full content within the file:

<%@ Page%>

...then, there's about 55 lines of blank space, but it can be highlighted, implying that there is/was something there, and that the text doesn't stop at the Page declaration.
# June 21, 2004 11:14 PM

Colt said:

I'm sorry to hear that Jason, but eating code is a common habit of Web Matrix.

Apart from power failure as in your case, I personally do face this problem occasionally, that is, the page was blank when I opened it in WM or some other rich editor. However, it'll become normal if I open it in *Notepad* again.
I know it looks weird, but I hope you can resume your codes in this way.
# June 22, 2004 12:13 AM

Jason Salas said:

Hi Colt,

I did think of that, and right after I opended the file unsuccessfully in WM, I tried it in Notepad, with the same result (actually, the Page declaration wasn't even visible). Everything worked out OK, but I seriously hope this is one event I'll not repeat anytime soon. I've been hitting CTRL-S like a madman today while working. :)
# June 22, 2004 12:27 AM

mike said:

Well, all in all, that sucks. :-( Nothing like that sinking feeling of realizing that that file is gone, man. Sorry you weren't able to recover it ...
# June 22, 2004 3:30 AM

AndrewSeven said:

Source Control?
# June 22, 2004 9:37 AM

Jason Nadal said:

Dumb question, but if this had been in a compiled dll somewhere on your pc, couldn't you have reflected it to get back something close to your source code?
# June 22, 2004 12:37 PM

Jason Salas said:

Hi Andrew,

If you're asking if I was using source control at the time of my accident - nope. Completely un-networked PC, just running Web Matrix independently. If yo're asking if I *should* be running it, yeah, I probably should. :(
# June 22, 2004 4:34 PM

Jason Salas said:

Hi Jason,

I didn't think of that. Good call. Actually, the one upside that came out of this is that because I recalled most of the core logic for the process, the second version came out better than the first, which is typical. The bitch was building the damn thing again from scratch.
# June 22, 2004 4:35 PM

Jason Nadal said:

There's nothing quite as annoying as rewriting code you had gotten to work and lost, I can feel your pain there... a little something I like to call "computer imposed refactoring" :)
# June 28, 2004 8:00 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)