Coding moments you'd like to forget

 
Post new topic   Reply to topic    mudlab.org Forum Index -> Coding
View previous topic :: View next topic  
Author Message
Kyuss



Joined: 13 May 2005
Posts: 37
Location: Southern Hellinois

PostPosted: Sat Jun 04, 2005 6:41 pm    Post subject: Coding moments you'd like to forget Reply with quote

Oh yeah, this one is plumb stupid. I only lost 4 days worth of code work
when this one happened.

I always remove the .o files after alot of changes, fresh rebuild.

Now, I can type rm *.o in my sleep it seems and be ok without any errors.

Anyway, my keyboard went out on me, in one friggin instant, one second
to the next, one of my keys stuck. So instead of rm *.o, I, ended up typing
rm *>o (or some such). Whole main diretory was gone. I had a buddy
behind me, wed been talking for a while, and this all sort of idely happened.
I still have the cracks in my oaken door from hopping up and whailing a
nice combo on my door (I was on crutches at the time, I also could not
walk, stand, let alone hop up and start whailing on an un-offending door
way.) But I did, we laughed about it later once I had explained it.

I unplugged the keyboard and shattered it against the door as well.
(luckily I keep spare keyboards around that work).

Thankfully, Id done a backup a couple days earlier, and restored every
thing to its prior state. And since I keep logs of everything thats changed
it was not hard (nor easy), to get back the loss of code.

The difficulty is in doing something unbugged the 1st time. Once it worked
in your brain you could rehash it out again and it works just fine. This was
just proof of that, though I could have done without the proof.


~Kell

Moderator's Note:
Split from Building moments you'd like to forget.

I thought this could do with its own topic oriented at coding -- Yui Unifex.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Author Message
eiz



Joined: 11 May 2005
Posts: 152
Location: Florida

PostPosted: Sat Jun 04, 2005 6:57 pm    Post subject: Reply with quote

Kyuss wrote:

Now, I can type rm *.o in my sleep it seems and be ok without any errors.


Two words... make clean. Razz
Back to top
View user's profile Send private message Visit poster's website
Author Message
Kyuss



Joined: 13 May 2005
Posts: 37
Location: Southern Hellinois

PostPosted: Sat Jun 04, 2005 7:03 pm    Post subject: Reply with quote

Quote:
Two words... make clean. Razz


Wow, what a cool command, thanks. Smile Smile

As noted above, I am the noobest of coders.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Author Message
KaVir



Joined: 11 May 2005
Posts: 565
Location: Munich

PostPosted: Sat Jun 04, 2005 11:05 pm    Post subject: Re: Coding moments you'd like to forget Reply with quote

Kyuss wrote:
Anyway, my keyboard went out on me, in one friggin instant, one second to the next, one of my keys stuck. So instead of rm *.o, I, ended up typing rm *>o (or some such). Whole main diretory was gone.


Many years ago, I did pretty much the same thing - except I accidently added a space after the *; instead of "rm -f *.o" I ended up doing "rm -f * .o", and lost everything as a result (note to Eiz - this was before I understood makefiles, and my makefile didn't have a "clean" option).

Another stupid mistake was when I'd spent several hours writing a really nice bit of code, and decided that I'd better make a backup to make sure I didn't lose all my hard work. Unfortunately, being lazy, I typed "!tar" (thinking that I'd done a backup previously) - instead of making a backup, it therefore started unzipping the old version of the code over the top of the current version. In a moment of panic I hit CTRL-C and thought "Better back it up NOW before I lose any more", doing a "tar cvfz" - unfortunately one of the main files I'd been working on had only been half copied back back the tar xvfz, so instead of losing a few hours work I ended up losing days of work by wiping out the backup of the file as well.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Marquoz



Joined: 17 May 2005
Posts: 2
Location: New Orleans

PostPosted: Mon Jun 13, 2005 9:03 pm    Post subject: Reply with quote

One day I spent the entire day working on a file, never bothered to save it, and had a few thousand lines in it. Had been drinking a little bit and when I saved it didn't notice it say "No Disk Space". Thought it was saved, but it wouldn't close the editor, so I just Ctrl-X'd out to exit without saving.....

Oops. Learned a nice little lesson there.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Author Message
Valg



Joined: 13 May 2005
Posts: 4

PostPosted: Wed Jun 15, 2005 12:41 pm    Post subject: Reply with quote

1) I broke our game's "w" command for about 10 minutes. You could still type out "west", but "w" got aliased to an obscure skill ("wallop") given to the wielder of a certain class of exotic weapons.

