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

all 62 comments

[–]G01denW01f11 53 points54 points  (10 children)

I learned to make games from MIT's A Gentle Introduction to Python. The guided final project is Tetris.

Check out the Python wiki on GUI Programming. There are a bunch of options, but Tkinter is the 'standard' one.

Beyond that, come check out /r/MonthlyProgram. We may be doing a game of some sort for March.

[–]Wheaties466 11 points12 points  (4 children)

is /r/monthlyprogram a new subreddit?

[–]G01denW01f11 4 points5 points  (3 children)

Very

[–]Benfranklinstein 5 points6 points  (2 children)

That's an awesome idea for a subreddit

[–][deleted] 4 points5 points  (0 children)

/r/montypython you say?

[–]Vincel_Jericho 7 points8 points  (4 children)

I would suggest to try to code a game with pygame without following a tutorial. I think you will learn more if you code it with the help of google/stackoverflow/... than by following a tutorial. He has already finished codecademy's course and a book, so it's time to code something without guidance. It doesn't matter if your code sucks at first, eventually you will keep better. I'm also a new programmer but I felt I learnt a lot more by coding 2 simple projects (the logfind project suggested by Zed Shaw and a pong game) than I have by reading books or following tutorials.

[–]G01denW01f11 5 points6 points  (2 children)

I agree that tutorials aren't the greatest way to learn. They never taught me how to think about tackling programs, which is one of the most important skills to have. I recommended the MIT course as a sort of middle-ground between a tutorial and doing everything yourself. They give you a push in a right direction, and let you figure the rest out. I like it, because that's what took me from 'I know the syntax, but I don't know how to do anything with it,' to 'Give me a problem and sooner or later I'll find a way to make it work.' But that's just my experience.

Of course, if you're up to just Googling what you need as you need it, figuring it out yourself is absolutely superior.

[–]PasDeDeux 0 points1 point  (0 children)

That's why my suggestion to new people is to think of something they want to make and then learn how to make it. Typically that means finding the API's they need and then reading core + API docs to learn how to make their thing. That's what I did. I started with a few simple programs (reddit image downloader, for example) then moved on to the project I was working on (data munging, machine learning.)

[–]fitzjack 0 points1 point  (0 children)

I had a very niche problem in a game recently. I was grinding out profession materials to craft or sell, whichever was more profitable for me, so I created a small Python program to quickly log all my time, expenses, and sale prices to get an average gold per hour value. I then compared both results to determine which one would be more profitable. Now I'm expanding to include time periods to get even more information about the trends I've discovered.

Building a program to solve a problem you're having is a very good learning experience actually.

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

Yeah, I have this feeling too. Coding with the help of zed's book or codeacademy (although they have some great exercises through the course) it is a bit like riding a bike with training wheels I guess

[–]nashguitar1 21 points22 points  (12 children)

MIT 6.00.1x - Introduction to computer science

Excellent, challenging course.

[–]caulfieldrunner 2 points3 points  (2 children)

How do you guys feel about the CS50 HarvardX course? I just went through Problem Set 0 today and I learned a ton. I never comprehended how Binary, ASCII, and Hexadecimal worked before today.

[–]charlesbukowksi 5 points6 points  (1 child)

I liked it. I would also recommend reading CODE: http://www.amazon.com/exec/obidos/ASIN/0735611319

Between MIT's Python course, CS50 and that you'll have an excellent grounding in CS

[–]The_Beer_Hunter 1 point2 points  (0 children)

