Yes we must always do self-investigation and find out the cause
of our mistakes and imperfection, and make an effort to correct
them so we will not fall into similar mistakes in the future. Or
break the habits.
On the other hand if someone praises us, we must not become proud
and egotistic but rather, do some self-reflection and think if I
have really lived up to what others said? If I did, I must hold
onto that or otherwise, I must improve myself.
This is something very basic that all Buddhist practitioners must
be able to do.