Here are some examples that taught me to keep my mouth shut:
One time I met a friend at church who was also an engineer. I thought it would be fun to invite them to my house some time to hack and collaborate on a side project. It became clear pretty quick that we would not work well together although we could still make great friends. At one point he asked me how much I make. Being a fellow software engineer I didn’t even hesitate to tell them. Their reaction made me very uncomfortable. They were so surprised and they started commenting on how expensive my place is (I was renting a couple rooms in someone else’s house at the time so it didn’t seem extravagant to me). A few weeks later I was at church talking with some friends outside and someone comes up from behind and starts telling, “Don’t talk to this guy! You can’t afford him! Trust me! You can’t afford him”. He was attempting to be funny and possibly even compliment me or brag for me. However it made me extremely uncomfortable and it changed the dynamic of a great conversation we were having prior. One that wasn’t about me at all and I didn’t appreciate the sudden subject change.
Another time a friend asked me my salary when I was helping them with their non profit website. When I told them they were floored. They brought it up every time I ever saw them going forward. It seemed so odd that I just stopped hanging out with them.
Both of these stories are from almost a decade ago on a startup salary that most people on HN would think was very low. It’s just such a different world than outside our industry still.
On the other hand, I’ve also used levels.fyi to help encourage friends and family members to get into software if they express interest but want to know what to expect.
I do let people know but the list of people I’m transparent with is very very small now.