Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
A Gentle Introduction to Programming Using Python (ocw.mit.edu)
68 points by Rod on Jan 18, 2009 | hide | past | favorite | 25 comments


OpenCourseWare is such a cool idea and has a ton of potential.

It's really unfortunate that 95% of the courses that have been put up don't have nearly enough content posted online to be of any use. Just take a look at the lecture notes and labs posted for this course. You're far better off just looking up some random python tutorial online.

You can often find videos of entire course lectures posted online by using google video. Or if you're looking for an academic conference style crash course, check out http://videolectures.net/


The Yale courseware is much better. Look at this Game theory lecture series that I recently "took" http://oyc.yale.edu/economics/game-theory/contents/downloads

You get the videos or mp3 , transcript of the talk, pdf of the blackboard. The tests and the answers to the test. This is just excellent.



The value of most courses isn't in the lecture notes or assignments. Instead, it's in the textbook and feedback received from assignments. Neither of these can be published online on open courseware, in most cases.


"it's in the textbook and feedback"

The second half of this is hard to solve (feedback), but the first half (textbooks) is solvable.


The textbook for this course is actually online, so in this instance the problem's solved. They're using the free book "How to Think Like a Computer Scientist," by Allen B. Downey.

Check it out here: http://www.greenteapress.com/thinkpython/thinkpython.html


No kidding. Here at caltech, several ofthe students don't even go to the lectures.


As a non-technical founder trying to pick up coding i will definitely be working through this.

I've also found http://code.google.com/edu/curriculumsearch/ to be a good resource for self learning materials.


I don't know how useful that opencourseware will be to you. There are other free resources on the Internet. http://www.freenetpages.co.uk/hp/alan.gauld/ This is a free e-book written by a professional programmer that teaches basic programming, primarily using python. For more info on learning Python, there are lots of resources such as the official tutorial at the Python web site: http://docs.python.org/tutorial/ There are other tutorials too, such as Python Rocks!: http://personalpages.tds.net/~kent37/stories/00020.html Also, the free e-book http://diveintopython.org/ "Dive Into Python" (intended for experienced programmers), and http://www.ibiblio.org/swaroopch/byteofpython/read/ "A Byte of Python".


The Python tutorial linked on the site looks very well laid out and easy for beginners to learn from:

http://www.openbookproject.net/thinkcs/python/english2e/inde...


I believe that's the older version of what's now "Python for Software Design": http://www.greenteapress.com/thinkpython/

The dead-tree edition is slated for March (which I'm definitely picking up) and the manuscript is free on the site.


Help me, HN: I really want to pick up elementary programming, and I've been convinced that Python is the right way to go. But when I tried to learn SQL, I just got completely flummoxed. Is this even worth the try or is the whole "some people just can't get programming" true enough that I can do better things with my time?


I think python (& django) is a great way to go. I'm relatively new to programming as well, and find that I'm able to get what I want to done. Try the book used in the course that's the focus of this thread, which you can get for free here: http://www.greenteapress.com/thinkpython/thinkpython.html


A quick look at your submissions/comments/profile reveals that you're clearly not in the 'just won't get it' category. Some get things faster than others, but the key is to keep at it; soon things will start making more sense.

Eric Raymond's advice might be helpful (you've picked the right language to start with!) http://www.catb.org/~esr/faqs/hacker-howto.html#skills1

I wouldn't worry about SQL right now. If you feel overwhelmed, drop it and pick it up again after a week or two. Repeat until unnecessary.


I'm going to get beaten for even suggesting this, but I would say start with C. It's hard, it's time consuming, it takes a ton of (error prone) code to do anything useful. But after a few months you will have a solid grasp of how a computer operates on the hardware level. It's hard to overstate how important this is.

Then learn Python/Ruby/Lisp/whatever.


I first started programming with C and had a terrible time. I didn't really get anywhere and went through a cycle of repeatedly giving up and them returning to it after having a break.

I don't think it's a good way to start programming but I would encourage people to learn it at some point because of the reason you gave.

I'd also suggest that the best way to get to grips with C is to learn assembly with a simple processor at the same time. People always seem to get stuck on pointers etc and that's easy to understand when you know a processor's addressing modes. Plus, it's always fun to use gcc to output (unoptimized) assembly code and compare it to what you would have written.


I'm probably biased here, but I honestly can't imagine coming to grips with the way python handles variables without thinking of them as pointers and references (i.e. mutable vs. immutable, deep copy vs. shallow copy etc.) It would just seem to be a bunch of random special cases unless you know the machinery underneath.

But definitely, C can be very frustrating. It takes weeks or months before you can do anything actually useful (not just nerdy fun, like calculating pi or something.) That being said, how do you explain the difference between an array and a linked list to someone who only knows python? to take a trivial example. Sure, you could, but it's extremely unintuitive. Whereas with C you're so close to the hardware that the distinction is obvious.


While I agree that C is a great way to learn how the computer really operates, it isn't the first language that jumps to mind when I think "elementary programming."


I wonder how many C programmers started with it as their first language.

For the OP, I would suggest picking up python or ruby. And focus on doing something fun. If you like graphics, pick up Processing. Find interesting code on the net and tweak it.


You are the only expert on what's right for you.

SQL makes little sense as a first language, so don't extrapolate from that experience.


Python and web.py is the way to go. I cut my teeth learning python with that wonderful mini framework.


web.py is a lot of fun, isn't it? My favorite part is that you can fit the whole app in one file, if you want to (since templates, database models, etc. are all optional). It's the Python web framework that gets closest to the PHP experience of instant results.

Django is probably a better choice for jumping right into CRUD apps and numbing the pain of SQL, though. There's more to deal with up front, but you have a more complete system after the first hour than you do with web.py.


Word, I love web.py's flexibility as you have stated you can fit the entire app into one file. Or you can break it down to many pieces. I tend to favor the latter as it allows me to structure the app the way I want.


Oh they used How To Think Like a Computer Science. Excellent book for learning the Python. I especially love the chapter about fruitful functions. Plenty of useful tidbits to pick up from this book.


upmodded for the priceless xkcd. and yes, of course python. Just started.




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

Search: