With the Mac Terminal practice out of the way, it is time to dig back in to learning Python. If I have to take any other deviations along the way I will take you along with me. We started the Python Discovery Sessions by looking at the tutorials that are on the Python website. I found these to be unclear for my tastes and opted for another approach one that Jason Stanley recommended. That said we will be going through Learning Python the Hard Way.[note]I really enjoyed the terminal practice. These Learning the Hard Way tutorials are very direct and acurate. I only had a couple of questions as opposed to other tutorials that have me scratching my head and wondering what I got myself into[/note]
So…here we are. A new day and a new tutorial. Spent most of the morning in sweet slumber and then worked on tilling the garden. Now my mind is fresh after a good day of manual labor and I am ready for an intellectual challenge. Here goes!
This is what we will be learning first:
- Reading and Writing
- Attention to Detail
- Spotting Differences.
So apparently like any new language we will be learning how to read it. From what I learned in the terminal practice, attention to detail is imperative, and like any good detective spotting differences is fun.[note] My wife buys those magazines from the check-out line at the grocery store…in the back there is a picture of some celebrity and an almost identical picture below it. You have to find the differences in the pictures. I love this game! By the way Where Is Waldo?[/note]
Before we begin I wanted to share the license for this book with you. I will make the link available to the book in its entirity for free, I may not always refer to the link in every post but I do want make sure I offer it at least once to you so that I can respect the wishes of the author who will be teaching us.[quote] This book is Copyright (C) 2010 by Zed A. Shaw. You are free to distribute this book to anyone you want, so long as you do not charge anything for it, and it is not altered. You must give away the book in its entirety, or not at all. This means it’s alright for you to teach a class using the book, so long as you aren’t charging students for thebook and you give them the whole book unmodified.[/quote]
You can find the book online at http://learnpythonthehardway.org/ Thanks Zed for the help…I certainly appreciate it.
Okay…so here we go!
In this first excercise I went in and put some of my new terminal skills to practice. Fixed Gedit so that it works for our purposes and ran a little code:[quote] Last login: Sat Apr 24 00:56:54 on ttys001
~ $ python
Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.
~ $ mkdir mystuff
~ $ cd mystuff
mystuff $ ls
# … Use Gedit here to edit test.txt….
mystuff $ ls
mystuff $[/quote] of course mine looks a little bit different but I got the gist of it.
And well folks…that is about all that I am going to do for today. Apparently my wife needs some attention and well…I want to give it to her. Word of advice…if you are going to start learning a new program…language…anything….get ready for little sleep. I have to get into it when my wife and kids are in bed. I don’t want too much competition and I realize that this is going to eat up a lot of my time already.[/note]
Until next time.