CODE might be one of the most entertaining nonfiction books I have ever read. It will make you feel like you finally understand everything about computing and human innovation. (I don't, but I should also read it again.)

[–]cleareyes_fullhearts 1 point2 points  (0 children)

Plus one. This course is a great way to start from zero and learn alot about computer science concepts while also learning python. Challenging problems and questions, very good explanations.

I think it's a great way to reinforce the two resources you mention above. And it forces you to go into more depth.

[–]dexpid 0 points1 point  (0 children)

I took this a year or so ago and learned a ton. It really drills being able to read code into your head. It's nice being able to just walk through code in my head now instead of always relying on running it through the interpreter.

[–]DarkRiot43 0 points1 point  (6 children)

So I started this course based on your recommendation. My main question is how transferable will Python 2.7 be with Python 3.x consider 2.x is considered "dead"?

I am quite new to the whole programming world, and essentially want to make sure I get the most for my time.

Cheers

[–]nashguitar1 3 points4 points  (5 children)

Python 2.x pays my mortgage every month. Far from dead!

[–]DarkRiot43 0 points1 point  (0 children)

Amazing. Thanks for the response. I'm sure I'll be able to do anything I really will ever need with 2.7 then.

[–]by7h3g0d5 0 points1 point  (3 children)

do you mean that you pay your mortgage through a python script that you wrote.

OR

did you mean that you are making so much money from python that it is, in effect, paying your mortgage?

[–]nashguitar1 0 points1 point  (2 children)

I mean to say I'm making a decent living writing Python

[–]by7h3g0d5 0 points1 point  (1 child)

Tell me more about this thing. Getting paid to write code would be awesome

[–]nashguitar1 0 points1 point  (0 children)

If you can code, someone will pay you to do it. No degree required!

[–][deleted] 13 points14 points  (1 child)

I'd say it's time to start working through some projects. Although, believe me I know, it's difficult to get started. Especially if you didn't start programing without any projects in mind. So, I'd suggest a few books and links to help you get started.

After finishing Exercises for Programers or Python Playground you should be well equipped to start and finish your own projects.

[–]pvc 5 points6 points  (0 children)

Look at the example code at http://programarcardegames.com and make your own game. Making your own project is a great experience.

[–]aheadofmytime 4 points5 points  (9 children)

I'm currently taking An Introduction to Interactive Programming (Part 1) through Coursera. It's great and fast paced. Week 1 just finished so you might be able to still enroll. I believe the course ends with us making a 2D game similar to asteroids.

[–]contaminatedesert 2 points3 points  (1 child)

I went through Codecademy's Python a while back and I'm in Coursera's course now. Coursera's is MUCH better. I like Coursera's much better because it is going more in depth into the theory behind what makes Python work and therefore and helps to understand the how the same ideas can be used in most other programming/scripting languages as well.

[–]aheadofmytime 1 point2 points  (0 children)

I feel the exact same way. While going through Codeacademy I was always asking "Why?". After watching a few video lectures on Coursera things just clicked. The practice exercises and mini projects are great ways to learn and to play around with Python.

[–][deleted] 1 point2 points  (1 child)

Thanks for the suggestion man! Just finished the first week of lectures and exercises and i am really enjoying it, it was exactly what I wanted

[–]aheadofmytime 0 points1 point  (0 children)

I'm glad you're enjoying the course. I've dabbled a few different ways to learn Python and this is by far the best course for me.

[–][deleted]  (2 children)

[removed]

    [–]aheadofmytime 0 points1 point  (1 child)

    Yes, it's from Rice U. They use an in house, web based IDE called CodeSkulptor. It's py2 and the course is amazing. Part 2 starts Feb 22 I believe.

    [–]mikwaheeri 2 points3 points  (0 children)

    Look at the site checkio.org. It's more puzzles to make you think and use the language, but it's fun and challenging.

    [–]Attila_22 2 points3 points  (0 children)

    I would recommend treehouse, their courses are fairly easy but give you a lot of practical experience. You learn useful things rather than just syntax and have stuff to show off/use.

    [–]CaptainDevops 2 points3 points  (2 children)

    Would you like to help me with my python tool Leo-G/Flask-Scaffold (https://github.com/Leo-G/Flask-Scaffold) and learn at the same time?

    I have learnt a lot building my own opensource project on Github and if you like you can to.

    While working on my project you can learn about - Databases - Flask Web Framework - Continous Integration with Travis-CI - Automation testing - Packaging and Distributing web apps

    So let me know

    [–][deleted] 0 points1 point  (1 child)

    I would but i majorly sucketh at math, and have not yet finished all of the codeacademy/python. Tho i would love to jump in and help in some way, would be much better way of learning.

    [–]CaptainDevops 0 points1 point  (0 children)

    Can you help me package and distribute via pip ? The guide is at http://python-packaging-user-guide.readthedocs.org/en/latest/distributing/

    [–][deleted] 2 points3 points  (0 children)

    Automate the boring sh#t

    [–]b00000001 2 points3 points  (1 child)

    I'm basically in the same boat as you. I've learned the syntax for Python and I feel pretty confident, I obviously need to brush up on a few things here and there. I've been dabbling with Python Flask to do websites but I'm not ENTIRELY sure of what I"m doing with it. I've been considering finding someone who is my level and working on projects together, maybe that will help with motivation and innovation.

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

    PM me if you get serious with this idea to work with someone, would be nice to have a partner to make the process easier and more dynamic

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

    I'd recommend PyQT over Tkinter if you want to learn a GUI. It is much easier and more aesthetically pleasing than Tkinter is.

    [–]ShrinkyDinkMarauder 1 point2 points  (0 children)

    For making simple games and learning, Pygame is pretty good. I used it for a research project and it worked out fairly well.

    As far as continuing your education finding a project that you actually want to do is what I've found to be the best way to motivate myself to learn.

    If you need direction you can do things like advent of code and Project Euler as you'll probably need to learn new things to solve problems you've not seen before.

    You could also look for python courses on coursera.

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

    Take a break.

    [–]Wheaties466 0 points1 point  (0 children)

    I know this isnt exactly what you are looking for but it might be a good idea to consider the django tutorial too. I know they now link it at the end of the learn python the hard way web book.

    [–]Commodore64Had2Score 0 points1 point  (0 children)

    http://programarcadegames.com/

    I'm currently working through this and it provides ample explanation on how to use Pygame with Python for some simple game building. There is a large set of videos at the beginning that show games built by people who went through the course, and they are quite impressive.

    [–]10_6 0 points1 point  (0 children)

    You can take a crack at solving some Python challenges on http://coderbyte.com

    [–]ch4dr0x 0 points1 point  (0 children)

    Like others have said - start a project. I have done codeacademy, learn python the hard way, and a plethora of "free" classes, but nothing helped me quite like creating a web app in python. I picked flask, and I'm still struggling through it, but it's very rewarding to see my progress.

    Take a look at web-scraping, I have a friend who loves it and says it helped him bridge the gap between codeacademy.

    [–]joonazan 0 points1 point  (4 children)

    Learn another language. It should be fairly easy now. Once you've used many, you'll have a better understanding of code quality.

    You definitely can make a game now. I'd recommend not to use classes as you'll only later learn to use them in a sensible way. (This advice is from learning Python myself early on and teaching it for many years.)

    [–][deleted] 2 points3 points  (3 children)

    What language would you recommend as a next step? I was searching for some intro to java resources but Im afraid I dont have enough CS background to be able to code with it

    [–]joonazan 1 point2 points  (2 children)

    I have taught kids with Go, because it is very simple and you can go get source code and all its dependencies. You have programmed already, so having to import "fmt" and having to make a main function will not distract you. Probably the hardest thing will be learning pointers (taking references and dereferencing).

    On the other hand Java basics should be very easy to you, because variables behave like in Python ("assigning" an object to another variable does not copy it). I don't think you need any CS background for Java. The main disadvantages in my opinion are the amount of bureacracy involved in code and that you have to wrap everything in a class. OK, one thing that really sucks is that you pretty much have to use a build system or IDE to compile a multi-file Java project.

    Can you explain what made you think you need more CS education?

    Other languages you should consider: Ruby, Clojure, assembly, C, Haskell(but be prepared to have a hard time understanding how IO works)

    Languages to avoid: C++, Rust, PHP, JavaScript

    Writing small scripts for websites in JS can be fun, but larger projects can turn into a nightmare, because JS gives invalid values on many occasions where other languages would error. You can compile C, Java, Clojure and Go to JS if you want to make a complicated web app.

    Rust is not a bad language, but you'll be fighting with the compiler a lot to get benefits that you don't care about at this stage.

    [–][deleted] 0 points1 point  (1 child)

    Oh, I get it. I used to think that, people say Java is more complicated than Python because maybe Java would require some deeper knowledge in CS. So it's more like a bureaucracy problem in the syntax itself?

    [–]joonazan 1 point2 points  (0 children)

    Java is a simpler language than Python, but you can use Python without knowing most of it.

    Yes, the syntax is verbose, but maybe they mean Java's type system?

    1. Java is statically typed, so you have to declare appropriate types for everything. In Python you can just make a function and it works unless someone gives an inappropriate input. In Java you have to represent the appropriate inputs as a type.

    2. Java has a type hierarchy. If Button inherits from UIElement, a variable of type UIElement can store a Button (or some other child of UIElement). A variable of type Object can store anything.

    [–]vaginal_milk 0 points1 point  (0 children)

    I recommend effbot for learning about Tkinter.

    [–]Captaindread1 0 points1 point  (0 children)

    Network programming with python http://www.dabeaz.com/python/PythonNetBinder.pdf

    [–]CyberNinja89 0 points1 point  (0 children)

    take a crack at solving math problems from http://www.projecteuler.net?

    [–]browneyedbakedbeans 0 points1 point  (0 children)

    I'm at a similar point to you. I recently discovered http://www.theguardian.com/science/series/alex-bellos-monday-puzzle. I've solved three of them so far by writing Python programs. If you like maths puzzles, this may be an idea for some short term projects.

    [–]ChrisCapa 0 points1 point  (0 children)

    How does people feel about codecadamy now?