SMC trashes itself if selected program can't be installed
If you have at least 2 credits and trigger Self-modifying code (SMC), it will show all programs left in the deck, even if you don't have the credits to immediately install it. If you do this, then SMC trashes itself and you lose 2 credits (as if you trigger the trash cost).
There should generally be a way to gracefully back out of the SMC action, like a "None" option in the SMC program select. Perhaps don't even show programs that can't be installed as a choice
If you activate SMC, you have to play 2c and trash it.
If you can't find one that you can install, you already paid 2c and trashed SMC. It was the cost to activate the ability. There's no way to say: "Oh, didn't find one, I take my credits and SMC back!".
Showing only the programs you can install would be an improvement, though.
I don't think you can even legally pop SMC without using its effect, similar to the street peddler ruling if it has only events (https://twitter.com/RukasuFox/status/618047088308432896). This would probably only be relevant for Geist desperately trying to draw cards though.
But you probably don't know in advance if there's a program you can install or not.
If you pop SMC or play Special Order or Hostage or any card that let you search your deck, there's always the posibility of failure to find a card.
The FAQ says:
If a player is searching for a card, he must find the card, if able. If a player is unable to fulfill the condition of the search, then nothing happens, but the deck is always reshuffled.
Ah, you're right about the popping just to shuffle. I guess then I'm just asking for only showing programs that the system will allow installing.
This messes up a lot of my games. The searched-for card seems to straight-up disappear when this happens, on occasion.
(I'm not usually the one playing SMC, my opponents are)
One thing related to this issue is when you have some source of recurring credits that you can use to install programs (e.g. Sahasrara).
For instance, if you trash SMC, and then get recurring credits from Sahasrara while the SMC prompt is listing the programs that can be installed, you can click on a program that you should be able to install, but it is not installed in the end. However, the log even shows the message that the program was installed!
I think this one can be closed now--Self-modifying Code became cancellable in #912. If you do cancel, SMC remains and you don't pay the 2 credits. I also tested taking credits off Sahasrara after popping SMC while on 2 credits--you are able to take credits off Sahasrara (giving you 4) and successfully install Corroder.