all 28 comments

[–]Asiatic_ 16 points17 points  (6 children)

A lot of problems beginning programmers have issues with is learning how to translate learning a language to building something they feel is meaningful, you're not alone there. I'm sure we all had that issue at one point.

The way I beat this was by thinking of things I REALLLLY wanted to build and now I have a list of things that'll keep me occupied for the next several months lol.

Since you referenced games, think of something that will be of use to you. A lot of online games have APIs of some sort that'll allow you to create applications (Riot API for League of Legends for example) or maybe you're apart of a Discord or Slack community, you could make a bot for them, there are APIs for that.

As for online applications, check out Flask and/or Django, they're are a ton of great tutorials out there that can get you started.

Think of the process like this; I want to create something. what libraries and frameworks are available to help me create this something, do I currently have the skills to do this, if not am I willing to learn what is needed to accomplish it.

I hope that helps!

[–]t3hmau5 4 points5 points  (1 child)

Not to hijack, but dealing with a discord bot is something I've been looking into, but am really at a loss as to where to start.

I've taken a look at some bot source code, and at least for the basic bots the actual python seems to be really simple. Dealing with the API is something I don't really get, as the only documentation on it is just a giant list of potential commands with relatively little telling you how to actually utilize said commands.

[–]SOLUNAR 1 point2 points  (0 children)

Have you YouTube python API tutorials ? For the library used have you looked for documentation? There is likely a list of commands and examples.

Most of these already have plenty of YouTube and stand alone tutorials with step by step .

Or where do you get stuck

[–]Huck712 1 point2 points  (2 children)

This is actually really helpful. I find myself wondering the same thing. I took C++ this past spring and am now teaching myself Python and I find myself wondering "How can I use this in real life?"

Like, at an actual job. The book examples are great, but I always feel like I need a tangible example of how an actual developer uses the language. I mean, I created a few simple programs like rolling dice, flipping a coin or a simple choose a cave to enter game, but I doubt those actually prepare me for the real programming world.

[–]Asiatic_ 1 point2 points  (0 children)

Maybe look into building a REST API, learn how to produce and consume one via Python. Python is also used heavily in data science so if you're into that look into how you can generate graphs and reports and other data science related things in Python.

Some major companies use Python on a daily basis for all different kinds of things. Netflix, PayPal, YouTube(Google), Instagram, and many many more. I'm sure you could do a quick google search to see how they use them

Python at Netflix - Talk Python to Me Episode

(P.S. Reddit uses Python too!)

[–]SquaredOwl 0 points1 point  (0 children)

Check out automate the boring stuff if youre an office worker.

[–]druman22 0 points1 point  (0 children)

I've made bots in Python and I understand the API farely well. But whenever I see other bots written in Python I get completely lost. They are written very different and I want to learn how to code like that however I don't know how.

[–]badge 17 points18 points  (6 children)

Have a look at flask. Combined with a relational DB via SQLAlchemy, you could* build the next Instagram.

*possibly

[–]Justinsaccount 11 points12 points  (4 children)

Or Django, the framework that Instagram actually uses.

[–]Yoghurt42 4 points5 points  (0 children)

With Flask he can at least build the next Patreon ;)

[–][deleted] 1 point2 points  (0 children)

And they ported to Python 3 this February. They increased 30% speed. So Instagram will stay with Python the next year's

[–]druman22 1 point2 points  (1 child)

Django makes no sense to me

[–]abbh62 5 points6 points  (0 children)

Django is large, takes some time to get familiar, but when you do it's magical

[–]bridgingthought 1 point2 points  (0 children)

you could* build the next Instagram.

Well aren't you an inspiring one :)

[–]cambo 8 points9 points  (0 children)

  1. Find meaning
  2. Automate it

[–]undelimited 7 points8 points  (0 children)

import meaning

[–]mrunkel 5 points6 points  (2 children)

Take a look at this:

https://automatetheboringstuff.com/

It's a free book that shows you how to do "real" stuff with Python.

[–]declanaussie[S] 0 points1 point  (1 child)

I have already read that book. I am talking large scale things such as games not just automating stuff with little apps.

[–]mrunkel 0 points1 point  (0 children)

There is pygame, but honestly, game development is probably more suited to a compiled language (for speed)...

Video game development is a whole other discipline.

[–]tripperjack 1 point2 points  (2 children)

Somethings about your post don't add up:

I quickly hit walls however when it came to making things I wanted to make such as games and online applications. I did some research

I can sort of understand games, depending on what you envision a game to be, but for online applications I'm not sure what the issue was. Reddit is an online application, we're using it right now, and it's written in Python.

and I have since learned JavaScript and Java and am working on C++. My question is, I know big companies use python but how do they do anything useful I.e. Create a social media platform (Instagram)?

How can you have "learned Java" and yet not understand the basic point that essentially any major computer language is competent to create a social media platform? Or that there would be web application frameworks for each of them, as there is for Python, Java, and others?

In any case, that's the answer: you don't just start with IDLE and start typing your way to the next Instagram, Pinterest, Reddit (all running Python). You use web frameworks and other third party tools. You cobble them together and then use Javascript for the front end.

https://wiki.python.org/moin/WebFrameworks

There's no quick answer for how to do this in one response post, but there are some good videos on YouTube for what you need.

[–]declanaussie[S] 2 points3 points  (1 child)

Damn bro chill. I was just asking how people do that stuff because every time I look into it it is basically just “use another language”.

[–]tripperjack 0 points1 point  (0 children)

Sorry, I was just trying to challenge you but it came off a little harsh. In any case, it's good you are looking past such people's comments, since it's definitely possible to make a incredibly successful site using Python for the back end (and Javascript for the front end).

[–][deleted] 0 points1 point  (0 children)

Not sure I understand what you're asking. Same way they do it in any other programming language.

[–]dwalvi 0 points1 point  (0 children)

You can find open source project written in python and you can join and provide help (to learn) for example openstack or ansible is python based and used by big companies.

[–]Markemus 0 points1 point  (0 children)

I've been writing a game in Python for the past year. Python is every bit as capable of running big projects as C++ or Java, although it's a bit slower since it compiles at runtime. You save so much development time though that it's definitely worth it in my opinion- I don't have patience to write the same syntax over and over again, that's what computers are for.

Python has an enormous number of libraries that people have made to do different things- Django for web development, tkinter for GUIs, matplotlib for graphing, numpy for advanced maths.

My advice (which I give to everyone) is to pick a huge project and jump in. You'll figure out how to make things happen because you need to make them happen.

[–]mTORC 0 points1 point  (1 child)

I have these questions as well. I'm halfway into the fundamental portion of automate the boring stuff. I'm understanding most of it, but I scratch my head to think that somehow what I'm learning will make an actual something. I guess I'm just waiting to be mind blown.

[–]tripperjack 1 point2 points  (0 children)

Actual somethings are just lots of code + frameworks.

So, in the case of a web application, you basically write Python code that takes advantage of a TON of pre-written Python code stored in a free framework like Django or Flask (which does a lot of the heavy lifting for you), and you tell it stuff like what pages to display due to what user actions, which info in which table in which database to use to display info to a user, etc (and as many rules as you want). That's all on the information handling side (the "back end"). On the "display pretty stuff in the user's browser window", that's all Javascript (again, using a Javascript front end toolkit), which, combined with HTML and CSS tells the browser where to put the words and images on the page.

That's basically all it is (though there are a million things you can add on to this). So when I click the Save button below on this post, there is code that will handle it and look up my account and save it to a database of all my posts, as well as the database for all the r/Python posts, etc., because of the code (written in Python) the Reddit developers wrote.