A ninja or shinobi was a covert agent or mercenary. The functions of the ninja included espionage, sabotage, infiltration, and assassination
The shinobi proper, a specially trained group of spies and mercenaries
Samurai were the military nobility
Samurai felt that the path of the warrior was one of honor, emphasizing duty to one's master, and loyalty unto death
Now which one do you really want working for you?