11 Replies - 1401 Views - Last Post: 11 October 2010 - 04:52 AM Rate Topic: -----

#1 tnbrewer83  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 11
  • Joined: 04-October 10

The best way for us new guys?

Posted 07 October 2010 - 06:50 AM

So I am trying to learn Python. I have found a bunch of free (legal) sources to read and do for the simple syntax and even Tkinter. But, what is really the best way to kick off learning any language?

I was told once by a friend, "The way I learned VB was by reading the code of someone else, tweaking things here and there, and watching the results." I thought this was an interesting approach. To start with simple and small programs, read the code, try to figure out what is happening by tweaking things here and there.

But then, there are all these publications. I know one needs to know what the syntax is, but can't you learn it in the described method above? Any thoughts as to what might be a good way to really get started for someone who could devote about an hour-a-day towards learning, and another hour towards trying?

p.s. I am sure there have been similar to this, but my searching skills are kind of lacking. So I apologize now if this is a repeat topic. Maybe this has been discussed elsewhere and someone could point me to there?

Is This A Good Question/Topic? 0
  • +

Replies To: The best way for us new guys?

#2 Brewer  Icon User is offline

  • Awesome
  • member icon

Reputation: 179
  • View blog
  • Posts: 1,044
  • Joined: 14-June 10

Re: The best way for us new guys?

Posted 07 October 2010 - 06:53 AM

I am reading Learning Python by Mark Lutz right now, it was a good bit of change but I think it was worth it. It is a great book! The beginning is pretty dry and boring, but once it gets past that it's great.
Was This Post Helpful? 0
  • +
  • -

#3 Motoma  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 452
  • View blog
  • Posts: 796
  • Joined: 08-June 10

Re: The best way for us new guys?

Posted 07 October 2010 - 07:02 AM

I learned Python by reading through Dive Into Python. It, and Dive Into Python 3 are fantastic primers to learning your way through the language, and I doubt that anyone here would discourage you from using it.
Was This Post Helpful? 0
  • +
  • -

#4 tnbrewer83  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 11
  • Joined: 04-October 10

Re: The best way for us new guys?

Posted 07 October 2010 - 07:20 AM

View PostJambr, on 07 October 2010 - 05:53 AM, said:

I am reading Learning Python by Mark Lutz right now, it was a good bit of change but I think it was worth it. It is a great book! The beginning is pretty dry and boring, but once it gets past that it's great.


I plan on going and buying that book this weekend. You recommended this to me in another post... I just had to wait till I got paid! :bigsmile:

View PostMotoma, on 07 October 2010 - 06:02 AM, said:

I learned Python by reading through Dive Into Python. It, and Dive Into Python 3 are fantastic primers to learning your way through the language, and I doubt that anyone here would discourage you from using it.


I have heard about this as well, but did you start real coding with it, or did you get to read some others codes and knew what was going on?
Was This Post Helpful? 0
  • +
  • -

#5 Motoma  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 452
  • View blog
  • Posts: 796
  • Joined: 08-June 10

Re: The best way for us new guys?

Posted 07 October 2010 - 08:28 AM

View Posttnbrewer83, on 07 October 2010 - 08:20 AM, said:

I have heard about this as well, but did you start real coding with it, or did you get to read some others codes and knew what was going on?


I dove right in and started programming. I find it difficult to abstractly learn to program if I have no real goal in mind. My first project was building an PDP11 emulator, and Python was an excellent choice.

One of the hurdles of learning Python from other people's code is that you'll find smatterings of "Pythonic" code. These are the "syntactical sugar" of the language that assist programmers in performing complex tasks in small amounts of code.

For instance, take a common piece of code:
even_numbers = [i for i in range(100) if i % 2 == 0]



The code above will return the list of integers between 0 and 99 (inclusive) which are evenly divisible by 2. Unfortunately, a search through the Python documentation for for loops, conditional statements, and lists will not show you anything resembling that code.
Was This Post Helpful? 1
  • +
  • -

#6 Brewer  Icon User is offline

  • Awesome
  • member icon

Reputation: 179
  • View blog
  • Posts: 1,044
  • Joined: 14-June 10

Re: The best way for us new guys?

Posted 07 October 2010 - 08:39 AM

Honestly, the Python documentation is about as useless as is possible. I have heard that Dive Into Python is great, but I haven't read it. However, I heard it was more focused towards those who are moving to Python from another language, rather than learning Python as their first programming language.
Was This Post Helpful? 1
  • +
  • -

#7 tnbrewer83  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 11
  • Joined: 04-October 10

Re: The best way for us new guys?

Posted 07 October 2010 - 09:08 AM

Thank you all for the help!
Was This Post Helpful? 0
  • +
  • -

#8 Brewer  Icon User is offline

  • Awesome
  • member icon

Reputation: 179
  • View blog
  • Posts: 1,044
  • Joined: 14-June 10

Re: The best way for us new guys?

Posted 07 October 2010 - 09:11 AM

No worries, feel free to come back and ask more questions!
Was This Post Helpful? 0
  • +
  • -

#9 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2874
  • View blog
  • Posts: 11,047
  • Joined: 15-July 08

Re: The best way for us new guys?

Posted 07 October 2010 - 02:30 PM

My favorite Python book by far is Core Python. Everything in it is very well explained, it's thorough, and it covers a wide variety of topics. Check it out! Actually, I suppose that I could lend it to you, neighbor... :P
Was This Post Helpful? 2
  • +
  • -

#10 Brewer  Icon User is offline

  • Awesome
  • member icon

Reputation: 179
  • View blog
  • Posts: 1,044
  • Joined: 14-June 10

Re: The best way for us new guys?

Posted 07 October 2010 - 03:30 PM

I wasn't aware that there was a Core series for Python. But I am still sticking to my guns and saying Learning Python is a good book, but I will decide after I read Core Python. :P +Rep for the book recommendation Dogstopper.
Was This Post Helpful? 0
  • +
  • -

#11 Eric115  Icon User is offline

  • coderさん
  • member icon

Reputation: 63
  • View blog
  • Posts: 696
  • Joined: 19-January 09

Re: The best way for us new guys?

Posted 11 October 2010 - 04:03 AM

Python was my first programming language (I did HTML previously) so the book I used was 'Hello World' by Warren and Carter Sande. The book is aimed more at younger people, but the approach to the coding was very good and I learned heaps from it. It gives you enough on most topics to be able to use it and then some background info. At the end of each chapter it has little challenges to do with what the chapter talked about and has the answers in the back of the book (if you need them). As you move on in the book it begins to give you less code and teach you your own approach to a challenge. It can be an E-book or normal book and you can download all the code, python editors and modules in one package from the website. The book was very good.
Was This Post Helpful? 0
  • +
  • -

#12 baavgai  Icon User is offline

  • Dreaming Coder
  • member icon

Reputation: 5882
  • View blog
  • Posts: 12,760
  • Joined: 16-October 07

Re: The best way for us new guys?

Posted 11 October 2010 - 04:52 AM

I agree with your friend, I tend to look at a lot of code examples. However, just looking isn't enough; you need a be involved.

You need to write a program, it doesn't really matter what. Find a piece of code that prints even numbers; make it print odd. You want to do a simple card game? Is to code too complex; make it make sense to you.

Programing is the practice of manipulating symbols. Reading about it is like reading a book on chess. Sure, there are lots of good ideas of other people, but it's not like you're actually playing. You might never understand what someone else's thought process is, but you are master of your own.

Manipulate your own symbols. Make silly little puzzles for yourself and then solve them. No effort is ever wasted; failure teaches more than success.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1