Lately, I have tried to be more self-aware of myself and my surrounding. I notice something significant when I'm dealing with a complex coding problem it always starts with "oh shit, it's too hard," and if this feeling stays with me, it impacts the quality and the amount of time that I spend on this task. So, I believe to be a better developer We need to notice our attitude to the task we are currently working on. I think the right mindset is to be fully confident that you can succeed in finishing the task. (Many people will say you can't always succeed in developing exactly what you wanted in the beginning, they are mostly correct, but you can always try to :)... I will talk about it in the "Importance of critical thinking with the right mindset" section).
Try to follow your mood when you are working on something new. In my opinion, it doesn't matter how you follow it (write your thoughts in a diary or try to remember when you think about it), the important thing is to develop an awareness of this subject.
For example, I know that one of my weaknesses is trying many things myself without asking for help. This mindset can cause a waste of time (even though I know I can finish it by myself) - I can waste a few hours instead of someone helps me, and it can be done in a half-hour. If you think about it, in this situation I can save the company I work for, a lot of money (my half-hour + my co-worker half-hour < few hours of my time). But on the other side of this example, it's one of my strengths - I will never quit on something I need to do.
If we take my previous example for the explanation - my plan is not always to ask for help (because it can cause the opposite of what I try to achieve). I need to see when I spend too much time on something and need to think about the cost of someone else who will help me. If I know the cost is worth it, I need to ask for help. But, more importantly, remember your strengths and make them your primary mindset.
In my opinion, this is one of the most important mindsets when you solve a challenging task. Why? without it, you are mentally weak, when you don't believe in yourself, the task you received seems too hard. But, if you do believe in yourself, you will do anything to complete the task.
I believe that you understand the importance of the right mindset after this example. But, I think the important in all attitudes is to remember that your approach will impact other things. for example, if you take the mindset I talked about, you can mistakenly think you can finish the task in no time, and this why is important to have critical thinking with the right mindset. Let's take, for example, the following scenario: you received a task to build a new service that no one in your company ever developed before. The mindset in this scenario should be "I can do it, and I will do anything to complete the task," but don't be arrogant, don't say you will complete the task in a few hours or a short time. Be honest with yourself and think how long it would take to do it.
Thank you for reading. I really would appreciate it if you comment your opinion about this subject because this is a new subject I explore and will be happy to learn more from others.