Is there a more structured way to develop projects?

After an absense I have re-started the FCC projects again. At the moment I doing the Simon Says and the Tic-Tac-Toe challenges. What struck me is that I am adding pieces of code here and pieces of code there, hoping that they fit together. This looks to me like a very brittle way to develop software. Are there any methodologies that are less brittle and “chewing-gum-and-duct-tape-it-togetherish”?

Well the most popular method is just writing out pseudo-code which is what most people do.

eg. You want to make to do the weather app

  1. recieve the api call
  2. output it to html
  3. format it and make it look pretty

(now of course things are more complex than that but that was an oversimplification.)

Overall other than that there is no really 100% right way to structure things but writing it out in say , an engineering notebook will help you organize and structure your work but don’t worry you will get the feel of it pretty quick.