2) I accidentally covered all non-water rooms in the room-affecting version of the Gel spell. (Which normally doesn't work on land. It turns surface water into swampy, adhesive morass, makes underwater combat like fighting in syrup, or can target things like Water Elementals, slimes, oozes, etc. as an offensive spell.) Boy did our players love trudging... slowly... through a world covered in that. I didn't have shell access at the time, and I guess the coder I was emailing with decided to put it in without a test boot. Razz Stupid missing "!".
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Author Message
malaprop



Joined: 16 Jul 2005
Posts: 6
Location: Chicago

PostPosted: Mon Jul 18, 2005 6:17 pm    Post subject: Reply with quote

Our mud has a very dynamic world, where players chop down trees and dig up mines for the resources for their buildings, all that kinda fun stuff. I was updating the code for trees and accidentally killed every tree in the game. There were around 2k outdoor rooms at the time, so there were at least that many trees. I had to clone a whole bunch of seeds, run around the mud planting them, and then crank up the growth ticks to ridiculous frequency to repopulate the game.

...and then about 12 hours later I did it again.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Lared



Joined: 07 Oct 2005
Posts: 26

PostPosted: Sat Oct 08, 2005 10:06 pm    Post subject: Reply with quote

The owner of my MUD (root access on the shell) decided he wanted to modify something.

He didn't know what malloc and free were, but he knew what /dev/mem was. Tried to write data directly to /dev/mem. Overwrote kernel memory. BOOM.
Back to top
View user's profile Send private message
Author Message
Yui Unifex
Site Admin


Joined: 11 May 2005
Posts: 47
Location: Florida

PostPosted: Sun Oct 09, 2005 1:46 pm    Post subject: Reply with quote

Lared wrote:
The owner of my MUD (root access on the shell) decided he wanted to modify something.

He didn't know what malloc and free were, but he knew what /dev/mem was. Tried to write data directly to /dev/mem. Overwrote kernel memory. BOOM.

Yikes. The mud shouldn't be running as root!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Author Message
Lared



Joined: 07 Oct 2005
Posts: 26

PostPosted: Sun Oct 09, 2005 1:51 pm    Post subject: Reply with quote

I'm well aware of this.

Unfortunately...I compiled as me. I honestly never looked to see where the MUD was running.

See my previous post. (The one I replied to got removed, heh.)

I quit that MUD shortly thereafter on grounds of immense stupidity. I'm a hack coder at best, but hey, I don't do things THAT dumb.

Often.

And when I do, it's running in VMware so it's revertable.
Back to top
View user's profile Send private message
Author Message
YmerejO42



Joined: 03 Jul 2006
Posts: 1

PostPosted: Mon Jul 03, 2006 5:19 am    Post subject: Reply with quote

Not MUD related, but it's still a funny (and painful) story... I was coding a database of some sort on my Commodore 64 (yeah, it was a while ago), my sister was reading all the code (numeric, if I remember right, but the Compute! compiler would turn it into assembly) to me out of a Compute! magazine and I was typing it in... I'd gotten into the habit of loading my working file, deleting it, then saving when I'd finished typing for that day... Lo and behold, we were about 10 lines from the end, and my power blinked for less than a second - more than enough to reset my C64. Since I didn't know then that you could recover deleted files, I assumed that all my work was lost and formatted the disk.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Author Message
Lindahl



Joined: 29 May 2005
Posts: 56

PostPosted: Tue Aug 15, 2006 9:06 pm    Post subject: Reply with quote

Been a while since I posted here, but this just happened recently and it's pretty funny. I work with embedded systems, so we often have to create and modify various embedded root file systems (RFS). Of course, this means I have to work as root on occassion, since the RFS won't operate unless some of the files are root. So I'm working as root on one of the RFS installations that's exported via NFS (network file system). Part of the RFS's root-level was copied into the RFS's /opt directory, which wasn't needed (obviously). One of the directories that was copied was /etc. So of course, I type, in the RFS directory "rm -rf etc" paying special attention I didn't type "rm -rf /etc" on accident (since I'm working as root). I exit from "su" (super-user, i.e. root) and then type ls. I get a permission error, so I type "su" to log back in as super-user to see what's going on, and I get the message "root user does not exist". I stared at the screen for several seconds and then my heart started pounding like crazy - I had just blown away /etc on our server. The RFS root-level directories weren't copied into /opt, they were symbolically linked. The nested level of the symbolic link ("../../../../../etc") just so happened to coincide with the nesting level from the working directory of the RFS installation to /etc on the server. Embarassed

Now I see why my supervisor refuses to take root ownership. Makes it way too easy to screw yourself over. It took several days to get the server off it's knees and restore stuff that wasn't backed up (anything not in /home - i.e. embedded file system distributions).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    mudlab.org Forum Index -> Coding All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group
BBTech Template by © 2003-04 MDesign