What is the Best Bug-as-a-Feature? 861
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?"
Re:The best (Score:1, Insightful)
buffer overflow (Score:5, Insightful)
QW strafejumping (Score:3, Insightful)
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?
That's simple... (Score:2, Insightful)
Re:Personally, I like... Actually... (Score:2, Insightful)
WarCraft II Bloodlust (Score:3, Insightful)
So in essence, it brought heavy macromanagement and micromanagement together.
Re:Yes (Score:5, Insightful)
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.
Re:Skiing in Starsiege: Tribes (Score:3, Insightful)
Re:Perl versus Python (Score:5, Insightful)
If that isn't a bug, I don't know what is.
Re:Perl versus Python (Score:3, Insightful)
Therefore: 4.0 is definitely not equal to 4.
It's all in the interpretation of the representation.
Re:Perl versus Python (Score:1, Insightful)
If you assume 4 is an exact number and 4.0 is an inexact number, then 4 and 4.0 are mathematically inequal.
The problem has nothing to do with integers and real numbers, or the internal binary representation of integers and floats. The problem is that there is no universally accepted map from the ascii representation "4.0" to an object.
Re:Perl versus Python (Score:2, Insightful)
Lesson here is: (Score:5, Insightful)
It is only refactoring if the users sees no change, with the sole exception of performance gains.
Re:The Easy to Interpret Save Files in X-COM (Score:3, Insightful)
echo You win!
Intestinal flora (Score:5, Insightful)
Re:Perl versus Python (Score:5, Insightful)
Quite often calculations are performed where the various values are known to have a certain amount of uncertainty. If I take a reading of "4", what is really meant is that the value is between 3 and 5. If I specify "4.0", then the value is between 3.9 and 4.1. The amount of precision is given by the number of significant figures. Thus, a value of 4.0000 implies a fairly high degree of certainty.
Given that "4" has only a single significant figure, multiplying it by an exact 1200 yields 4800. However, if you round that off to a single significant figure, then the result is 5000.
As has been discussed already, however, the "4" may be exact, in which case you need to know the uncertainty in the "1200" before the uncertainty in the result of the calculation can be determined.
Re:Perl versus Python (Score:4, Insightful)
Ah, Units (Score:5, Insightful)
Re:rm (Score:5, Insightful)
Re:Perl versus Python (Score:4, Insightful)
Moreover, since 4.0 is a floating point number, it's not even a very helpful abuse of notation to allow 4 and 4.0 to be 'mathematically' equal, since you can demonstrate that mathematically all floats are equal to each other: there's some nonzero epsilon small enough that epsilon + x is 'equal' to x. It is not helpful to then apply normal mathematical reasoning and conclude that all integers are equal - that is, it's nice to maintain some part of a programming language that is actually consistent, and if we're going to use the symbol '=' for both types, it's helpful at least to maintain that these are distinct overloads!
Really, any programming language for the mathematically savvy would issue a warning whenever you used a floating point type for anything; floating point support is a somewhat lame compromise for hardware compatibility. If on the other hand we had the habit of using constructive real numbers (which, unlike classical real numbers, are implementable), we would, quite rightly, be forced to reconsider the notion of equality globally.
Re:404 (Score:2, Insightful)
Re:The best (Score:4, Insightful)
Re:The best (Score:4, Insightful)
what if one of the bugs was that authentication wasn't checked when it should be? Users hate entering passwords, and fixing that bug would REALLY annoy them.
Some UAT would have helped on that, though. The OP wasn't clear if the complaints happened after release, or during pre-release user acceptance testing.
Did you clean up the code or break the code? (Score:4, Insightful)
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.
Re:Did you clean up the code or break the code? (Score:3, Insightful)
Re:Perl versus Python (Score:3, Insightful)
Re:Perl versus Python (Score:3, Insightful)
[*]: I was too young back in the day to know this first hand.
Re:Perl versus Python (Score:2, Insightful)
Re:Perl versus Python (Score:3, Insightful)
I had a geometry teacher in high school who asked for the most precise possible answer...
When I gave her 3*pi, she told me that was wrong, I should have given her 9.42 and my arguments that 3*pi was precise to infinite digits while 9.42 was only an approximation fell on deaf ears.
Just another instance where the correct answer and the right answer are different.
Re:Ever want to sort an inhomgenous collection? (Score:3, Insightful)
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).
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").
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