It was during the period of the Kamakura shogunate (a dynasty of shogun) that the ethical code of the samurai or Japanese warrior, was developed. Japan was was then a feudal society and the samurai were the armed champions of the leading families. they were also warriors that protected japan. They lost value when Japan became a peaceful country and did not engage in warfare. The samurai of the Taira and Minamoto clans grew to be the most powerful of the samurai's. They live by the bushido code and are very loyal to their ruler to the point that they will commit suicide when their emperor died. A comparison to samurais today is Japans modern day workforce because they are loyal, brave and endure through hardships.