An alternative is books, but there are often a lot of subtleties left out. What I've learned from mentors is mostly habits like organisation and keyboard shortcut/debugging workflow.
What's also useful is having feedback like don't do this, it doesn't matter, or do more of that.
The value of a mentor comes from getting advice that's very specific to you - books can't give you that.