Slashdot Log In
What is the Best Bug-as-a-Feature?
Posted by
Cliff
on Fri Mar 30, 2007 12:53 PM
from the unexpected-benefits dept.
from the unexpected-benefits dept.
Bat Country wonders: "The workflow system, at the department I develop for, was hand-coded by my predecessor in a rather short amount of time, resulting in somewhat unreadable code with a number of interesting 'features.' When I took over maintenance of the code base, I started patching bugs and cleaning up the code in preparation for a new set of features. After I was done, I got a pile of complaints about features that had disappeared, which turned out to be caused by the bugs in the code. So, that leads me to ask: what is your favorite bug that you either can't live without or makes your life easier?"
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
The best (Score:5, Funny)
Re:The best (Score:5, Funny)
>Windows Genuine Advantage
No, that's a feature that acts like a bug. ;-)
Parent
Perl versus Python (Score:5, Interesting)
it's nuts. And the origin of the nutty ness is an obsessive desire not to have default behaviours. Whereas perl is all default behaviours. In the end perl does what you really meant, and python does what you told it.
in case you think I'm python bashing google what python evangelist david mertz says about python warts.
Parent
Re:Perl versus Python (Score:5, Funny)
Parent
Re:Perl versus Python (Score:5, Funny)
Parent
Re:Perl versus Python (Score:5, Funny)
Parent
Re:Perl versus Python (Score:5, Informative)
4 and 4.0 are equal by value but not in precision. 4 has one significant digit, while 4.0 has two. This is important because multiplying it by 1200 (which has two significant digits), yields two scientifically different answers. 4*1200 yields 5000 (5 x 10^3) while 4.0*1200 yields 4800 (4.8 x 10^3).
So, in the end, it depends, just like everything else.
IMarv
Parent
Re:Perl versus Python (Score:5, Insightful)
4.0 is definitely a 2 sig dig number, but 4 could be 1 sig dig or it could be "exact." You wouldn't say the 2 in 2*pi*r is only one significant digit, would you? Of course not, it would render any precision in pi or r meaningless.
Also, 1200 could have 2, 4, or be exact depending on the context. It's best to always use a notation that includes the fraction mark for non-exact quantities.
Parent
Re:Perl versus Python (Score:5, Insightful)
If that isn't a bug, I don't know what is.
Parent
Re:Perl versus Python (Score:5, Informative)
WTF?!? Which particular python version are you talking about?
Python2.4 and later:
>>> x0 = int(4)
>>> x1 = long(4)
>>> x2 = float(4)
>>> x3 = complex(4, 0)
>>> x0 == x1 and x0 == x2 and x0 == x3 and x1 == x2 and x1 == x3 and x2 == x3
True
>>>
Or, are you talking about inequalities (<, <=, > >=) which are required for list sorting?
In this case, it's not a python issue but a mathematical issue. You shouldn't be trying to use inequality operators on complex numers. Inequalities with scalars such as floats, ints, longs etc are a mapping (S1,S2)=>(Bool), where S1 and S2 each can be one of float, long, int, bool, string, but such mapping is not defined if S1 and/or S2 is the field 'complex'.
Your question is interesting though - a matter of whether a sort of a list of containing complex numbers should work if all the complex numbers have a zero imaginary part. I wouldn't think so. But if you're desperate, you could try something like:
x0 = int(4)
x1 = long(4)
x2 = float(4)
x3 = complex(4, 0)
list1 = [x0, x1, x2, x3]
list2 = [x3, x1, x2, x0]
def compare(x, y):
if isinstance(x, complex) and x.imag == 0:
x = x.real
if isinstance(y, complex) and y.imag == 0:
y = y.real
return cmp(x, y)
list1.sort(compare)
list2.sort(compare)
As for the 'problem' of list sort results depending on order of the original list, this only happens where there is computational equality between members of the original list, so what's the problem really?
Parent
404 (Score:5, Funny)
"404 File Not Found
The requested URL (askslashdot/07/03/30/0116246.shtml) was not found."
That little error saved me from having to read a bunch of replies.
Re:404 (Score:5, Funny)
Keyboard not found.
Press to continue.
Parent
Whenever I boot my windows machine (Score:5, Funny)
Re:Whenever I boot my windows machine (Score:5, Funny)
Parent
Windows? (Score:5, Funny)
rm (Score:5, Funny)
Re:rm (Score:5, Informative)
I have a script "lrm" which does this: ls the files, ask for confirmation, and then delete (if confirmed).
Parent
The money lender bug in Taipan (Score:5, Interesting)
The guy who wrote the Windows version actually allows you to turn it on! Overpay the money lender and your money grows at 10% a month! The bug was in the original Apple 2 version and then subsequent ports, like the one to Palm, removed it.
The Easy to Interpret Save Files in X-COM (Score:5, Interesting)
By ordering a bunch of equipment and saving your game just before it was due to arrive (call that save game A) then saving again immediately after it arrives (call that save game B), and then copying this file from save game A to save game B, you could get whatever equipment you had ordered to arrive again. And again, and again. And you could turn around and sell all the extra stuff for cash.
Lather, Rinse, Repeat. I used to start off a game by repeating this trick until I had maxed out my cash. I found the corresponding file that allowed you to improve your tech without actually performing the research, but that was less of an advantage, since the game used your tech-level to decide how difficult the scenarios it gave you should be.
Parent
buffer overflow (Score:5, Insightful)
Easy! (Score:5, Funny)
Personally, I like... (Score:5, Funny)
Error
Nothing for you to see here. Please move along.
Nothing beats a good dose of pot-kettle interaction.
Re:Personally, I like... Actually... (Score:5, Funny)
Parent
ModeX graphics? Buffer overflows? (Score:5, Insightful)
I've heard the 6502 (or, more specifically, RP2A03) had some useful undocumented opcodes. I think they weren't intentional, so they might count.
On the software side...how about exploitable buffer overflows on the Xbox and PSP to enable execution of arbitrary code?
Re:ModeX graphics? Buffer overflows? (Score:5, Informative)
The Rockwell 6502 was a hard-wired processor; there was no "illegal instruction" check. So, any bit-patter you loaded as an instruction would try to do something. Sometimes, because of the internal open-collector busses, you'd get neat "something OR something" that wouldn't normally happen.
Here's the I'm Feeling Lucky hit on it: 6502 Opcodes [s-direktnet.de].
Thing is, the results might vary from implementation to implementation. So they might not work usefully on the 6510, which was otherwise a 6502 with an I/O register at $0000-$0001.
Parent
Not a software bug but a design flaw (Score:5, Funny)
The Vauxhall Astra Mk.2 (Opel Kadett E) had a design flaw in the steering column. Specifically, the steering column was rather weaker than the steering lock.
The upshot of it was when some little scrote decided to try and steal my car (this was way before cars were fitted with immobilisers), when he tried to break the steering lock the steering column snapped and the steering wheel came straight off in his hand.
Linux (Score:5, Funny)
"Subscribe to view" pages visible to Googlebot. (Score:5, Interesting)
User agent switcher extension [chrispederick.com] + Browse pretending to be GoogleBot = Annoying "register/pay to see me!" pages go away. I have no idea how many sites it works on now, but I think it still gets into a lot of archived newspaper articles and suchlike.
Re:"Subscribe to view" pages visible to Googlebot. (Score:5, Interesting)
Of course, both are examples of why you shouldn't use "User-Agent" to try and detect what browser or bot is using your webpage. The first allows "illegitimate" users access, and the second blocks legitimate users.
In fact, you shouldn't trust headers for anything unless you have a secure session. To control access to your webpage to robots, use ROBOTS.TXT or a meta tag, and to control access to other users, password protect. But the trouble is that sites are trying to eat their cake (be crawled and indexed) and have it too (control access to ordinary users).
Parent
Skiing in Starsiege: Tribes (Score:5, Interesting)
A description of skiing is here [wikipedia.org].
My Karma isn't low enough... (Score:5, Funny)
Nameless Firefox Bookmarks (Score:5, Interesting)
In Firefox, when you make a new bookmark, you need to give it a name. FF grays-out the OK button until you do. This implies that bookmarks weren't meant to be nameless. Here's the "bug": if you go to rename the bookmark, you can make it blank and the OK button remains active.
So what good is a nameless bookmark? I place all of my frequently-visited bookmarks on the menu bar, to the right of the menus (it's normally wasted space). I have over 25 bookmarks marks there, and if they had names (even one-letter names), they wouldn't fit by a long-shot. The favicons are all I need, so this ability is pretty helpful, and isn't likely to be fixed.
Re:Nameless Firefox Bookmarks (Score:5, Informative)
https://addons.mozilla.org/en-US/firefox/addon/3 176
Parent
Second Life camera (Score:5, Informative)
VW close the sunroof bug (Score:5, Interesting)
(1) You needed the key to close the sunroof.
(2) But.. a sneak path in the headlight wiring meant you could instead just turn on the headlights and pull on the high-beam flasher (on the turn-signal lever). Enough electricity would flow backwards through the sneak path to operate the sunroof motor.
Re:VW close the sunroof bug (Score:5, Funny)
Parent
telnet -l "-froot" (Score:5, Interesting)
A related "bug" is the ability to boot Linux "fail safe" with the notation 'initrd=/bin/sh' on the boot line. As MVS would say, "Thou art God!"
One of my favorites, from console gaming... (Score:5, Funny)
-JDF
Quake2 strafe jumping (Score:5, Interesting)
I dunno (Score:5, Interesting)
That's about it. Most of my bugs just break shit.
Re:I dunno (Score:5, Interesting)
Years later I started learning about chaos theory and fractals, and something in my head clicked. I instantly had a vivid memory of that bugged screen and realized that it was a fractal. I had accidentally created a rather complex fractal. Blew my mind clean up.
Parent
Physics bugs in video games are the best (Score:5, Interesting)
When the developers saw the potential it gave the game, they left it in. They realized how it made the game unique and exciting, and this bug became the standard feature that sets Tribes far apart from almost all FPS games out there, even to this day. This bug resulted in probably the closest simulation to virtual athleticism that I have ever seen, which was responsible for the fanatical, but small fanbase the Tribes series had.
If You Can't Fix It, Feature It (Score:5, Funny)
Date library (Score:5, Interesting)
January -6th
meaning december 24th the previous year.
My colleague had to remove the input validation again and keep the features.
BMW MINI CD player as burglar alarm trigger (Score:5, Interesting)
Anyway, at roughly 2:00am every morning the car alarm would go off, much to the 'delight' of myself, my neighbours and everyone in the vicinity. I'd go out, stop the alarm and then try to sleep. After which it would go off again, every hour or so.As if we weren't losing enough sleep with our then new-born daughter.
The cause was eventually traced, and it's one of the more obscure bugs I've ever come across. Turns out that the car had a low-power rather than completely off mode, and the CD player retained a tiny amount of power going through it. When it was cold, say at 2:00am on an autumn morning for example, the CD player would detect that condensation was forming and would wake up the car's electrics to create some warmth to clear the condensation. This is deliberate, and quite clever I think.
However, the problem came in that it did this too often and started causing a big drop in battery reserves. The security system interpreted this as an attempt to start the car by hotwiring it, and so the alarm would be set off. I'd come out to switch it off, then go back to bed on the cold autumn night at which point condensation would form again, the CD player would switch itself on again, the security system would sound the alarm again and a bleary-eyed version of me would stagger out to turn the alarm off again. At which point condensation would start to form again and...
Bah.
Cheers,
Ian
Template Metaprogramming? (Score:5, Interesting)
Elevator bug (Score:5, Funny)
The only misfeature of this bug was that the bell would briefly ring alerting those waiting that they had been skipped. One time, some second floor residents heard us skip their floor and we heard them running down after us. We skipped the lobby and went back to the fourth floor. We could have kept it going all night if they tried chasing us, but they didn't. Anyone too lazy to walk to the lobby from the second floor sure isn't going to race up to the fourth floor.
Eventually, they upgraded the elevator and we had to stop for the second floor whenever they wanted.
Re:Not sure if this is a bug... but (Score:5, Informative)
Parent
Re:Not sure if this is a bug... but (Score:5, Informative)
That's not a bug, it's a feature. It's the reason why you don't have to reboot Unix machines after a software update, as you do for Windows.
Parent
Re:Yes (Score:5, Insightful)
Parent