There's a difference between girlfriends and black friends. (Hint: are you having a close, sexual relationship with all your black friends?) Therefore it's appropriate to distinguish between your girlfriend versus regular friends. It is not appropriate to distinguish between black friends and your regular friends. If he had written about teaching your female friends to program I would see that as full-on sexist. As it stands you are seeking to be offended and you found something offensive which is unsurprising.