Few are motivated by discipline or being yelled at by superiors. The best way to perform well in the work place is to have a high level of emotional intelligence, and ways to exhibit that include self-awareness and self-discipline.
Self-awareness includes being aware of when you may not be at the top of your game, and working with others to complement your skills and abilities.
Self-discipline includes working hard when no one is watching. When you work hard regardless of the interaction you have with your superiors, you will always please them and find ways to get yourself promoted and recognized.
Those who lack these two qualities are often disliked by colleagues, have unrealistic expectations for success and may have short-term success with their antics, but in the long run will only alienate their coworkers and ruin any chance for promotion.