How I am learning Python from Scratch

Obligatory Python reference

First the context – I come from a finance major. My background in application programming is close to zero. I am probably a typical ‘business’ guy with no technical skills and no MBA.

At my last startup, I spent approximately 1.5 years on and off working in T-SQL on SQL Server 2005/2008. I’ve written hundreds of stored procedures during that period.

Now, I am teaching myself to code in Python with the aim of creating a databound web application all by myself. I have found that a lot of Python books just ‘talk at you’ which I don’t particularly like. I learn most when I’m hands-on with the tutorial so my learning process has a lot of ‘doing’. Traditionally, the HeadFirst series of books are good at this kind of teaching but I really didn’t like their book on Python. (Their HTML/CSS one was brilliant though)

This is the current learning process that I used:

  1. Read Learn Python the Hard Way. This is for a complete beginner and it forces you to learn by doing. I have to admit, I skipped some parts because author got really into his game example. Also note that some basic concepts like list comprehensions are not mentioned in his book.
  2. Having done that, I tried applying my newfound knowledge by practising exercises from the CS department at the Michigan State University here . I found their site randomly. Whilst doing the questions, I had to ask a lot of basic questions on Stackoverflow like this and this. Some of my questions started to get down voted because it seemed as if I didn’t do my research/homework properly. There were also some comments saying Learn Python the Hard Way is not an ideal starting book. So with that, I realised I had to strengthen my basics and read other books and tutorials
  3. The next beginner book was Think Like a Computer Scientist. I liked this book a lot but it does assume some basic prior knowledge in Python. I followed up by doing questions from the MIT open Python course which can be found here. I did all the questions there except for the last bit on creating a Tetris game. I wasn’t too keen on that so I skipped it.
  4. In between the books, I also watched some video tutorials. I found thenewboston good in explaining OOP concepts. He has a very laid back relaxed approach to his tutorials and his videos are all in bite-sized chunks.
  5. Currently, I am internalising all my knowledge by doing exercises. I found a good one at Pyschools.com. I like the fact they have a leaderboard game mechanic template on their site. There are 165 questions in total and so far only 1 dude could be asked to finish all the questions. I’m skipping all the questions about matrics just because I don’t think I would be needing that knowledge in creating a webapp. Are you purists flippin’ out now?

So far, I have devoted on an average of 15 hours per week for the last 3-4 weeks. Once I finish the questions at Pyschools, I would consider myself an ‘expert beginner’.

It’s probably worth noting that I spent 1/2 days dabbling in Django. Because I was using a windows machine, I spent a lot of time messing about the configuration and setting it up. Once I did though, I realised I wasn’t good enough in Python to fully understand what was going on.

At this juncture, I am probably going to attempt a simple OOP programme with classes and methods. Following which, I will attempt to learn Django again and see how it goes. If I feel my Python is still not up to scratch, I will probably attempt Dive In Python 3 as a lot of Stackoverflowers and HN-ers have been recommending it.

Hope this helps the next wannabe Pythonista (Yes, that’s what they call themselves). Feel free to add resources and recommendations to the learning process in the comments.

Part 2

———-

Some other helpful links:

http://stackoverflow.com/questions/4800919/which-are-good-hands-on-learn-by-doing-books-about-python

http://projecteuler.net/index.php?section=problems

http://codingbat.com/python (not tested)

http://www.awaretek.com/tutorials.html (not tested )

http://www.pythonchallenge.com/ (not tested).

http://openclassroom.stanford.edu/MainFolder/CoursePage.php?course=WebApplications (Ruby)

About these ads

