I wholeheartedly agree. This is why you should be planning from day 1 on ways to make sure that your career is never dependent on a single individual’s or organization’s whims. They will be doing the same for you if they are smart.
This may sound ugly or cynical, but it’s a fact of life. Discretion is not just about what information you choose to reveal, it’s also about figuring out who is and isn’t “on your side” for the long run. I think we all fail at this at various points in our lives in some way or other.
I knew the technology I was implementing pretty well but now knowing how to approach higher ups and people in other departments is just as important.
Just randomly dropping that factoid in a group discussion where it's difficult or impossible for me to probe deeper and understand what's behind it is not a great idea. That makes it easier for someone to take a bad impression from it.
But, also, yeah, I agree, your boss is never fully your friend. I like a lot of the people who work for me, and in other circumstances I think I could be friends with most of them, but part of my job is to evaluate them, including negatively. There is an art to expressing vulnerability in a way that creates intimacy without making a person question your abilities. You can't just assume that everything that you say will have only positive consequences.
Also, I have "cold induced asthma". Whenever I catch a cold, my asthma flairs up and I'm heavily medicated. I had to explain why I spent so much time working from home.
Saying that stuff to peers has little risk especially if the peers know each other. But aetherson has a supervisor role here and he is at least being honest to us that such a remark will condition his future opinion of the blabber-mouth.
That's perhaps one of the things that takes people some time to learn after leaving school-- what you say can hurt you, asking the wrong questions can damage your career, and, your boss is not your friend.