Bitcoin Forum

Other => Off-topic => Topic started by: vite on August 01, 2013, 12:21:44 PM



Title: Learning python
Post by: vite on August 01, 2013, 12:21:44 PM
I have decided to take up a new hobby, meaning gonna learn something new.
So I will be learning python language.

I was wondering if a new base to start learning is the "learn python the hard way" a good way to get the basics of the language?

I got bored of browsing through wikipedia.

OP is not a programmer


Title: Re: Learning python
Post by: jackjack on August 01, 2013, 01:20:11 PM
I learnt Python by forking Joric's pywallet
Maybe you can learn it by forking my fork ;D


Title: Re: Learning python
Post by: KgBC on August 01, 2013, 02:30:24 PM
I learnt Python by forking Joric's pywallet
Maybe you can learn it by forking my fork ;D
I'm sure: THAT is the hard way :)
I don't know the book, but that's the way I would do:

First a question:
* are you already a programmer, and know what object oriented means?

If not, I would:
* get this in mind: programming is often try and fail. DONT GIVE UP if it doesn't run on the first, second or 30th try.
* take breaks if it's getting mind blowing.
* start with understanding procedural programming (not for use, just to know what programming was years before)
* try to get rid of the idea of objects / object oriented programming (this is what you will use most of the time)
--> these two doesn't have to be in python, a paper and a pencil, and taking notes what you read on the web is good enough.

If you are already a programmer (or if you finished the first):
* think of a small problem you want to solve, e.g. an simple egg timer, whatever. do KISS (keep it simple and stupid)! No fancy stuff!
* try to solve it

As soon as you have enough experience, do fancy things:
* learn about async programming, signals, twisted
* do graphics and game development
* do whatever you like :)

Congratulations, you are on the way to a good programmer!


Title: Re: Learning python
Post by: jackjack on August 01, 2013, 03:02:26 PM
I learnt Python by forking Joric's pywallet
Maybe you can learn it by forking my fork ;D
I'm sure: THAT is the hard way :)
I don't know the book, but that's the way I would do:

First a question:
* are you already a programmer, and know what object oriented means?

If not, I would:
* get this in mind: programming is often try and fail. DONT GIVE UP if it doesn't run on the first, second or 30th try.
* take breaks if it's getting mind blowing.
* start with understanding procedural programming (not for use, just to know what programming was years before)
* try to get rid of the idea of objects / object oriented programming (this is what you will use most of the time)
--> these two doesn't have to be in python, a paper and a pencil, and taking notes what you read on the web is good enough.

If you are already a programmer (or if you finished the first):
* think of a small problem you want to solve, e.g. an simple egg timer, whatever. do KISS (keep it simple and stupid)! No fancy stuff!
* try to solve it

As soon as you have enough experience, do fancy things:
* learn about async programming, signals, twisted
* do graphics and game development
* do whatever you like :)

Congratulations, you are on the way to a good programmer!

Indeed, his post made me think he already was a programmer. Anyway good tips.
If OP isn't a programmer I wouldn't advise him to look at OOP though. The need of the concept will come by itself once he reads a bit about it.
I never used OOP until recently as I never needed it before.


Title: Re: Learning python
Post by: KgBC on August 01, 2013, 09:29:32 PM
Indeed, his post made me think he already was a programmer. Anyway good tips.
If OP isn't a programmer I wouldn't advise him to look at OOP though. The need of the concept will come by itself once he reads a bit about it.
I never used OOP until recently as I never needed it before.
Well, yes, OOP is hard to understand in first place. BUT it is state of the art :)
So learning programming means learning oop fairly fast. Not in the first place, but as soon as possible. There are good explanations about OOP around, I dont gave links because I think it is better to search and find what you are after currently then follow a given path wich may not be yours :)

As soon as projects move forward you'll die without OOP. It's just silly to do more than a 50 loc script without oop in my opinion.
And Thanks for the 'good tips' :)


Title: Re: Learning python
Post by: vite on August 03, 2013, 11:07:23 PM
starting lesson 5 of http://learnpythonthehardway.org/

so far so good.


Title: Re: Learning python
Post by: Mike Christ on August 03, 2013, 11:10:38 PM
starting lesson 5 of http://learnpythonthehardway.org/

so far so good.

Good luck!  I'm still learning python myself.  I'm still trying to figure out why I need dictionaries and arrays and junk, but I've otherwise been doing ok, making simple text games with different rooms.


Title: Re: Learning python
Post by: naypalm on August 04, 2013, 01:05:25 AM
I learned from experience. Now I run a (crappy) search engine with python as the backend.

Protip: Buy a Raspberry pi and get creative!


Title: Re: Learning python
Post by: vite on August 06, 2013, 12:31:48 PM
Ok, I'm still in the very very early steps, compare it to a baby that is less than a month old programming wise.
But I was reading that python has 2.x and 3.x, I think the book I'm learning from is based on 2.x, should I be worried?


Title: Re: Learning python
Post by: jackjack on August 06, 2013, 12:48:23 PM
Not at all
Just don't ever look at Python 3 for months

It introduced incompatibilities with Python 2 but they both have the same features


Title: Re: Learning python
Post by: FirstAscent on August 06, 2013, 04:04:46 PM
Well, yes, OOP is hard to understand in first place. BUT it is state of the art :)

Sort of, I guess.

I think Lisp macros are more state of the art than OOP, but Lisp has been around for 55 years. Lisp macros are Lisp functions that you write which are in your program, yet they run at compile time (not run time), and what they do is dissect your macro calls and reconstruct them into whatever code you want, which then runs at run time. And Lisp allows you to do this magnificently, because Lisp code (and Lisp macros) is nothing but an s-expression (nested lists, so to speak), which is essentially the native data structure in Lisp, thus Lisp has a rich set of functions to dissect and construct s-expressions.


Title: Re: Learning python
Post by: Abdullah001 on September 05, 2014, 08:38:27 PM
Good decision.
Python is different from C or C++ but it’s much interesting and easy to learn. There are some awesome tutorial and online courses on “coursera.org”.
Good luck :)


Title: Re: Learning python
Post by: jackjack on September 05, 2014, 08:54:37 PM
Good decision.
Python is different from C or C++ but it’s much interesting and easy to learn. There are some awesome tutorial and online courses on “coursera.org”.
Good luck :)
Nice necro-thread
Are you gonna spam the whole forum?


Title: Re: Learning python
Post by: Brewins on September 05, 2014, 09:48:44 PM
codeacademy
udacity(introduction to computer science or something)
Coursera(an introduction to interactive programmin with python and others.)


Title: Re: Learning python
Post by: Sheldor333 on September 05, 2014, 10:43:59 PM
Maybe start with something easier, go with C, move to C++ to learn a little bit about object orientated programming. From there you won't have any trouble learning any programming language.


Title: Re: Learning python
Post by: BitGoose on September 05, 2014, 11:14:40 PM
i have some basic course in python , a pdf file with excersises. U want it?


Title: Re: Learning python
Post by: djnocide on September 05, 2014, 11:37:57 PM
you can try : http://www.codecademy.com/learn


Title: Re: Learning python
Post by: Omikifuse on September 06, 2014, 01:03:09 AM
Maybe start with something easier, go with C, move to C++ to learn a little bit about object orientated programming. From there you won't have any trouble learning any programming language.


C, C++ and object oriented stuff easier than python.

Nice trolling, dude