> Do not put work into things that may or may not be needed.
You're a junior dev, someone tells you something is needed, you work hard on it. I guess you learn to question your boss as to whether it's really needed, but that sometimes isn't optimal, either.