The last sentence means that Emperor Taizong and Li Shimin adopted the imperial examination to select talents, which is a long-term strategy.
In the next sentence, he began his career as a scholar, "aiming to show his ambition in a cage", and as a result, he earned all the heroes in the world and lost his head himself. Some people say that "heroes grow old", which means that since the imperial examination system, some of them have died of old age in the field of literature, and they have nothing to hate.
This sentence refers to the imperial examination system.
That is, the unified examination organized by the state is the main way to select officials. It began in Yang Di and was perfected in the Zhenguan period of Emperor Taizong. The imperial examination system was the most mature official selection system in ancient China. Once it was born, it gained infinite vitality and lasted nearly 1500 years in the history of China. This official selection system has obvious limitations, but it has advantages that the previous official selection system does not have.
Compared with the imperial examination system and filial piety system in Han Dynasty, the imperial examination system and aristocratic system in Wei, Jin and Southern Dynasties have two obvious advantages. First, the threshold is low; Second, relatively equal. These two points enable talents from all walks of life, rich or poor, high or low, to gain opportunities in relatively equal. This has greatly inspired social talents, especially those intellectuals who are economically and politically disadvantaged. Although only a few people have achieved fame, although the inside story is not as fair as it seems, it provides a stable road for the poor to enter the official position. After the birth of this system, intellectuals in the whole society were attracted by it, and they studied hard for decades just to become famous once. If you are the first, of course you will be overjoyed and naturally relieved. As the saying goes, "the spring breeze is proud, the horseshoe is light, and you can see all the Chang' an flowers at once." However, more students are discredited in Sun Shan, and they have to study hard day after day and year after year. Even so, how many people can get what they want? How many people look at their heads and still have empty hands!
This system has obvious advantages, but it also has obvious limitations. It discovered talents, but it also eliminated talents. Not all talents are suitable for being an official, but the emergence of this system has attracted talents from the whole society to the road of being an official. On the one hand, many people have gone the wrong way and made blank hair; On the other hand, it also caused the deformity of the talent structure in ancient China.
The biggest beneficiary of this system is of course the feudal rulers, that is, selecting talents and maintaining social stability. Seeing the students leaving the examination room, Emperor Taizong couldn't help laughing: Heroes in the world, like me!