"That sounds like advice from a relatively inexperienced developer."
I would say it sounds like advice from someone who has never worked at a larger organization. I believe what he says holds more true in smaller, very product-driven companies. But whether you get recognition or not for your work still depends on non-coding skills in these environments.