Monday, January 23, 2012

Python from scratch


I work 14 years in the High-Tech industry as QA doing manual testing in a manager position.
After so many years I reached to a point where I want to do something else, to write some code like I planned for myself in the past but somehow life led me to a different path in my career.

Last time I wrote some code was at university about 10 years ago and since then I only maintained some scripts mainly Perl and Basic.
So I start reading some Hacker-News posts and Job listening ads to see which language is needed today, what will be easy for me to re-start my code skill after so many years out?
Finally I read this post by eddy chan and found myself fit into this story and decide that I will learn Python.

I hope my journey will inspire others like me to do the same.
I hope my journey will eventually make me controlling the language.
I hope this journey will create for me new opportunities to come.

So I clicked the first link that leads to Google's Python class and here it is my journey into python from scratch using Google Class:

The first tutorial page is of course the Landing Page- Doesn't need any skill yet, takes few minutes to read.
Second lesson, Python Setup- Took me around 2 hours since I thought to run it on a Virtual-Box setup but somewhere in the middle I realized it won't be comfortable to run notepad++ and command-line on one screen so I better use my 2 wide screens on my desktop. 
Installing Python was easy and fast and I was ready my next challenge.

Third lesson, Introduction- I Read about Python Interpreter (Nice feature) and did some debug like tricks, also read some notes about Python compare to other languages.     
Later I did the first examples from this page and found myself thinking how easy it is compare to my c++ studies in U of TLV (OpenU). 
My first real obstacle was understanding the boilerplate __name__  ==  '__main__' (the truth is that I still not really understand why it is so complicate but I am a good student and do what I was asked to do).
After reading some forums I understood why and how important is to use indentation correctly and that Google recommends to use <space> for better indentation, I prefer to use <tab> as I see the spaces better and clearer.
Anyway, reading this section and let the info drill into my brain took me some time and effort and it was late at night. I knew that in few hours my 2 baby boys will wake up for a new day that needs my full attention and so I called it the night and went to sleep (finally)

Next day I was more excited than the day before and couldn't wait for the night to come, after work and after putting my 2 boys to sleep I opened the
4th lesson, String page- This is actually the first page where dealing with real code, handling strings and manipulate them. 
Also learnt the if Statement which is very important for any code. 
It took me to learn this page around 3 hours and then I call it the night.

After finished to learn strings I felt ready to do my first exercise- 7 functions which I was asked to write.
I decide to do it early in the morning when I am awake and not tired after long day at work and dealing my children. So I took the exam on Saturday (Shabbat) and to my surprise finished it after 2 hours successfully.

And now I am here, tomorrow probably I will start the next issue to learn- Lists.
So far my impression from Python is that it is easy language for beginners, it is easy language to convert from C++ like I did, and that I find the internet very helpful with questions I had during my studies so far.
Stay tune for more lessons to come of my journey into Python.


30/Jan/2012- Click here for Part 2

19 comments:

  1. Best of luck, you made a good choice!

    ReplyDelete
    Replies
    1. Thanks Greg, it feels like a good choice.

      Delete
  2. Interesting. I basically am in yhe process of doing the same thing. MIT has a great ocw python class, im half done. Also check out project euler. Doing those problems is fun and forces you to really learn proper syntax. .. forced practice.

    ReplyDelete
    Replies
    1. Any On-Line Class you can share with me and others?

      Delete
  3. I would also recommend to look out at 50apps.org

    The main idea around 50 apps is to improve coding by working on 50 apps for 50 weeks. most of the people working on the projects are beginners just like you and me and I would definitely recommend to work on atleast some of them.

    ReplyDelete
  4. This should also help: http://learnpythonthehardway.org/

    ReplyDelete
    Replies
    1. So many linked this site, definitely going to try it as well.

      Delete
  5. I had the same experience with Python. Its a great language for beginners. Take a look at this page: http://www-inst.eecs.berkeley.edu/~cs61a/sp12/ Its a UC Berkeley course which uses SICP like textbook to teach the language.

    ReplyDelete
    Replies
    1. Thanks a lot. lots of reading ahead of me :-)

      Delete
  6. i'm also learning pyhton/django. i've knowledge on c++, java , RoR and they really helpful in letting me to understand python very well.

    ReplyDelete
    Replies
    1. Thanks for sharing, hope to gain some knowledge from you in the future.

      Delete
  7. You should also checkout http://codingbat.com/ its developed by the same instructor that did Googles Python Class, Nick Parlante. Like anything in life if you want to get better at something it requires practice, practice, practice.

    The site gives you a chance to work through problems from a beginner level and you slowly level up as you complete the different exercises. It links you to documentation for each section as well which is great if you forget how to do a If statement, list, or defining a function, etc.

    Good luck in your quest, don't get overwhelmed, small increments leads to great success.

    ReplyDelete
    Replies
    1. Such a great site! Really thank you for this link.

      Delete
  8. I got so many comments and read so many links, thanks guys.
    Now i really should continue on my studies and will report next time.

    Keep on following and don't forget to drop me a note/comment.

    print 'Thanks HN'

    ReplyDelete
  9. Replies
    1. Still getting comments here. wow!
      Keep on following
      -Hod

      Delete