Slashdot Mirror


What is the Best Bug-as-a-Feature?

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?"

35 of 861 comments (clear)

  1. The money lender bug in Taipan by Anonymous Coward · · Score: 5, Interesting
    Great game! Here.

    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.

  2. Not sure if this is a bug... but by SirStanley · · Score: 4, Interesting

    ncpmount on linux... at least in our configuration... allows us to overwrite files that have "locks" on them by users. It appears to be happy to ignore the locks. I'm guessing this is a bug... because I can't do it with the same user from Windows.

    This allows us to deploy our java Jar's to our Folders on our network where the users launch the app from.

    Yay.

    --
    --------========+++Dont Feed The Lab Techs+++========--------
  3. IE6 is packed with 'features' by Allicorn · · Score: 4, Interesting

    And although, ultimately, its a pain in the arse that they're there at all, when you get get down to the practical day-to-day business of writing/maintaining websites, some of those bugs turn out to be very handy in concocting freaky work-arounds for inconsistencies in the ways that browsers support (or don't support) the standards.

    I'll leave the provision of an exhausitive list to somebody else, but suffice to say if you're looking for a sizeable seam of bugs-which-simultaneously-screw-you-over-and-help- you-out, then there can hardly be a better place to look than Internet Explorer 6.

    --
    OMG!!! Ponies!!!
  4. "Subscribe to view" pages visible to Googlebot. by Behrooz · · Score: 5, Interesting

    "Subscribe to view" webpages that are still visible to users browsing as GoogleBot.
     
      User agent switcher extension + 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.

    --
    "We have to go forth and crush every world view that doesn't believe in tolerance and free speech." - David Brin
    1. Re:"Subscribe to view" pages visible to Googlebot. by apathy+maybe · · Score: 5, Interesting

      Personally I use the modify headers extension to do the same thing. But I have "I am not a Googlebot/2.1", rather then the full Googlebot string. But I sometimes come across pages that say something along the lines of "You appear to be pretending to be a major search engine when you are not", for those pages I change the header to "I DIDN'T CLAIM TO BE A MAJOR FUCKING SEARCH ENGINE".

      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).

      --
      I wank in the shower.
  5. Skiing in Starsiege: Tribes by Manatra · · Score: 5, Interesting

    For me, the physics bug that enabled "skiing" in Starsiege: Tribes was the best bug as a feature. It's a bug that became a key defining point of the series.

    A description of skiing is here.

  6. Perl versus Python by goombah99 · · Score: 5, Interesting

    Perl is perhaps one large bug that works so well that it's a great feature. For example in perl when you compare two things you get an answer that is stable no matter what the items are. In python you can't and even when you can the answer is not stable. The order of a sorted list can depend on it's orginal ordering! You cant compare floats to Complex numbers but you can compare strings to complex numbers. Sets are grouped by equality not identity so 4.0 and 4 are the same thing for a set. Which one stays and which one get added to the set depends on the ordering of the lists that were put in the set.
    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.

    --
    Some drink at the fountain of knowledge. Others just gargle.
    1. Re:Perl versus Python by Eicosane · · Score: 5, Interesting

      The broke broke piece of crap he is using is found here: http://en.wikipedia.org/wiki/Significant_figures

      The rule in his example is:

      4(1 sig fig) * 1200 (2 sig figs) = 5000 (1 sig fig & rounded up since 4800 is closer to 5000 than 4000)

      4.0(2 sig figs) * 1200 (2 sig figs) = 4800 (2 sig figs)

      As far as software using sig figs, well...if you are using real world measurements, you should be using sig figs. You can not tell from a general ruler if you are at 0.526876". You can tell that you are between 0.5" and 0.6", so you say 0.56" Past two sig figs, you would really be pulling that out of your bum. Therefore in all the calulations that use the 0.56", you can only have a max of two sig figs in the result. Anything more would rely on you knowing up to say 3+ sig figs in all the numbers used to get the result.

      Point: The number of sig figs you have makes a difference in your result. Sig figs are generally used with real world measurement systems. Computer calculations may not fall into this category, but it would depend.

    2. Re:Perl versus Python by zippthorne · · Score: 3, Interesting

      Um.. yeah. of course that's how it is. Measurement is always more precise and less costly than machining. If you've got a process that produces 4.00 cm parts, and you put more effort into measuring, you might be able to sift some 4.00000 parts from the mix. But those parts are much rarer than the 4.00s, and so command better pricing. (it also means that the remaining parts are definitely not 4.00000)

      If you need more 4.00000 parts, you could use tighter machining tolerances, but each part will be much more expensive. The choice of which method depends on a variety of factors, not the least of which is whether you can use the "rejects" as "low quality parts" or "scrap."

      --
      Can you be Even More Awesome?!
  7. Nameless Firefox Bookmarks by Headcase88 · · Score: 5, Interesting

    This barely qualifies as bug, more on an inconsistency, but...

    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.

    --
    "When the atomic bomb goes off there's devastation...but when the atomic bong goes off there's celebraaaaation!"
  8. VW close the sunroof bug by Ancient_Hacker · · Score: 5, Interesting

    There were two oversights in the older VW's electrical system:

    (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. ... ooops, that's more hardware than software. sorry.

  9. telnet -l "-froot" by mmell · · Score: 5, Interesting
    More than once, I've rescued SUN servers where somebody hosed up PAM (or even /etc/passwd /etc/shadow) by breaking in this way.

    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!"

  10. Quake2 strafe jumping by pak9rabid · · Score: 5, Interesting

    I'd have to go with strafe jumping in Quake2. What better way to get the 100 health pack in q2dm1 w/out having to sacrifice precious life w/a rocket jump. w00t!

  11. I dunno by Chris+Burke · · Score: 5, Interesting

    In high school I wrote a program for a physics project that showed electromagnetic wave propagation and interference. Nothing that special, the end result was basically a pretty screensaver with some relevence to physics. In light of that, one of the features I added was a pull-down menu for selecting what color you wanted to use. This was back in the VGA days with a 256 color pallette and manually poking the VGA frame buffer. Due to an off-by-one error in calculating the bounding box of the pull down menu, it was possible to select an invalid index for the color, so instead of selecting a row of the pallette with my nice color gradients set up, it was one of basically random colors. The result was really trippy, so when I discovered the bug, I decided to leave it in. At the open house where my program was running through a projector some bystander discovered the bug and thought it was indeed cool and trippy.

    That's about it. Most of my bugs just break shit. :)

    --

    The enemies of Democracy are
    1. Re:I dunno by soft_guy · · Score: 3, Interesting

      I hope someone mods this up because it is like the only post for the entire article that is actually relevant or interesting.

      --
      Avoid Missing Ball for High Score
    2. Re:I dunno by DedWisdom · · Score: 5, Interesting

      I had a similar experience when I was younger. I was learning C++ graphics programing on windows (95), and I was trying to simply make a static screen that showed a monochrome random gradient. Well I had some bug in my algorithm, and the screen went crazy, showing this massive arch with these beautiful repeating patterns within the arc, but random static outside of the arc. Okay, weird, changed some +s and some -s, and got it working, fine.

      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.

  12. Physics bugs in video games are the best by mattgreen · · Score: 4, Interesting

    I used to play too much Starsiege: Tribes about five or six years ago. It is a multiplayer first person shooter with enormous maps. When it first came out, everyone walked around, or hitched a ride on a vehicle. The game was fun, but it was a bit slow for my tastes (I grew up on NetQuake). Somebody discovered a physics bug that allowed players to move very fast over terrain by rapidly tapping the jump button as players slid down a hill. This process was scripted, and the overall dynamics of the game (terrible pun) changed dramatically. The game went from being fairly slow to being one of the most intense games I've ever played. Different hills would give different amounts of speed, and the process of 'skiing' itself required that you constantly look for ways to maintain your speed while fighting off other players.

    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.

  13. Date library by isj · · Score: 5, Interesting

    Not me, but one of my colleagues took over maintenance of a system which included a date library. The dates and times were treated as floating-point, leading to much conversion and adjustinging. Eg. 12:30 was 12.30, so when adding 40 minutes getting 12.70, and then adjusting that to 13.10, No input validation was done. My colleague tried cleaning that up, but then got complaints from the users. They had discovered the "features" and were now using eg:
        January -6th
    meaning december 24th the previous year.

    My colleague had to remove the input validation again and keep the features.

  14. The Easy to Interpret Save Files in X-COM by Zenaku · · Score: 4, Interesting

    In the olden days (DOS) version of X-Com: UFO Defense, a save game consisted of a whole bunch of individual files in a directory tree. After some tinkering around, I realized that one particular file stored nothing except a list of what equipment you had "on order" and after how much more game time it was going to arrive.

    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.

    --
    If fate makes you a motorcycle, you become a motorcycle.
  15. BMW MINI CD player as burglar alarm trigger by mccalli · · Score: 5, Interesting

    This was a fun one. I had one of the first MINI Coopers, and ordered it with the CD player ('Wave' option? Seem to remember that name). I forget exactly when I took possession of the car, but I think it was around September or October. Something like that.

    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

  16. Template Metaprogramming? by sconeu · · Score: 4, Interesting

    I'd argue that C++ Template Metaprogramming as a fully Turing-complete functional programming language was probably an unintended result of the definition of templates.

    --
    General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
  17. Re:QW strafejumping by Vireo · · Score: 3, Interesting

    Game are full of such feature-bugs. The strafejumping bug was finally added as a feature in subsequent versions of Quake, but other "bugs" (or limitations) in the physics model of Quake (and presumably other games) are used by skilled players.

    For example, in Quake 3, the sampling of the position of the player in 3 dimensions is tied to the frame rate. When the player jumps, in the physics model, the player appears in successive, discrete position along a pre-computed parabolic trajectory. Only at key frame rates, a position sample appears at the peak of the parabola. Players running at these key frame rates are thus able to jump higher. Some custom maps feature areas that are accessible only to players knowing this trick.

    There is also a Quake 3 mod (Defrag) which was created to facilitate finding map bugs (e.g. rebounds, which happen when you can fall with absolutely no x or y speed component on some surfaces, happens when the z velocity gets reversed). This leads to impressive "trick jumps" which do not violate the rules of the game (since they are done without modifying the game engine). A quick look in Google and you can find many trick-jumping videos based both on synchronisation and on physics model bugs.

  18. Re:One of my favorites, from console gaming... by Anonymous Coward · · Score: 3, Interesting

    Ultima II had a similarly documented "feature."

    It was coded in assembly language and the monsters were kept in a pair of parallel tables. Whenever you swung at a monster, it did a loop similar to:

                        LDX #$1F
    CHECK1: LDA MONX,X
                        CMP HITX
                        BNE NEXT1
                        LDA MONY,X
                        CMP HITY
                        BEQ HIT
    NEXT1: DEX
                        BNE CHECK1 ;Should be BMI
    MISS: ...

    As noted in the comment, the (B)ranch (N)ot (E)qual should be a (B)ranch if (MI)nus. The upshot being that you could never hit the 0th monster on a map. Rather than find/fix the bug, they just mentioned that you will occasionally encounter monsters who are simply invincible.

  19. Re:GPOW by StarvingSE · · Score: 3, Interesting

    He's not that old school.

    How about that great bug in many 8-bit ninendo games where you could "scroll" and enemy off the screen instead of killing it. I think SMB had this bug, bug-turned-feature, but many other games had it as well.

    --
    I got nothin'
  20. Re:QW strafejumping by Ant+P. · · Score: 3, Interesting

    The wallrunning bug on Doom is better IMO. Especially when you can do it from one end of the map to another (pretty common on most doom2 DM maps).

  21. Open Office Find&Replace to reformat Cells by Rashkae · · Score: 3, Interesting

    If you do a regex search and replace in Open office and replace all contents of cells with themselves (search for .*, replace with &, or something like that) the contents of the cells will be reformated to whatever default you set for the columns. You can use it to change a column of numbers into a text field (to sort alphanumerically) or vice versa,, (if you have a spreadsheet that imported numbers as text and and you want to change them back into numbers)

    This trick is even included in the help documentation.

  22. My favorite bug by SilentStrike · · Score: 4, Interesting

    I was writing code in lisp to remove duplicates from an unordered list.

    How do you do it? Well, here is one reasonable way.

    Sort the items in the list.
    Duplicate items will be adjacent, so scan through the list and add items when they aren't equal to the last item.

    Since it was lisp, I naturally started writing a recursive quicksort.

    My code looked something like.

    quicksort (list)
        if list has size less than 2, return list
        Pick pivot from list
        L = filter items in list < pivot
        G = filter items in list > pivot
        return quicksort(L) + pivot + quicksort(R)

    However, my quicksort had a bug in it.

    Look closely.

    It didn't append copies of pivot to the returned sorted list. Thus, it removed them. Since every item eventually ends up as the pivot, all duplicates are removed. It's the only bug that has ever ended up saving me time.

  23. VW turn the fans on while the car isn't on bug by Vr6dub · · Score: 3, Interesting
    I have a 97 gti...try this...I may not have it quite right though.

    With the key in or out of the ignition (don't turn it to ACC or ON) hit the AC button and turn your fans to full. Then pull your highbeams. Your fans will suddenly turn on. Found it on a forum years ago...was pretty funny the first time I tried it.

  24. Re:Not sure if youd call it a bug but... by BobPaul · · Score: 4, Interesting

    I do ctrl+alt+del and kill explorer.exe. Then I use File: Run in task man and do "runas /user:administrator explorer.exe". This restores the desktop as the admin user. When I'm done, I do another ctrl+alt+del, either kill explorer or choose "Log Off Administrator" from the start menu, and then run "explorer" from the run dialog again to restore the old session.

    This is faster than logging off and back on, leaves the users programs open, but gives you the full admin desktop, not just a shell or explorer window.

    It's too bad gksudo doesn't work on Windows...

  25. Re:QW strafejumping by mobby_6kl · · Score: 3, Interesting

    UT ('99, the first and only true version) kicked ass in this department. Most (that I'm aware of) have to do with launching players (or objects) and are especially fun in team games, like CTF and Assault.

    A player could be launched all the way across an outdoor map by a teammate with a fully loaded rocket launcher shot to the legs or ground immediately next to the player. Combined with some sloping surfaces, such launches could be easily performed while being very accurate. On AS-Mason such rocket launch could get a player all the way over all defenses and just an elevator ride to the final goal. That is, unless the other team is aware of the launch and has people waiting there.

    It's also possible to launch players with the impact hammer, but from experience it's a little harder to perform with people who aren't familiar with the technique. While looking for some illustrations, I noticed that the wikipedia has a few paragraphs about launching, so I won't go into more details here.

    What the wikipedia article doesn't seem to mention is that it's also possible to launch your translocator pretty far with the impact hammer, for example from the top of one of the towers on CTF-Face to one of the balconies on the opposite one. Another one, which I never actually mastered, was book launch/jump. It involves standing on a book object, like those lying around on the floor in libraries, and then either hitting it with the hammer, or having someone else shoot it (I think). This, of course, also resulted in a huge jump, and is probably more of a bug than the other methods.

    Most of these methods seem to be just exaggerations of standard physics, since both the impact hammer and rocket launcher are supposed to throw stuff around. At first, I found these tricks frustrating, but IMO they add a lot to the game. Especially Assault, which otherwise becomes a spam-fest with everyone camping the choke points like it's some kind of counterstrike. Epic probably recognized this, so they never changed this in UT99, but all of this is sadly gone in UT03/04.

  26. Re:rm by kalirion · · Score: 3, Interesting

    touch "*"

    ... now the waiting game

  27. Triple Faulting the 80286 processor by Linker3000 · · Score: 4, Interesting

    Hows about triple faulting the 80286 processor to drop out of protected mode?

    --
    AT&ROFLMAO
  28. VT100 superfast-repeat, combined with keyclick by Sloppy · · Score: 3, Interesting

    On a real VT100 (no emulators, please) send an ESC [137q

    In other words, even though your keyboard only has 4 LEDs, pretend you wanted to turn on the 137th one. Don't ask, just do it.

    Now your keyboard will repeat at an insane rate. Go into Setup B, and turn on keyclick (which might be kind of hard given how crazy your keyboard is acting; maybe you should do that before you send the weirdo escape sequence).

    Now hold down a key. Listen. Hold down a different key. Listen. Hey, it sounds a little different.

    Now play music.

    --
    As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
  29. Re:The best by arth1 · · Score: 4, Interesting

    To be on topic here, one of the bugs I really have taken advantage of is the bug that allows Windows networking to have a default gateway outside its own subnet, and with no route to it either.
    This has made it very convenient when running Windows under an emulator and yet be able to talk over TCP/IP to the host OS. VMWare and other advanced emulators solve this problem by setting up extra local networks and patching directly into the networking stack, but with Windows that's not strictly necessary, as you can bounce packets of a gateway that the emulated OS really shouldn't be able to reach.

  30. Re:The best by Bat+Country · · Score: 3, Interesting

    Please remember that "working to the satisfaction of your users" and "working properly in a way which doesn't cost the company money" are not always in perfect harmony.

    In this particular instance, the features were related to ad-reps exploiting holes in the original deadlines and scheduling code and as a result short-changing the company and giving clients hundreds of dollars in free advertising (without realizing it) because circumventing the deadlines helped them meet quota.

    When the complaints started rolling in, I immediately brought the matter to the attention of my superiors (the ad managers) and the discovery that people had been relying on certain border effects (not directly related to the exploits, but related to other scheduling malfunctions) resulted in a change of policies.

    This made both the ad-reps and the management happy, and at the end of the day, that's not a bad position to be in.

    --
    The land shall stone them with the bread of his son.