It might sound surprising, but the best piece of advice I got were not directly related to programming, but more to the attitude and work ethic. With the years I understood that a strong work ethic and a good attitude are the starting point for solving any technical challenge. Therefore, taken aside all the programming pieces of advice we see anyway repeated in blog posts from time to time, the best things I've been told more than a decade ago are:
Later edit to add some time-related context: It might be worth mentioning that I only realized these were really good pieces of advice (at least for my profile) as the years passed. By the time I heard it, it was more like "well, ok, that makes sense" but it's only with the experience that I really get how good they are.