It's a good question, one that's a good nod towards the principle that you will inevitably learn more slowly if your own mind is the only one you have to work with (and lately I've been thinking about how I can get in a professional position where I'm near the bottom end of the intelligence and/or domain knowledge range in the room for this very reason).
But one answer might be: you'll know. "Works" is shorthand for satisfying a certain set of expected conditions. There's a core of reliable behavior in the software that's the minimal working definition of "works" ... but there's also the question of relative ease when it comes to reading, understanding, and changing/augmenting the code you have, or how the code "works" as an expression of the system for the purpose of presenting an interface to the developer.
Chances are pretty good you know the feeling of writing something that you either (a) are uncertain is really adequate as far as the developer experience goes or (b) you know is probably not adequate but seems to get you to the minimal definition of "works" fastest.
Listen to that feeling. Interrogate it. Try something different. Observe the tradeoffs.
If you get a production bug that takes a week to fix because the code is a mess you feel it. If adding simple new features is a pain, you feel it.
Now, of course, you might want to skip that, by learning from others, but OP is suggesting that you make your own mistakes.
By this time, that one inexperienced developer gets promoted to "Architect" because he knows where all of the bodies are buried. Now one of two things happens. He brings in more inexperienced developers because he doesn't know what a good developer is and they keep adding on to the UserManager class and to organize it better, they add section breaks. The class grows.
If they are lucky, they get an experienced developer who tries to tell the "Architect" about proper coding techniques, management and the architect dismisses the critique as "if it ain't broke don't fix it"/"this is the way we've always done it". All of the good developers leave and you are left with only bad developers.
Then you end up with the "Dead Sea Effect"....
http://brucefwebster.com/2008/04/11/the-wetware-crisis-the-d...
Because it hurts.
With as many people as we have on Earth it is unlikely that one special unique problem can only be solved by one special unique person. While it might happen, it's unlikely to happen to a software developer at a small company. The problems and solutions you find there are often relatively comparable or even generic, and are found and solved by many people in parallel at the same time. While working together might be faster, it has nothing to do with the feasibility of detecting and repairing issues.
Keep looking at it and ask if you are doing something redundantly.
The only feedback you get as a sole developer are your compiler and errors in production.
False. There's plenty of resources online. There's plenty of code to read online. There's plenty of potential critics online.
You would never know that it isn’t a good idea to write your own AcmeDatabaseManager or AcmeLogManager.
Unless you've read the Internet. There are plenty of database and log utilities out there.
Reading. Plenty of books, blog posts, and forum posts point out that you shouldn't have "10 KLOC UserManager classes".
The thing is, one has to figure out how to integrate "book learning" AND real world experience, so that they're constantly synthesizing a newer, better understanding.
[1] I’ve noticed that in codebases of Apache Spark, Apache Oozie, Apache Cassandra, and Firefox.
Definitely. I mean, some of them probably have some objective basis. But clearly some of them are indeed subjective and arbitrary. Take "long method names" for example... I believe method names should state what they do, and should be however long it takes to do that. To my way of thinking, making a method name shorter just for the sake of being shorter, and eliding semantic information, is an anti-pattern, not a best-practice. shrug
If the 10k line UserManager class has you pulling your hair out, you know you have a problem.
10K line UserManager classes “work”.
That’s how you get the “expert beginner”.
https://daedtech.com/how-developers-stop-learning-rise-of-th...
The only feedback you get as a sole developer are your compiler and errors in production. You would never know that it isn’t a good idea to write your own AcmeDatabaseManager or AcmeLogManager.