Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this questionI am a complete, total beginner in programming, although I do have knowledge of CSS and HTML.
I would like to learn Python. I downloaded lots of source code but the amount of files and the complexity really confuses me. I don't know where to begin. Is there a particular order I should look for?
Thanks.
EDIT: Sorry guys, I forgot to mention that I already have both the online tuto开发者_StackOverflowrial and a couple of books handy. I basically I don't quite understand how to "dismantle" and understand complex source code, in order to grasp programming techniques and concepts.
EDIT2: Thanks for the extremely quick comments, guys. I really appreciate it. This website is awesome.
Have you looked at these:
Python tutorial for total beginners?
What is the best quick-read Python book out there?
SO Python Book Search
I would recommend you understand the basics. What are methods, classes, variables and so on. It would be important to understand the constructs you are seeing. If you don't understand those then it's just going to be a bunch of characters.
To understand source code in any language, you first need to learn the language. It's as simple as that!
Usually, reading source code (as a sole activity) will hurt your head without giving much benefit in terms of learning the underlying language. You need a structured tour through carefully chosen small source code examples, such as a book or tutorial will give you.
Check Amazon out for books and Google for tutorials, try a few. The links offered by some of the other answers would also be a great starting point.
There is no magic way to learn anything without reading and writing code yourself. If you get stuck there are always folks in SO who will help you.
Donald Knuth suggests:
"It [is] basically the way you solve some kind of unknown puzzle -- make tables and charts and get a little more information here and make a hypothesis."
(From "Coders at Work", Chapter 15)
In my opinion, the easiest way to understand a program is to study the data structures first. Write them down, memorize them. Only then, think about how they move through program-time.
As an aside, it is sort of a shame how few books there are on code reading. "Coders at Work" is probably the best so far. Ironically, "Reading Code" is one of the worst so far.
If you don't have any experience in programming, even the simplest code might be too hard to understand. Just start reading the docs/tutorial (http://docs.python.org/tutorial/index.html) and write your own small apps. You'll get hang of it soon and will be able to understand what others created.
I would start with reading the Python tutorial. This wiki page looks good, too.
try python "Python in a Nutshell" it gives you from a to z in python..
however, python code is "eye-fiendly" clear and simple to read unlike other languages
http://books.google.jo/books?id=vpTAq4dnmuAC&dq=Python+in+a+Nutshell,+2nd+Edition+(O%27Reilly,+2006)&printsec=frontcover&source=bl&ots=AOQ5A-IdxA&sig=zh6PwVhjlNt5MRKYUZKl65h1goU&hl=en&ei=A7kgS8SiBouh4Qbd6e34CQ&sa=X&oi=book_result&ct=result&resnum=8&ved=0CB8Q6AEwBw
Maybe you have a project in mind that you want to code up? It's very hard to read what other people write, the best way to learn is to try something. Other people will have gone through the problems you will come across, and so why code is written the way it is may start to make sense. This is an excellent site to post questions, no matter how stupid you consider them.
精彩评论