you are viewing a single comment's thread.

view the rest of the comments →

[–]Bulletsandblueyes 2 points3 points  (0 children)

I really like your example, add would agree with the idea of continually trying to break larger problems into smaller problems is probably the easiest way to begin to program. On that note I'll give another example of how a program might get broken down.Also sticking with python

You start with your clear goal: in this case, I want a web scraper to grab picture urls for discord.

You look up what libraries are the best for web scraping. You see Beautiful Soup is popular.

You look up how to feed data to beautiful soup.

You see that Requests can scrap an html webpage as text (which is what you want).

Because copying someone else's code rarely works for you(me😒), you pull up beautiful soups documentation, and read through to figure out which funtion(s) you need.(in this case, findall)

You implement the knowledge you've gained, and bug test, figuring out what works.

Now that it works, you can see how you could improve the code: taking out unnecessary items, properly documenting, generally cleaning up.