The difference is we aren't disturbing anyone while learning programming languages - the biggest nuisance I can think of is a newbie writing wrong/out-of-date tutorials on the web. Whereas photography by its very nature can be super annoying to others - you have to be polite and wait for some dumb tourist is taking a photo of his girlfriend, you can't enjoy anything in peace with flashes going off all around etc.
>you have to be polite and wait for some dumb tourist is taking a photo of his girlfriend
Actually, you don't: I usually just take a picture of them taking the photo of the girlfriend.
As for flashes, these days with everyone using their smartphones, the phones are smart enough to usually not activate the flash when you're outside. It's not as bad as the "old days" when I used to see dumb tourists with disposable film cameras taking flash photos of the Grand Canyon at night, thinking somehow they were going to light up the entire canyon.