This is why I think people should still learn their job through hands-on apprenticeship, as opposed to a lot of book-learning in the classroom. In fact I think people do still learn their jobs that way. It's just delayed by several years of book-learning that has little return on investment. When you finally land your job, your first few months are when you really start learning enough to become useful. Disclaimer: I…
1. Completely self learned people are more often prone to develop some bad habits or worse have some subtil but fundamental misunderstandings which are hard to get out of them. (in my experience)
2. Often just a view month with proper guidance can have much better effects then a year+ of self study or "isolated" experience. The problem most times not the general ideas but the details, wrt. the situations for which there are no clear rules you can "just" apply. And often making a wrong decisions doesn't matter that much and sometimes fall under "programming style", but there are hundreds of such small decisions and making many somewhat suboptimal decisions can easily pill up and cause serious problems.
Best example is KISS (Keep it Stupid Simple). Seems easy right, but what does simple mean? Is less code more simple. Are less sanity checks or maybe less validation more simple (due to less additional complexity in them)? Is using less abstractions more simple, even if more abstraction allow you to have code which is harder to get wrong when writing/changing it, _assuming_ you got the abstraction right? Is it more simple to sometimes just repeat yourself, or should you keep strictly to DRY? Is it more simple to sometimes explicitly write out type which would be inferred anyway? What about kinda unnecessary temporary variables? What if it's like `var valid = ...; if valid { }`? What about splitting functions, is it more simple to have 2 pseudo independent sub-functions you will not reuse or one slightly to large function where everything is in the same place?
The answer is always: It depends on the exact situation.
There is no clear cut definition of simple. The best would probably be based on code readability.
But then is it more readable to have one large function body or to split it into sub-functions which are well named but to which you have to explicitly navigate to "fully" understand all details of that function?
Sure we do have guidelines and they allow you to generally get it right (well ok, if you use some good guidelines, there are many bad ones, too). But there is a limit on how much you can learn from them and the rest needs practice. But many problems only show if you do large projects by yourself _and care to maintain and reflect on them, and come to the right conclusion unbiased by the programming language induced bubble you are in_ which is super time consuming. (So guidance is important, but hardly done as many companies do not plan in any time for that at all).