Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Learning to program (Python) the right way?
6 points by jhacks on Dec 23, 2011 | hide | past | favorite | 5 comments
I'm looking to learn to program, the right way. I don't want to pick up bad habits and I'm hoping there is some good guidance out there that will help.

Currently I know the following: HTML, CSS, and some Javascript and jQuery. That's all front end though and I want to start to learn how to get the back end going.

While I want to understand the big concepts, I ultimately learn by doing. I get to a problem, and figure out through trial and error, research, or even questions here... and once it's solved, I've learned something. So, if I could learn by building up my startup, that would be great. The only thing with that though, I know that certain (if not many) aspects of my startup are not new and I don't want to approach writing things from scratch when it's already been done well (certainly better than I could currently manage) already and available in some framework (i.e. Django). However, I don't want to rely on frameworks either to solve all my problems... so I would like to find a balance between building efficiently (using/learning a framework) and learning to code from scratch (i.e. Python).

Anyway, help here would be greatly appreciated. Also, guidance on other topics in regards to building a website (since I know there is more than just the code) would be great. Thanks!



I suggest Zed Shaw's Learn Python the Hard Way (http://learnpythonthehardway.org/) which is free online and focuses on having you type the code and getting it to work. This is what I used to learn basic Python and it sounds like it fits your learning approach as well.


For an great introduction to programming in general try to learn http://mitpress.mit.edu/sicp/ or http://www.htdp.org/ Both are great books, but they require a lot of resilience if you want to get the most out of them.

One of the best introductions to Python is http://www.diveintopython.net/ but it's not in introduction to programming in general.

If you want both try: Core Python Programming http://corepython.com/ - but it's not free.

For learning a Python framework I would recommend the web2py book: http://web2py.com/book web2py makes you very productive, imo.

You can find a great list of free programming books here: http://stackoverflow.com/questions/194812/list-of-freely-ava...


Consider looking at well-written Python code. Try to understand exactly how it works.

Example, django source: http://code.djangoproject.com/svn/django/trunk/django/


Reading well written code is an excellent way to do so. The source code for Tornado is also quite clear https://github.com/facebook/tornado

Look into args and *kwargs and first class functions in python.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: