Ninja 忍者, covert mercenary, in Japan; pronounced rĕnzhĕ in Chinese, and meaning, in Chinese, one who endures, or perseveres.

Samurai 武士, overt, professional warrior, in Japan; pronounced wŭshì in Chinese, and meaning, in Chinese, simply, warrior.

Bushido 武士道, the way of the Samurai, or the way of the warrior, in Japan; pronounced wŭshìdaò in Chinese.

Both Ninja and Samurai were heavily influenced by the ancient Chinese military treatise from the Spring and Autumn Period, 771-476 BCE, written by Chinese military general, strategist, and philosopher, Sūn Zǐ, entitled, in English, The Art of War, and, in Chinese, 孙子兵法, Sūn Zǐ Bīngfǎ.

One of my favourite quotes from this essential work is this, my translation from the original Chinese –

Know the enemy and know yourself, in a thousand battles, you will never be in peril.

If you know yourself but are ignorant of your enemy, your chances of winning and losing are equal.

If you are ignorant both of yourself and of your enemy, you will forever be in peril.