Is there any word for the opposite of a "bug" in programming?
A "bug" is essentially when a program fails to function as expected/desired.
What I'm looking for is a word for the opposite of that - a function that is desired but isn't supposed to be working yet unexpectedly starts working. As an example, I'm developing an iOS app at the moment. It includes notifications upon certain events. We didn't think anyone had deployed our push notification server yet and notifications hadn't been tested at all, but in the course of testing other things, notifications somehow started showing up.
I feel like this is a feeling familiar to all programmers. Is there a word?
Solution 1:
To my mind the behaviour you describe is still a bug. A bug is what you have when Actual Results differ from Expected Results - and this is exactly what you have here.
Solution 2:
Feature. There is a programming joke, 'It's not a bug, it's a feature' and 'If you can not fix a bug, try to prove it's a feature'
But grammatically, 'bug' is a slang for 'error', and the opposite for 'error' in programming code is 'validity', and debugging software naming is 'debugger' or 'validation software'.
The error messages may state 'Invalid code', 'Invalid operation', 'Invalid usage'
What you described is 'undocumented features' or 'undocumented behavior', which is still a bug.
Note Mathijs Segers' comment, a very good suggestion, software developers often announce 'bug fixes' in every new version or subversion. A 'fix' is a valid opposite for 'bug'
Solution 3:
Most appropriate expression seems to be "unintended feature".
A bug is unintended, and is bad for users.
A feature is good for users, but, in this case, it was unintended.
Web Search also throws a lot of results for this expression, so it seems to be widely accepted.
After some more thoughts on this, I have this grid:
| - | unintended | intended | | bad for user | bug | restriction | | good for user | ? | feature |
While looking row-wise (viewpoint : "It is a feature"), we can fill in with "unintended feature".
While looking column-wise (viewpoint : "It is a bug"), we can fill in with "beneficial bug".
Completing the analysis of the grid : It is partially a feature and partially a bug, so I might add the answers by @Nanne , featurebug & bugfeature.
A comment about the restriction : When software has intentionally disabled features (User : "I can draw pictures, but can not save them"; Developer : "You have to buy a license for the software, and this restriction will be removed") and makes it bad for the user.