views:

163

answers:

3

Have you ever created code that didn't do what it was meant to do but ended up doing something cooler? A bug that (actually) was a feature or created something new by accident?

For example when I was first learning to program. I started playing with demo graphics code from hornet.org in assembler and c. I was trying to change some code to do what I wanted. I accidentally ended up with a moving plaid and a rotating palette that turned out to be a pretty neat looking effect.

Anybody else have something like this happen while coding?

+1  A: 

On high school, i was trying to make a degradé from white to yellow on a square in C and running it in ms-dos, writing directly the pixels to the screen.

I accidentally made what looked like a beer glass, with a very cool efect of white and yellow foam on top.

Never understood why it was doing that, but indeed it was cool.

For my classmates at the time i just replied "Ofc it was just this that i wanted to do. it's perfect!"

fmsf
I just got the confirmation when editing saying "i'm a human being" lol great
fmsf
+3  A: 

I've had plenty of happy accidents with C. "Oooh.. incrementing a pointer does THAT? SWEET!"

In my professional life, I once accidentally wrote some code that cleared a complete database. That was a good mistake beacuse it taught me to never, EVER do that again. Some happy mistakes aren't happy at the time.

Alex Fort
A: 

I was tinkering with rolling my own "waiting" graphic of just 5 or 6 dots that pulsed with one getting big then shrinking when the next one got big. The gamer in me thought "hey this reminds me of Pacman" so I tweaked it so it looked like Pacman. I probably spent a couple hours tweaking my Pacman graphic.

I never ended up using any of it. I should see if I can find it...

Austin Salonen