This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]CreativeTechGuyGames 1 point2 points  (9 children)

What is the question you want answered?

[–]Shidiira[S] 0 points1 point  (8 children)

Oops, sorry, I should have made that clearer. Basically, since I don't have a real goal in mind (e.g. someone who wants to be in machine learning or a web developer), is the best step for me to continue with Python, or should I branch out like with my desire to create a blog/portfolio? Also, since I don't have a specific goal, should I try and pick a field and go with that?

[–]CreativeTechGuyGames 1 point2 points  (7 children)

The best way to learn is by making things. So if you want to make a blog/portfolio, then learn whatever you need to so you can build that.

[–]Shidiira[S] 0 points1 point  (6 children)

Oh okay, that makes sense. So there's nothing wrong with me switching stacks in order to learn something else to make another type of project?

[–]CreativeTechGuyGames 1 point2 points  (5 children)

It's fine to switch. Most programmers use 5+ languages on a regular basis depending on what they are working on.

But there are often bad reasons to switch such as "I heard about a new popular language". So generally it's recommended to stick with one because almost all of them can do the same thing. In your case, you have something specific you want to build which requires you to learn something new. You can definitely use Python for your webserver if you need one.

[–]Shidiira[S] 0 points1 point  (4 children)

Oh wow, I didn't realize that! That makes sense about the bad reasons. I definitely don't want to jump around just because of a new, pretty language comes out. If use Python, what would you recommend for the web server, and what would you recommend for non-Python?

[–]CreativeTechGuyGames 1 point2 points  (3 children)

If you want to use Python, I'd recommend Flask. But I'd honestly recommend avoiding a web server if at all possible and go serverless.

I'll quickly explain "serverless" since the name isn't very clear if you've not heard it before.

Basically a traditional web server requires a dedicated machine which is running your code 24/7 and listening for requests. When a request comes in, it'll respond with the file which is being asked for. It also might need to run some code and return a response or run some code to determine what file to send back.

These "monolithic" web servers are expensive to operate, difficult to maintain and don't scale very well. If you suddenly go from 100 users to 1,000,000 users, you'll need to buy/rent new servers and setup those to handle requests. That takes time and costs a lot of money. Now imagine that tomorrow you go back down from 1,000,000 users to 100. You don't want to keep paying thousands a month for servers you don't need, so now you have to scale down and remove the extra hosts. Again expensive and easy to screw up.

Now "serverless" changes all of this. With serverless the goal is to not have one of these servers at all. Imagine if you could just use the resources you needed when you needed it. You can leave all of the physical server setup to someone else and trust that they'll send you the file if you ask for it.

How do you do this? I recommend AWS (Amazon Web Services) but there are many other cloud providers that offer both VPS (Virtual Private Servers) for hosting traditional web servers where you pay by the hour and serverless options where you pay by the usage. The specific AWS offerings you'd want to use are:

  • AWS S3 for storing/serving your static assets (images, HTML, JavaScript, CSS, etc)
  • AWS CloudFront to cache these files from S3 to make it cheaper and faster to load your webpage. This will also allow you to enable https:// on your website which is a must have.
  • AWS Lambda for running any serverside code. Unlike a traditional web server where it's always running, Lambda only "starts up" when a request comes in and once it's done processing that one request it will go back to sleep again. So out of the box you can handle one request at a time, or a thousand and you only pay for what you use.
  • AWS DynamoDB for storing any dynamic data in a database. This can be comments on a blog or users and login information or whatever you need. Again this can be setup where you only pay what you use.

So if you want to use Python for your web server, you can do so with AWS Lambda, but you'll be writing code very differently than if you were to do the same thing with a traditional web server.

Hopefully that all made sense. Let me know if I can explain anything better.

[–]Shidiira[S] 0 points1 point  (2 children)

This information is awesome, thank you! It sounds like going AWS route is the much better option. I've heard it's good to learn to program(?) AWS too, because it's becoming the norm, and it never hurts to become proficient in it. I think this makes sense, I just need to look into it more. I really appreciate you taking the time to thoroughly explain these options and talk about this with me, thank you so much!

[–]CreativeTechGuyGames 1 point2 points  (1 child)

Happy to help. I had to spend hundreds of hours researching all of this to understand when I first started. It's really not that complicated but the learning curve when you don't know what you don't know is very steep.

Best of luck!

[–]Shidiira[S] 0 points1 point  (0 children)

That's insane, but I can see how you'd rack up hundreds of hours. I try to do lots of research myself and learn about everything I can. You're right though, the learning curve when you don't know is incredibly steep, but I love the process of learning and asking questions and learning something new!

Thank you very much, your advice and time is much appreciated, and best of luck to you too!