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?"
Windows Genuine Advantage
My favorite:
"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.
it pops up all sorts of porn pages I never even asked for!
Monstar L
Comment removed based on user account deletion
Microsoft keeps trying to clean up their code, and as a result, sometimes, features that SPAMmers etc. are relying on stop working.
Give a hand, not a hand-out.
rm * .old
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.
I remember getting Godly Plate of the Whale in Diablo at the sacrifice of a single potion with the duping bug. I can't think of anything better than that.
buffer overflows are great - they allow you to get root on all sorts of devices that some bastard tried to lock you out of.
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+++========--------
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.
- you-out, then there can hardly be a better place to look than Internet Explorer 6.
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
OMG!!! Ponies!!!
Easily the best bug ever. Its been paramount in enabling continous "innovation" as people speed jump through maps.
They screwed up alot of our web-based financial software. If i set the number of items purchased to zero, the whole thing reboots and i get to go home for th
---------
No matter how thin you slice it, its still baloney.
Error
Nothing for you to see here. Please move along.
Nothing beats a good dose of pot-kettle interaction.
This flies in the face of science.
The famous undocmented 320x240 VGA video mode, pre-VESA, and other tweaked VGA modes.
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?
Ping of Death (http://insecure.org/sploits/ping-o-death.html) entertained me quite a while :)
thomasdamgaard.dk.
Not a software bug but a design flaw in a car I used to own.
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.
It was supposed to be a unix clone, but actually came out useful in the end.
I don't need no instructions to know how to rock!!!!
"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
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.
Sendmail
This sig used to be really funny...
PC LOAD LETTER? What the f*ck does that mean?
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.
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!"
In Second Life, if you zoom your camera up to a wall, you will normally just zoom in to see closer detail of the wall. But once up against the wall, swing the camera around to the side, and you can "back your way in" through the wall. Release and click again, and the camera is now "mounted" inside the house. Its so much fun to watch people inside their homes, especially when your avatar is prevented from entering the property. Some even pay for a little orb that still tells them that no one is detected within 30m. Its fun because the clicks still work, too, like right clicking on someone and IM'ing them.. to tell them that you liked their last outfit more than this one, or the couch looked better in the other corner.. really freaks them out. That is definitely a "bug" (or feature) I couldn't live without... not in SL at least.
Intelligent Life on Earth
My favorite bug -> feature was the doing a jumping kick to the back back side of enemies. This was not intended but has become mainstay in fighting tactics in the SF series ever since
There were two oversights in the older VW's electrical system:
... ooops, that's more hardware than software. sorry.
(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.
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!"
Without that mail forward bug, I'd never have been able to get root when I wanted it.
-JDF
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!
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
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.
most of those web-based rich text editors you see use the same core functionality that's built into the browser. it's sometimes called "design mode" because to initialized it you have to set the designMode property of an iframe element to "on".
there's a set of commands that you can execute on the iframe after you've set this property. one of them is "indent". when handled properly, this should create a new div element with some kind of margin or padding on the left. well in IE executing that command actually creates a blockquote element.
completely wrong, right? yes, but convenient. in our CMS we need to be able to create a blockquote, and have no use for indentation, and i cant find any other way to do it in IE. fortunately, in better browsers blockquote is handled with the command "formatblock: blockquote".
http://en.wikipedia.org/wiki/Winnuke
This was the handiest thing for getting rid of idiots on chat.
Runner-up: ALT-F4 to close a window. Also handy for getting rid of idiots on chat:
Idiot: Hey, my computer is broken, how do I fix it?
Me: Well, first, hit ALT-F4
*** User 'Idiot' has left the room. ***
Moderator hint: a comment is neither "Flamebait" nor "Troll" if it is true.
In one of the older versions(after they dropped the codename raptor and went live) of oracle's sqlDeveloper, after your session with the DB had timed out you could just execute a query a couple times to renew your session rather than logging out and logging back in. I know its a considerable security flaw but it was damn handy.
I'm unclear how Windows qualifies as a feature.
Avoid Missing Ball for High Score
A couple of friends of mine in high school CS wrote a Tetris clone for class, but they had a bug where occasionally, blocks would spontaneously appear or disappear. They couldn't figure out how to fix it, so they claimed (in the docs, not to the teacher) that they had AI adjusting the difficulty to match the players' skills.
Media that can be recorded and distributed can be recorded and distributed.
-kfg
Minor quibble, PC means Paper Cartridge in that context, not user.
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.
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.
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.
You should've just claimed it was a bug in /. that turned out to be an interesting feature of some sort. Problem solved!
If we can hit that bull's-eye, the rest of the dominoes will fall like a house of cards... Checkmate.
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.
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
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.
His post was funny, yours sounds more like a troll... and if you love Windows so much why don't you marry it
There are two bugs here that I know of, one which is a problem all the time, and one that can be used to solve that problem.
The one that is a problem is that if you are listening to a track when you power it off, then remove that track, it will lock up the next time you power up, because it can't find the track you were listening to before.
The other one is that if the key-lock switch is on when you push power to turn it on, it will start to boot up, and get most of the way there before checking the state of the key-lock switch.
However, you can use the second bug as a workaround for the first, because, when it discovers that the key lock switch is set, it will turn around and save its state to the flash. The only thing is, it hadn't loaded its state from the flash yet, so it ends up saving back a clean state.
www.wavefront-av.com
While it made the game, more or less, a one race game, it added a huge element to the end game, which is where War2 multiplayer shined for some time. It brought the need to micromanage to the board, which, while always a factor, was not essential to victory.
So in essence, it brought heavy macromanagement and micromanagement together.
Invexi - a Phoenix, AZ based web design and web development company.
It really is more of an amorphous blog of bugs & features. It's a bug, comprised of features that are buggy features and feature bugs. This is one of those things where if you think about it too hard, the Mac / Linux ambulance will have to try to reassmble the fragments of your exploded head.
Guess he didn't get the memo...
though Windows does this with flying (Blue) colors, I would nominate DRM. it screwed music and spurred development of P2P
- Minutus cantorum, minutus balorum, minutus carborata descendum pantorum.
My college dorm elevator had bug/feature. If you briefly pulled and then reset the "emergency stop" button as the elevator was stopping at a floor it would skip that floor. I lived on the third floor and we routinely skipped folks on the second floor waiting for the elevator. This was a great time saving feature (except, of course, when the fourth floor residents would skip the third floor).
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.
-- Don't Tase me, bro!
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.
I have to use Outlook at work, and in previous editions (OL97,OL98, OL2000) you did not have this "favorites" box at the top of the Folder List. However, with OL2003 you do, and Microsoft provides no way to turn it off, except through a bug in Outlook. By turning off a lot of the crap, and then switching to calendar and back using the buttons at the bottom of the Folder List, you can get the Favorites to disappear. With the number of folders I maintain in Outlook it makes this bug one killer feature to get rid of a very annoying part of Outlook 2003. Now if I could only figure out the same bug-feature for keeping Outlook 2003 from enabling the Reading Pane and Preview windows for newly created folders (or when upgrading).
P.S. BTW - before you all start complaining about Outlook, if you do configure Outlook properly it is just as secure as anything else. In all the years I've used Outlook (since December 1997), I have only had 2 virii run in it - and I did those myself purposely. The trick - turn off any kind of Autopreview functionality (e.g. Reading Pane, Preview, Autopreview, etc.), and set Outlook to use the Restricted Internet Zone - those two will prevent most things from being functional or running automatically.
Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
aMSN has a cool bug that pops a window open on your end as soon as someone clicks on your name on their end
it's fun to pre-empt conversations with girls:
me: hey how's it goin?
her: OMG I was just thinking about you
me: ya right
her: I'm serious!
me: *gush* (L)
*whooooooosh!!!!*
Super Metroid has all kinds of fun bugs that enhance replayability. I'll list just a couple:
:)
Mockball: If you start running, then do a spinning jump/somersault, and morph into ball form just as you're landing, you can roll around at running speeds. The main benefit of this little maneuver is to get super missiles early, allowing you to skip the Spore Spawn miniboss.
Damage avoidance: If you shoot an enemy just as it is about to hit you it won't damage you...until the flashing animation stops, at any rate.
Murderbeam: Normally the game doesn't allow you to equip all beams at once (IIRC Plasma and Spazer conflict with each other). However, if you time some button presses in the status menu correctly you can glitch the game into enabling all the beams. Normally, the game will freeze immediately when you try firing this beam, but there are at least two or three places you can use it to your advantage.
1) If used at the right time during the battle with Motherbrain, you can make the battle go much more quickly (and create some interesting graphical glitches, too!).
2a) If you open a door and then fire the murderbeam into the door and then manage to jump through the door before the game crashes on you, chances are you'll find yourself in a completely different room than you intended. More importantly, all game events seem to be reset including items. Using this trick, you can collect over 100% of the items in game.
2b) I haven't seen/done this myself, but I hear if you use the murderbeam reset glitch in the right spot, you can flat out skip Ridley and Motherbrain by somehow triggering the final escape sequence early. Apparently this one only works on emulators, but I need to research it more. For the record, 2a tends to be more successful on the console although I hear there is one location that works in ZSNES.
Anyone who enjoyed Super Metroid back in the day should check out some of the Metroid fansites. There are several more tricks and glitches that allow you to complete the game in just about any order you like. It all comes together to pretty much seal the game's position as my all-time favorite. But no one cares what I think.
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.
Don't start modifing code until you understrand how the users use the product.
It is only refactoring if the users sees no change, with the sole exception of performance gains.
The Kruger Dunning explains most post on
Back in '94 or '95, I was working the night shift in the QC dept of a small local machine shop. We had a manually-operated, computer-controlled measuring machine. (Aside: The software ran on OS/2, which I loved.) When "writing" an inspection program, the machine would ask you to measure a part feature, then input the ideal location, ideal size and tolerance data. The program would pop-up a dialog box with the measured data and spaces for the ideal data. There was a button to bring up a second window to enter this ideal data. Version 1 of the program allowed us to enter the data directly in the 1st dialog box, so I never understood the need for a second box to do the same thing. After about 6 months, version 2 came out. The first time I tried my normal routine of entering in the main dialog, I found that the text boxes were disabled. I called the company to report this bug, and they told me the bug was in Version 1 - it should never have allowed me to input ideal dimensions into the main window. I asked nicely if they would consider putting it back, as I now had to move my hands to the mouse and click around a few times instead of just tabbing and typing. Happily, version 2.1 included the "bug" again. This has to be the only time I ever asked for a bug to be included.
The bacteria in my digestive tract are bugs I would definitely miss.
http://alternatives.rzero.com/
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.
N00B: How do I get feature X to work in this chat room?
Clued in 1: Try +++ATH
N00B: Than......(N00B has left the chat)
-Charlie
"Click here to be removed from our mailing list" Can't figure out why I still get emails from you...
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...
Don't know if its still there, but the Coruscating Mines in DAOC (Dark Age of Camelot) used to have an invisible 'crack' in the geometry model at one particular point. You had to run the gauntlet to get to this lowest level of the mines, and getting back up after a long session always seemed like a huge hassle. So the solution was the 'crack'; there was generally a line up of people jumping and hopping, trying to drop through the crack of the DAOC world.
The DAOC system would recognise when someone left the propoer geometry, would think it an error situation, and had a recovery mode which would return people to their last bind site. In other words, it was a nice quick exit from the mines (without having to die).
It was a bug exploit that everyone seemed to think was perfectly OK, perhaps because no one was a loser and everyone gained.
As a programmer, and a former student in at least one other math-related discipline, it's clear to me that 4 and 4.0 are equal. But they are not equivalent. Knowing 'Accuracy', 'Precision' and 'Proper Use Of Units' like the back of your hand will help you in any career.
[Ego]out
As a software developer, I am amused by you all. "4" is quite obviously a string, and can not be compared with 4.0 without a set of business rules.
:)
Multiplying it in silly ways will not help you either.
Lies about crimes
I always enjoyed cars with "child-safe rear windows" which don't roll all the way down. In many cases, this is because the rear wheel well cuts into the door, reducing the space available for the window.
My favorite bug-as-a-feature occurred in the original Mario bros. game for the NES. I suppose it wasn't so much a feature as simply a bug in the game Since it was only availible at one point in the game. Somewhere, I thing in the third world, as you were climbing the end pyramid you could jump on a descending koopa and, provided you did it just right, Mario would keep bouncing off the koopa shell as it would ricochet back and forth off the step. Soon, you would begin receiving credit for your continued bouncing in the form of extra lives. After a time your number of lives would climb so high that the game began representing them as various other graphical elements from the game; bricks, pipes etc. Unfortunately, if you left it too long (20 mins. +) the game would simply kill Mario. I suspect that the console simply ran out of memory to hold your fantastic number of lives and this was a safeguard to prevent the console from locking up.
The only time I've ever been able to exploit this was on the original NES. Even the Super Mario all-stars SNES version will not reproduce this.
As a much younger individual, this nearly unlimited lives 'feature' was the only way I could beat Bowser and it led to some interesting conversations with my school friends at the time.
Me: So I beat Bowser last night!
Friend: Cool! How many lives were you down to?
Me: Uhhh, pipe?
Friend: Riiiiiiiiiiiiiiiight.
Hows about triple faulting the 80286 processor to drop out of protected mode?
AT&ROFLMAO
Put your BIOS into USB legacy mode first. Then it'll work.
Your assumption seems interesting to me. In a production environment end users are using an application that obviously is useful. In your attempt to "clean up unreadable code", it no longer works. What you did instead was make the code perhaps more readable, but you changed the functionality. Perhaps more pejoratively, you broke what was previously working. Instead of looking at your self to see what you broke, your assumption is that it all worked by accident.
Before committing any changes to a production system, I would expect that a developer would test the functionality before making change and compare the results after changes were made. This would have uncovered that you changed functionality. Another tact would have been to create unit tests before making your changes, and then run those test as you were making changes. You have have discovered that you changed functionality. Instead, you did neither, and you broke a feature.
I'm a little long in the tooth, working 18 years as a programmer. I've seen this situation many times. Every young new hire thinks that they are smarter than the people hired before them and that all of the existing code is crap. It all needs to be rewritten because the previous coders were bad programmers and if it were redone, it would be cleaner. So they rewrite existing code and they break things. I can only assume that you work for a PHB.
Any manager worth their salt would initially halt a rewrite of WORKING code. If you want to modify something that is working and has been working and has had the bugs worked out, you will really need to prove that there are benefits to doing so. And as a manager of a development group, anytime someone who is still wet behind the ears wants to rewrite code, I tell them to step back and look at the code again. Is the code really crap or is it that you just don't understand what it is doing? Perhaps having an older coder walk through some of the code, maybe explain why the code was written a certain way, might shed some light on how it is really functioning. The fact that in your case you changed functionality, it shows that you didn't understand what was going on in the first place.
"Microsoft has made computing accessible to a population who would otherwise not be able to use computers" - B. Kernigha
another example:
create identical sets in different orders.
x = set((1,2,4.0+0.0j, 4))
y = set(( 1,3,4, 4.0+0.0j))
a = y | x
b = x | y
a == b
# result is TRUE
yx = list(a)
xy = list(b)
xy == yx
# result is TRUE
sorted(xy) # not an error
sorted(yx) # is an error
The funny thing is that you are not even guarnteed which of those will work and which will be an error. This is because the storage order of the set is not stable so it can change the order of the underlying lists.
oddly enough for some reason the lists come out of the set the same order they went in. This is appropos the topic of this discussion of a non-guarentteed feature that I am relying on.
Some drink at the fountain of knowledge. Others just gargle.
Standard practice for truck drivers. Banging through 9 or 10 gears and having to double clutch when shifting is hard on the left knee after a while, so drivers just shift without the clutch by syncing the RPMs up manually, allowing the transmission to slide in and out of gear with just fingertip pressure. Anybody that doesn't/can't do this is pretty much considered a n00b.
F29 Retaliator on the Amiga.... A flight sim of sorts, where if you ejected from the plane then you could still control the plane. So fly north, eject, and you could then see the plane being flown in the background as the camera watched your dude parachute to the ground. Of course, the fun thing to do was to turn the plane around and try to fly it into yourself!
Car analogies break down.
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.
While I take your point, I just drove back from a chicken plant today and I dealt there with a number of people much older and more experienced than me and making a hell of a lot more money, and I seriously doubt that any of them would have had their careers enhanced by knowing more about those things you mention. In the few instances where those things become important they just hire people like me to sort it all out, and even that doesn't happen very often. (Of course these same people have a "seat of the pants" knowledge of their industry that would blow away most engineers trying to learn what they do from scratch, but they can't quantify or justify a lot of their knowledge in the sense that a scientist or engineer can.)
Brackets contain world's first nanosig, highly magnified:[.]
Well we can cook the books for 4 to be whatever gives you the best tax break. You want 4 to equal 5? Sure no problem.
Engineering is the art of compromise.
In 1977 or so, the "cc" compiler on official Bell Labs Unix for the PDP-11 would automatically detect an infinite loop in your program by actually going into an infinite loop itself while compiling! Quite the feature. It turned out to be due to a simple optimization it was attempting to do: Any branch (conditional or unconditional) to an unconditional branch instruction would have its target changed to the target of the later; repeat until the branch no longer targeted an unconditional branch. So, any chain of branches that cycled back on itself would cause the optimizer to eventually reduce the first one to "here: goto here" and subsequently loop forever, chasing its own tail.
I probably do use such a list, but only rarely; I can't think of the last time I have (well, apart from writing Lisp code, where the code itself is such a list). And yes, my job is writing and using an object-oriented database with Python. Is what I do. Where you get nonhomogeneous objects is in the values of the {key:value} dict of attributes attached to each object in the database, not the database object keys (which would be silly). No it's not silly. it's not at all uncommon to want to sort a list on values. Moreover, sometimes the point is to reconcile lists of things gathered from multiple databases or tables that do have different key types. I guess we work in different arenas. I assume in your work you are used to dealing with your own curated data bases. In the Bioscience arena one is always interacting with multiple databases from all of the world trying to gather records in whatever form they come in and reconcile differences and similarities in the storage formats for the same entity.
I suppose if I ever needed to do this, I'd take the extra 0.1 second to type ", key=id". They're guaranteed to be unique, unlike the result of a stable sort (which you seem to call "unstable"). This would fail. the ID of two identical instances of an object are not identical. It's not guaranteed in python that two identical immutables will _always_ share the same ID. (python tries to do so when it can). Moreover in computer science one generally wants comparisons to be fast because comparing a million objects against a million objects always takes more than "0.1" seconds. That dimissall is uncalled for.
You keep using that word. I do not think it means what you think it means. I'm afraid I do. But I'll give you that the word is being tossed about colloquially here, though I think its meaning is clear in context.
All these examples presuppose you have an object database which has as a primary key a value which is sometimes a Unicode string, sometimes a number, sometimes an octet array
Some drink at the fountain of knowledge. Others just gargle.