This is probably the root of the problem. But there is good news because a) many people suffer from this and b) they tend to be good or at least experienced programmers
For example; we use FizzBuzz and some algorithm challenges to screen new hire candidates - the number of times an otherwise great programmer has submitted a 100 line behemoth (for something that should be less than 10) is unamusing.
As others have said; sounds like youve cracked programmig, you now need to hone your craft by learning engineering methods and problem solving.
This is best achieved by doing; try building something useful based on an ambiguous goal (if you let us know what programming languages/interests you have then it might help get more specific advice). Work your way up to submitting patches to open source projects - where youll get valuable feedback that will help hone your method