Learning Python

Discuss how to write good code, break bad code, your current pet projects, or the best way to approach novel problems

Learning Python

Post by SevenSins on Sun Jul 26, 2009 11:18 am
([msg=27470]see Learning Python[/msg])

Hey everybody, I've just started learning Python like, 2 minutes ago. I was just wondering if anyone has any advice/tutorials they'd like to share. I'm not asking to be spoon fed, I know how much everyone hates that. I've already googled for Tutorials and have found some, I'm going to read them as soon as I'm done writing this. I was just wondering if anyone would like to give me a push in the right direction. Also, how long do you think it takes to learn this? I heard it could be learned in a matter of weeks.


Thanks to everyone that helps out, and thank you HTS for the amazing community.
SevenSins
New User
New User
 
Posts: 14
Joined: Sun Jun 28, 2009 9:51 am
Blog: View Blog (0)


Re: Learning Python

Post by E-5 on Sun Jul 26, 2009 2:34 pm
([msg=27485]see Re: Learning Python[/msg])

It would help to know why you want to learn. Not us, but you.
Think about a subject in that you really enjoyed in school. There was at least one person in that class that said, "why do we have to learn this?" However, you had a reason. Either you just liked the subject, you were curious, or the class gave you a skill that would empower you.

So are you just curious, want to feel empowered, or is there something about the python language that you just can't resist?

Sometimes though, this self assessment can be a deal breaker. Like in my C++ class I was all stoked because I was going to learn object oriented programming and after the class I was going to be able to sling out code for any kind of program I could think of. This didn't turn out to be the case and it left a bad taste in my mouth. Then I realized that with any thing that you learn, you have to figure out your goal and the best way to get there.

An example of this was the summer I wanted to learn the guitar. I bought a book, read it cover to cover, and yet I still couldn't jam along to my Hendrix CD. I learned every note on the fret board, chords, scales, etc. It just wasn't happening. So I got pissed off, but luckily in the fall when I went back to school I sat next to a metal head who was obsessed with his guitar. One day I just happened to ask him how he learned to play to which he replied, "...learn?" I said, "yeah, what books or classes did you take?" He basically told me that he was too busy playing his guitar to read about it and invited me over for a jam session. When got everything plugged in he asked me what songs I knew. Unfortunately I didn't know any songs because my background in music had trained me to learn the instrument and not songs. I showed him all the scales I learned and some other things I knew and he was just dumbfounded trying to figure out why I wanted to learn the guitar. Eventually it came out that I wanted to play some Hendrix tunes. Then a light shot on in his head, he ran to his room and got a CD, came back down, and popped it into the stereo. "Hey Joe" was the first song that came on. We listened to the intro riff a few times, figured it out, practiced it, played it with the CD, figured out the rest of the chords to the song, and I was playing Hendrix in a matter of minutes. Then he asked me what else I wanted to learn. It seemed so easy my mind just starting swimming. Because now all I had to do to learn something new on the guitar was listen to it, practice it, and refine it. Before the school year ended I was finger tapping, using a slide, and even writing my own songs.

So this lesson from high school I apply to anything new that I want to learn. And now that I'm 3/4 through my BS in IT I've gotten a lot more out of my classes because I set a goal and even after the semester is over I can keep sharpening my skills.

This is why those books that say "Learn programming in 21 days, 3 hours, half a nanosecond" are more harmful to beginners than a programming book with a title that says, " Learn programming by buying this book, reading tons of source code, writing a ton of your own code, reading a ton of your own source code, but don't forget to buy this book too cuz, I need to make a living as well!" But that book wouldn't be marketable.

So you could learn syntax in about a week. In fact, after I took C++ I blew through my VB.NET, Java, and C# classes because the syntax wasn't that much different and that's pretty much all the class was trying to teach.

The good thing about Python is that the learning curve for beginners is so low that they can get past that and start making more and more powerful programs. Also, since it's easy on the eyes, studying other peoples' programs is easier.

Hope that answer at least helps you stay motivated to reach your programming goal.
E-5
New User
New User
 
Posts: 4
Joined: Thu Jul 09, 2009 1:32 pm
Blog: View Blog (0)


Re: Learning Python

Post by SevenSins on Sun Jul 26, 2009 6:22 pm
([msg=27501]see Re: Learning Python[/msg])

I guess it would be empowerment, I want to learn it to improve my skills that I've gained from practicing on this site and be able to program things to my own needs.
SevenSins
New User
New User
 
Posts: 14
Joined: Sun Jun 28, 2009 9:51 am
Blog: View Blog (0)


Re: Learning Python

Post by E-5 on Mon Jul 27, 2009 10:19 am
([msg=27530]see Re: Learning Python[/msg])

Mkay that's a good start. Now you just need to make a plan of attack. Since you've got your goals you just need to flesh out the details.
Here's an example worksheet, if you want to call it that:

Goal 1: Empowerment through programming
-Learn the basics of Python
-Research python programs that do what I would like to do
-Translate what I've done on HTS into python code

Goal 2: Program things to my own needs
-Keep practicing the basics
-Research Python programs that do the things that I'd like to be able to do in the immediate future (3 to 4 months from now)
-Translate an idea I have into a Python program and have it reviewed by my peers


That should get you started. Modify it as needed then copy and paste it into a text editor, print out copies, post it where you will see it often, and most importantly...do it.

Once you feel more comfortable with it I can send you some source code from my C++ class. Even if you can't make heads or tales of the source code it's well documented so you'll know what it going on and will have enough info to translate it into Python.

Good Luck
E-5
New User
New User
 
Posts: 4
Joined: Thu Jul 09, 2009 1:32 pm
Blog: View Blog (0)


Re: Learning Python

Post by Defience on Tue Jul 28, 2009 5:01 pm
([msg=27606]see Re: Learning Python[/msg])

Here are 2 good sites for beginners, the first one will even walk you through downloading and installing Python as well as getting started with it.
http://coolnamehere.com/geekery/python/pythontut.html
http://wiki.python.org/moin/BeginnersGuide
User avatar
Defience
Addict
Addict
 
Posts: 1281
Joined: Thu Jun 12, 2008 3:16 pm
Blog: View Blog (0)


Re: Learning Python

Post by Chem_Burn on Sun Aug 02, 2009 11:29 pm
([msg=27798]see Re: Learning Python[/msg])

Another great guide that I found for Python is "Jump into Python". If you google it, I think it brings up the jumpintopython.com website where you can download the guide as a PDF file. Hope it helps.
Chem_Burn
New User
New User
 
Posts: 1
Joined: Sun Aug 02, 2009 11:16 pm
Blog: View Blog (0)


Re: Learning Python

Post by code2004 on Mon Aug 03, 2009 4:14 am
([msg=27807]see Re: Learning Python[/msg])

Umm... The Python homepage has a link to the documentation with the best tutorial out there http://docs.python.or/dev/3.0/. Remember, you will need to persist if you intend to learn a language to perfection ^^.

Code2004 // Connor
Image
.............................H..o.....i..l.....C..u..o..r..e.....S..p..e..z..z..a..t..o.............................
User avatar
code2004
New User
New User
 
Posts: 36
Joined: Sat Jun 13, 2009 5:23 am
Blog: View Blog (0)



Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests