I’m guessing you’re asking along the lines of “How do ‘professional’ programmers know when they’re done?”
If that’s what you’re asking, here are some criteria for a “professionally DONE” job:
1.
All your tests pass. If you have no tests, then your program basically doesn’t exist.
2.
The code expresses its intent clearly. People need to be able to read your code and easily understand what it does. If it’s difficult to review like you said, then there are a number of “
code smells” that need to be addressed.
3.
The code contains no duplication. That is, the code doesn’t violate the
DRY Principle (Don’t Repeat Yourself). If it does, then that’s another code smell that needs to be addressed.
4.
The design has the fewest/smallest possible elements. If the code is huge and has more code than is absolutely necessary to provide the functionality needed, then again, it needs to be refactored so it’s simpler and more streamlined.
These are
Four Rules of Simple Design that professionally written code must adhere to, at least in my book. Unfortunately, there are many programmers out there who get paid to write code who don’t follow these rules or even know about them. Hopefully, you’ll not turn into one of them.
Post your code so we can comment on it. A nose for code smells only comes with experience so it’s best to have other people tell you what you might be missing.