I personally do not play slots, but do you think that is why people like slot machines? Short of breaking their code?
I rarely play slots but on those times that I played slots I rarely win that is why I don't consider playing it often, your friend is just frustrated and he is putting his frustration on the slot that is why he says he is breaking the code which is really impossible to do because the house edge control the situation and he is just waiting for his turn to win based on the algorithm.