Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
User Journal

Journal iabervon's Journal: I scared myself last night 1

So last night I was working on a virtual machine I've been thinking about. I took a "Beta" simulator (for a class at MIT) that I'd written a while ago, and converted it to using structs for values instead of longs. This amounts mostly to tracking down every place that a value is used (in both the simulator and the assembler) and using the value field of the variable, plus dealing more carefully with storage, and also writing functions for dealing with the simulated memory, since that's now more complicated.

I got it all written, and debugged it with some difficulty (as I'd forgotten how most of the code worked, and, when I could understand the code at a glance, I didn't have any larger-scale information, like, say, where I'd put various functions), and actually got it all working exactly like it had been before, except with the ability to eventually attach the information of my choice to every single value in the system.

I added it to my CVS repository. Then I removed a few things that I hadn't meant to add. Then I removed all of the C files. Oops.

I stared at it for a bit, and then copied the emacs backup files over, thinking I'd lost a single revision of each, which wouldn't be that much, since I'd been debugging. I set about redoing all of the remaining modifications.

Turns out that my emacs doesn't overwrite the backup files under whatever circumstances I was in, which meant that the files I had were all the originals. I then proceeded to make the sum of every single change I'd made in the previous 3 hours, by going through each file and changing everything that was not how it should be. In the process I moved and updated a function I had been considering but hadn't changed.

When I tried compiling it, it turned out that I'd forgotten to include a header file in each of the files, and I'd forgotten three ampersands.

I did the whole thing half-asleep (having already been sufficiently sleepy to delete all of the files). It took me slightly more than 45 minutes. I don't really think I could have done it if it hadn't been right after, or if I'd had to do it from scratch. But it was like if I'd taken an exam, and then had to retake it immediately afterwards, and I'd been able to give the answers word for word, except that I forgot to put my name on the pages. This from someone who can't normally remember more than one thing at a time.

This discussion has been archived. No new comments can be posted.

I scared myself last night

Comments Filter:

Top Ten Things Overheard At The ANSI C Draft Committee Meetings: (5) All right, who's the wiseguy who stuck this trigraph stuff in here?

Working...