31 thoughts on “How I am learning Python from Scratch

  1. Pingback: Tweets that mention How I am learning Python from Scratch | pragmaticstartup -- Topsy.com

    • Hi Zed! Thanks for dropping by! Generally speaking I really liked your teaching but I have the following suggestions:

        -The part on truth tables was initially quite confusing to me. Would be great to have an example to illustrate an example and how the truth tables were applicable to programming. FYI, there were some comments on Stackoverflow that disagreed with the memorisation aspect of that exercise. Might be just two different schools of thought on this.
        -Too much typing in some of your examples. Exercise 41 particularly guilty of this I think.
        -Lastly, maybe include list comprehensions? I asked a question on SO related to list comprehensions (I didnt know what it was at that point in time) and got down voted because the community thought it was a relatively easy.
    • A section on list comprehensions would be nice. Maybe an intro to tkinter or pygame at the end of the book? Most tkinter material I’ve found is either outdated, or not presented with enough information to make it useful to an intermediate beginner like myself.

  2. Zed,

    you should lose Django. Not that it’s bad, no. I love it. But if you’re learning to code, then messing around with Django or any web framework is only going to make your life more difficult.

    Also, it wouldn’t hurt you to learn some Java or Objective-C. Dynamic typing in Python may hide some subtleties that you should be aware of. Python can hide a lot under the hood that it would be good for you to know about.

    Just my 2cents. Also install a *nix system. You can easily install Ubuntu directly from Windows. The different path syntax alone is reason enough to drop Windows for development, not to mention grep, ssh, or svn the likes of which you’re gonna have trouble setting up in Windows. It’ll make your life a lot easier.

  3. Wow. What can I say! It could almost be me writing your blog! Seems like we both had the same idea, and approached it the same way! (although I am slightly older!).

    Just finished Zed’s excellent book (yes, i skipped some too!) and I’m glad I found your blog as the links are just what I was looking for.

    Will be interesting too see how you get on.

    Good Luck!

    Dave

  4. I’m enjoying what you have written so far. I’ve been trying to convince myself that having friends that can code is good enough but I think my curiosity will probably get the better of me. I enjoyed your reasoning for choosing Python and I may follow in your foot steps.

    Cheers.

    • Having people around you who knows the language definitely helps. From what I understand, RoR has a steeper learning curve attached to it. But, this is something most people seem to leave out, deployment on RoR seems to be much easier and deployment is a royal pain in the ass (at least for me so far).

  5. Pingback: How I am learning Python from scratch Part 2 | pragmaticstartup

  6. Pingback: Non-techie Guide to setting up Django, Apache, MySQL on Amazon EC2 | pragmaticstartup

  7. Why not learn from the tutorial included in the python docs? Youe questions on SO were downvoted because you seemingly ignore advice to read the python documentation. Here’s a list of all the standard builtins and operations you can do on them: http://docs.python.org/library/stdtypes.html

    p.s. If you had read the docs, you would’ve realized there’s a built-in function called ‘sum()’ which sums an iterable.

    • Python docs are probably the best starting point. I didn’t like it because it was hard to understand for me. I likee to learn whilst following examples which made Zed Shaw’s Learning Python the Hard Way a much better introduction. He didn’t cover list comprehensions in my book hence my noob question.

  8. Pingback: Learning Python for Finance « xprimexinverse

  9. Hi just bought a ‘Raspberry Pi’ to tinker with. I am quite good with computers but the one thing I don’t know is programming. I purchased ‘Raspberry Pi for beginners’ & Simon Monk’s ‘Programming the Raspberry PI’. Python is not really sinking into me from these books and I am not really interested in making games!

    • Are you looking to learn Python or just mess around with your raspberry pi? I can think of other ways to learn python. Not too much experience with Raspberry Pi I’m afraid.

    • In that case, I would say start with learnpythonthehardway. See how you feel about that. If you’re still keen and you wanna make a webapp, then do djangoproject.com next. In between, pick up Head First HTML and CSS and you should be good to go!

      Sent from my iPhone.

  10. Pingback: Learning Objective-C | pragmatic startup

  11. Awesome blog you have here but I was curious about if
    you knew of any community forums that cover the same topics talked about
    here? I’d really love to be a part of community where I can get suggestions from other experienced individuals that share the same interest.
    If you have any suggestions, please let me know. Appreciate it!

  12. Hello ‘ wORLd’ :))
    Hi My name is Daniel
    If you alow me i have something to say .
    Thank you !
    I love computer and i will always do but i have a problem ..:(( i don’t know how to learn ..i try to learn and to understand the meaning of programing or ” COMPUTER LANGUAGE” but until now nothing goes into my head … im on tutorials every day hour by hour ..BUT NOTHING …
    My brian is perfect i remeber everything about other stuff ..but when is about computer programing ..NOTHING ..Now i use Kali linux ‘people say is better to learn ‘ before i use WINDOWS but normal to advanced user..nothing special..
    My question is ..HOW CAN I UNDERSTAND THE MEANING OF COMPUTER LANGUAGE ? HOW CAN I LEARN ..I DON’T HAVE MONEY TO INVEST IN SCHOOL ..I KNOW COMPUTER IS THE FUTURE AND IM YOUNG BUT I HAVE ALMOST 3 YEARS WITHOUT LEARNING ANYTHING ..SOMETIMES I GOO DEPRES BECAUSE I CAN’T RICH TO MY GOAL ..:(( I START TO READ ABOUT BRAIN DRUGS AND STUFF LIKE THIS IS NOT GOOD ..IF someone will asck me what is the difference betwen java c c++ c# UNIX LINUX JAVA SCRIP PHP .. I DON’T KNOW ..
    The reason i want to learn this is because i like electronics ..like arduino ..I LIKE TO BUILD STUFF ..FROM JUNKY ..:((( I DON;T KNOW ARDUINO EITHER ..
    PFF IM SO BAD ..I HAVE TO MANY THINGS IN MY HEAD ..

    Please i need an advice ..
    Thank you guys ..and sorry for my mess up text ..Thank you for understanding …
    RESPECT

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s