4 ms·
I wrote this: http://learnpythonthehardway.org/book/ http://learnpythonthehardway.org/book/ It's free. Do this: 1. Use your current computer. It doesn't ma
by zedshaw 15y ago
I wrote this:
http://learnpythonthehardway.org/book/ http://learnpythonthehardway.org/book/
It's free. Do this:
1. Use your current computer. It doesn't matter if you have Linux, OSX, or Windows. What matters is that, right now, you want to learn to code, so you should go learn to code, not learn to setup a new OS.
2. Just use gedit. Don't use vim, vi, emacs, or any "hardcore" editor. On a Mac if you're using a non-English keyboard, use Textwrangler. Learning a new editor is not learning to code.
3. Start now, do what I tell you in the book. Type code in, do not copy-paste, make it run, fix it until it does, do the extra credit, then go on to the next one.
4. Other programmers will tell you to use their favorite tools, just ignore them. Just use gedit, Terminal (cmd on Windows), and python. That is all. Nothing else. Everything else is a distraction.
5. Finally, do it every night, for 2 hours a night, and take a break on one day. You'll be surprised how quick you can get through the book, and you'll get stuck sometimes, but keep doing it.
After that, move on to other more advanced topics and try to learn more stuff, but for now, just do this.
- creativeone 15y agoZed, thanks for the book, I just got started with it. I have heard that when done with the book, I still won't be able to program in Python. Can you elaborate on that? Also, what do you recommend after completing your book? I'm interested in building web apps.
- zedshaw 15y agoIn the 2nd Edition, I rewrote exercises 50, 51, and 52 to teach you to make a simple web app based on the game in exercise 41 and 42. I also rewrote 41 and 42 so that it's a little more complex and challenging. When you're done with the book, I say you can't really code yet because you lack experience actually using Python. You have all the syntax and tools, you just don't really know how to apply them. What I recommend now is you go through the Django Book 2.0 and do all the code in that book. Once you do that you'll have enough to start building your own stuff. I'd also say, whatever you make will probably suck for a while, but that's alright. Just keep making stuff, put it out there, get feedback from good coders, and improve.
- shareme 15y agoZed's right start with a non-IDE solution such as using a basic editor..as it forces you to think and get at the object-oriented abstraction of the programming language you are attempting to learn.
- theprotagonist 15y agoZed thank you, someone posted a link to your site last night and I think it is very right for me. I will use it. As per the Windows vs Linux debate - I have found most physics labs use either various Linux distros (Red Hat is super popular) or OSX. I myself have a MacBook Pro running OSX and so I just downloaded and will be using TextWranger as an editor to complete the lessons.
- bradleyland 15y ago"I have heard that when done with the book, I still won't be able to program in Python." Be careful about whose advice you take. There are a lot of programmers out there who are so far down the road to perfecting their craft that they can't see where they started. For a mature programmer, using powerful tools will aid them in expressing their complex ideas quickly. As a beginner, you'll experience a ton of "ah ha!" moments where an idea will come to you in code, rather than in abstract. It will start simple with data structures like dicts and will progress toward object-oriented structures. To say you won't be able to program when you finish LPTHW is to say that a 5th grader can't write. They're not going to write "The Great Gatsby", but they can write.
- espeed 15y agoA quote from Learn Python the Hard Way: "Warning Windows is a big problem for Python. Sometimes you install Python and one computer will have no problems, and another computer will be missing important features. If you have problems, please visit: http://docs.python.org/faq/windows.html http://docs.python.org/faq/windows.html (http://learnpythonthehardway.org/book/ex0.html http://learnpythonthehardway.org/book/ex0.html). Why waste time messing with it? In the time you spend fucking around with Windows, you could have set up a Linux system. And Linux is the OS more commonly used by startups and physics labs (which is why the OP wants to learn how to program).