As Napoleon used to say ... no, actually it was Voltaire:
'Byng's execution was satirized by Voltaire in his novel
Candide. In Portsmouth, Candide witnesses the execution of an officer by firing squad; and is told that "in this country, it is wise to kill an admiral from time to time to encourage the others"
(Dans ce pays-ci, il est bon de tuer de temps en temps un amiral pour encourager les autres).'
John Byng - Wikipedia, the free encyclopedia
Napoleon may well have approved from one point of view: Byng was the second son of a recently-ennobled family and therefore undoubtedly guilty of bourgeois tendencies.
On the other hand it lead to "a culture of aggressive determination which set British [Naval] officers apart from their foreign contemporaries", to the significant disadvantage of France.