I read books, never really had a mentor and had to figure out things on my own. So learning by mistake it was and I made a lot of mistakes. :D Still do.
Tbh I can't remember what the first best practices were. I think it was the book pragmatic programmer 10+ years ago.
No clue, I know that writing my own framework did help and refactoring it 2-3 times did also help.
As a personal side note. I think I dislike the term best practice because as I grew over time it was often used as a phrase to stop the dialog of figuring things out. 'we do this because it's the best practice' and if you ask 'why is this the best practice?' they said some big names or companies as reasoning or some abstract term, but rarely they did explain the underlying concept or reasoning.
And to me that's not how logic works, this is how cults works. To me best practices are very often a very specific implementation of an underlying principle. But these are just my initial thoughts and not conclusions ...
Caleb H.
Co-founder of High/Low