The James Joyce's quote says that mistakes allow us to discover and learn new things.
If we look pessimistically and negatively at mistakes, we cannot say they are good things. Failure is painful, destructive, and sad.
But the attitude we must have is optimistic. We must be ready to gain more and more experience and skills even from failed situations, mistakes, and adversity.
Moreover, mistakes are often the key to discovering a new and innovative path, and that is where we must take it.