One of the most valuable pieces of career advice I received was this answer on Stack Exchange by Joel Spolsky. The question is: How many questions are appropriate to ask as an intern? Here’s what Joel has to say.
A lot of times you’ll learn a lot by struggling to find the answer yourself, even in cases where your mentor can teach you something in 10 seconds. For example, if you want to know where something is in the code, you can ask them (10 seconds), or you can spend four hours studying the code and trying to figure it out yourself.
The advantage of the “four-hour” option is that you will actually be learning 200 new things about the code, all of which will help you later on. Struggling to find your own answers can be a waste of time, but it can also be a way to learn a big complicated codebase.
Needless to say, if it’s a programming question that doesn’t concern your company’s own proprietary code, you should try to figure it out yourself using the internet.