Python is fun (useless social thread) ;-)

S

Scott David Daniels

Scott said:
John Salerno wrote:
....
And I didn't quote him at all, so my post looks like it was
attributed to him, rather than in response to his message.

--Scott David Daniels
(e-mail address removed)
 
J

John Salerno

Scott said:
...
And I didn't quote him at all, so my post looks like it was
attributed to him, rather than in response to his message.

Heh heh, I thought that for a few seconds until I realized I didn't
pursue a PhD. :)
 
?

=?iso-8859-1?q?Luis_M._Gonz=E1lez?=

BartlebyScrivener said:
Thank you. I sense what you are saying, but at this point I'd be
thinking, "Why not just make several modules?" :) I'll get to it. I've
got my hands full just learning everything else.

rd

To grasp the basics of OO, I strongly suggest you start with an example
of a banking application. It is in Alan Gauld's tutorial here:
http://www.freenetpages.co.uk/hp/alan.gauld/

Check the bank account class in "Object oriented programming".
I think it is a very good real-life example of how to work with
objects, and it was a real eye opener to me when I was in your
situation.

By the way, the whole tutorial is very good.

I also recommend:
Josh Cogliati's Python Tutorial for Non-Programmers
A Byte of Python

Hope it helps...
Luis
 
R

Remi Villatel

John Salerno wrote:

[---CUT---]
So out of curiosity, I'm just wondering how everyone else came to learn
it.
[---CUT---]

I just needed it. I needed it to recode text files from my old Atari
computer for my Linux box. I had already seen Python sources during some
googling sessions and found them mostly understandable. I also knew it
was already installed so I decided to give it a try.

One night was all I needed to write my "recoder" with nothing more to
help me than the (cryptic) included docs and the examples. Yes, 8 hours
and I had learned arguments passing, files operations, strings
manipulations and even module import with no prior knowledge. I fell in
love with Python.

I still have the source, it's very basic Python and I definitively could
have used a dictionary... but it worked.

From that moment, Python became my script language. Whenever I need to
write more than 2 lines in Bash, I use Python.

I learned the classes to play with some (rudimentary) artificial
intelligence. I even took part in a contest where I learned 'lambda' and
the generators. The only thing I haven't taken much care about is GUI in
Python. For that, I learned C++... ;-)

Any way, Python even helps me sometimes to write C++ since I use it to
test my algorithms when it comes to data manipulation. I can feed my
routines on the fly with whatever data I want to see how they react. So
I use Python as a debugger before to even start writing things in C++.
No need to compile or debug in Python. When something goes wrong:
CTRL+C, correct and restart.

Python is fun because it's easy to write, to understand and to use.
 
D

Dan Bishop

John said:
So out of curiosity, I'm just wondering how everyone else came to learn
[Python]

I first heard about Python in the footnotes for Bruce Eckels' book
"Thinking in Java", which I had bought for a Java course I took in
2000. Eventually, I decided to take a look at python.org, and went
through the tutorial.
 
L

Laurent Pointal

John Salerno a écrit :
....
I do, however, think the docs are pretty good, although I sometimes find
myself just wishing that a function definition was simply laid out in an
easy to read format that included all of its parameters, so I would know
exactly what to pass to it (I guess help() is good for this though).

<mode pub="on">
http://www.limsi.fr/Individu/pointal/python/pqrc/
</mode>

A+

Laurent.
 
A

Ant

No, I learned it because Perl was too dirty and Java to complicated.
Now it is part of my daily job.

Ditto. I was fed up of writing, compiling and running a java
application just in order to do a quick script. I'd used perl, but
quite frankly perl's a ridiculous language. Ruby looked promising, but
perl had already poisoned my mind against the syntax... Python was
clean, object oriented if you want it, and mature.
Programming, reading this newsgroup, reading the python cookbook,
reading python source files of the standard library.

I feel like I've got a pretty good grasp of the core language now, but
there's always something that pops up in the group that I find I've not
dabbled in (such as the itertools, which I discovered on the group last
week(?) and have been using to great effect already!).
 
?

=?iso-8859-1?B?QW5kcuk=?=

John said:
So out of curiosity, I'm just wondering how everyone else came to learn
it. If you feel like responding, I'll ask my questions for easy quoting:

Did you have to learn it for a job?

No. My job is purely administrative; I have absolutely no need to do
any programming. I had done a *small* amount of programming (fortran,
C) while studying Physics and wrote a few simple Java applets while
teaching Physics.
Or did you just like what you saw and decided to learn it for fun?

More or less. In the summer of 2004 I felt I needed a hobby. I also
thought I should introduce my kids to something useful about computers.
I decided to combine both goals.
I started writing an html tutorial for my kids and, while surfing the
net for helpful resources, saw a few independent references to Python.
Curious, I downloaded it just to see what it was like and, after trying
a few things, I decided to forget about the html tutorial and proceeded
to write one on Python for my kids, following more or less a
traditional (boring) approach.
Also, how did you go about learning it? (i.e., like I described above, I
started with the main stuff then moved on to the different available
frameworks)

Having taught Physics for a number of years, I realised that the best
way to learn something is try to prepare to teach it to someone else.
This is what I was trying to do for my kids. But, after spending a
little over a month with Python, I stumbled upon Guido van Robot which
inspired me to change course again and I started working on RUR-PLE. I
had some ideas as to what RUR-PLE should look like, and just started
building from scratch, first implementing the logic (no GUI) and then
learning what I needed (like wxPython) as I went along. Being a
newbie sometimes made it difficult to make things work the way I
thought they should. I'm sure professional programmers/experts would
be horrified if they were to look at the details of the code I wrote.
My excuse: it works ... why break it? ;-)
Was there any necessity in the specifics you learned, or did you just
dabble in something (e.g. wxPython) for fun?

Driven by the final goal in mind... The whole adventure has been for
fun!
Are there still some things you feel you need to learn or improve?

*Lots*. At the moment, it is webserver stuff for another project
(Crunchy Frog), again designed to make teaching/learning Python more
fun.
Additional comments/complains here: :)

Programming in Python is fantastic as a hobby... when I can find the
time. Since I started 2 years ago, I have gone for a few weeks (and
once for 4 months) at a time without doing any programming. However,
it is always easy to get back at it. I don't think I'd be able to say
that with other languages.

I have found members of the Python community to be generally extremely
helpful and generous of their time, in answering my silly questions.

I sometimes wish I had a different job, one which required me to do
programming using Python.

André
 
M

Mirco Wahab

Thus spoke John Salerno (on 2006-06-15 15:50):
Did you have to learn it for a job?

No, I was just interested in things
that are found interesting ;-)
Or did you just like what you saw and decided to learn it for fun?

I read some remarks, from "both sides", on
the feasibility of a programming language
with 'invisible braces', so I thought
'give it a try'.
Also, how did you go about learning it? (i.e., like I described above, I
started with the main stuff then moved on to the different available
frameworks)

Good question: I started with 'Myghty', this is,
as you probably know, a (imho excellent) framework
for developing web applications from components.

'Myghty' is a almost complete port of Perl's 'Mason'
(which is what Amazon and others run at), - what I
knew already smoehow.

I also tried Pylons (base component of MVC system
for web apps), but waved the flag after some time.
Was there any necessity in the specifics you learned,
or did you just dabble in something (e.g. wxPython) for fun?

Another motivation was to find out something about the
(nowadays) huge amount on SciPy related (software
(http://www.scipy.org/Topical_Software).
Are there still some things you feel you need to learn or improve?

I came all the way up from Basic/Fortran/x86-Assembler/C/C++
to todays 'lightweight languages' (Dr.Dobbs says they are)
in the the Python/Perl/Ruby-Group.

For my personal taste(!), Python is in the end
'to unspectacular', means: I didn't manage to
learn to be really expressive in it - and to
enjoy that ;-)

But thats a matter of taste, these languages are like
weapons (tools), that you use to express yourself on
the battlefield of your tasks.

And you _have_ to love and praise your sword, otherwise
you won't be able to handle it appropriate - in your
dreadful encounters ...
Additional comments/complains here: :)

What I don't like in Python
- easy things are too easy (even beginners can handle that, PIL etc.),
- complicated things are too complicated (I had hard times to remember things),
- invisible braces ;-) (just personal taste)
- no integrated regex support (used to use re's very much, but milage my vary)

Regards

Mirco
 
B

bruno at modulix

BartlebyScrivener wrote:
(snip)
Also, it seems to be a minimalist
language.

*seems* minimalist, but is really not - have a look at the object model
(metaclasses, descriptors etc), at closures and HOFs and decorators, at
list-comp and generators and (coming in 2.5) coroutines... Definitively
not minimalist in fact !-)
 
B

bruno at modulix

BartlebyScrivener said:
Thank you. I sense what you are saying, but at this point I'd be
thinking, "Why not just make several modules?" :)

Because you want an unknown number of the *same* module ?-)
 
B

bruno at modulix

Scott said:
You know how modules separate globals, right? That is, what you
write in one module doesn't affect the names in another module.
What classes (and hence OO) give you is a way of saying, "I'd
like something a bit like a module, but I'd like to make several
of them, and not have them interfere with each other." That is
the big intuition about objects, the rest is just details.

Another way to put it:

You know what are dicts, right ? That is, containers with keyword-access
to values ? Then you probably have dicts with a known, defined
structure, and functions working on it. What classes (and hence 00)
gives you is a way to associate these functions with the dicts
themselves. That is the big intuition about objects, the rest is just
details.

!-)
 
B

bruno at modulix

BartlebyScrivener wrote:
(snip)
I am not touching OO, classes,

You may not be aware of this, but as soon as you're programming in
Python, you *are* using OO. Strings are objects, dicts are objects,
tuples are objects, lists are objects, numbers are objects, and even
functions and modules are objects. Classes are just a way to create your
own object types.
or GUIs until I understand EVERYTHING

The answer is 42. That's all you need to know.
 
A

Alex Martelli

Dave Opstad said:
I had retired from Apple in 2001 after 33 years in the business, feeling
completely burned out. Didn't want to even look at another line of code.
After resting and recuperating for a couple years, though, I picked up a
book on Python (Alex Martelli's wonderful "Python in a Nutshell") and

Hey, great, I'm glad you liked it!


Alex
 
A

Alex Martelli

BartlebyScrivener said:
Especially the Python Cookbook, as I don't normally 'get it' when
someone just describes theory or an abstraction, I also must see an
example. The examples in the Cookbook are useful and also come with
explanations about how they work. Same goes for this group. Nine times

Yes, I agree that the Cookbook is particularly advisable for readers who
learn best from/via examples. Other very example-rich books include
Mark Pilgrim's and Magnus Lie Hetlands', by the way.


Alex
 
H

H J van Rooyen

Bruno wrote:

8<------------(snip)--------------

| The answer is 42. That's all you need to know.


Right on, Ford Prefect !!!

What's for Lunch?

- Hendrik
 
B

bruno at modulix

John Salerno wrote:
(snip)
So out of curiosity, I'm just wondering how everyone else came to learn
it. If you feel like responding, I'll ask my questions for easy quoting:

Did you have to learn it for a job?

It has never been an official requirement for any of the jobs I got
since I'm a programmer, if that's what you mean. I discovered it while
learning C++ / wxWidgets (someone talked me about Python as being pretty
good for rapid prototyping).
Or did you just like what you saw and decided to learn it for fun?

Well, I haven't be really impressed the first time - note that it was at
the very end of the last century, with v1.5.2. But still I found the
language suprisingly simple to get up and running with - seemed like the
language was almost always reading my mind about how I would have named
a librairy, function or whatever !-) So I ended up using it more and
more when wanting to play with an idea or write a quick script... Until
I realised than it was not the toy language I first thought it was (my,
no access restrictors, not static typing, this just could not be a
serious language, could it ?-), but a fantastic application programming
language - far better than anything I had seen before (mostly 'modern'
basics, C, C++, Pascal and Java...).
Also, how did you go about learning it? (i.e., like I described above, I
started with the main stuff then moved on to the different available
frameworks)

Just used it, played with it, and lurked here.
Was there any necessity in the specifics you learned, or did you just
dabble in something (e.g. wxPython) for fun?

I first used it for scripts, then turned to web programming (job
opportunity), so I never really went very far in GUI programming with
Python.
Are there still some things you feel you need to learn or improve?

Yes - all and everything...
 
R

Rune Strand

In 2002, I was in need of a multi-platform language. My choice became
Python, in spite of friends fiercly defending Perl and some interesting
Slashdot-articles on Ruby. But back on university, I met a very, very
pretty C++ girl who said many favourable things about Python. She never
became mine, but the sympathy for Python that she implanted in my mind,
turned out to make me immune against the Perl propaganda.

So Python (for me) could be said to be either a substitute for the
prettiest of the (many) pretty girls of Norway or a mindchild of the
same.

I found a script demonstrating search/replace in files. And even if I
hadn't coded in a year, I found Python surprisingly easy to read,
understand and change. So there I was.
Did you have to learn it for a job?

No, but I use it as often as possible in work contexts.
Or did you just like what you saw and decided to learn it for fun?

That's more like it.
Also, how did you go about learning it?

I ported som other scripts (Bash, PHP, and DOS bat-files) to Python
while searching the net each time I became lost. Porting is a good
learning method.
Was there any necessity in the specifics you learned,
or did you just dabble in something
(e.g. wxPython) for fun?

Mostly fun and some practical problems. Later I've used Boa Constructor
to make GUI's for some customers.
Are there still some things you feel you need to learn or improve?

Sure, I struggle with OO when it gets complicated and new features like
decorators. And idioms. But generally it's programming skills and
algorithmic scent I need.
Additional comments/complains here: :)

I'm a bit afraid that the new features and the turning to concepts like
iterators and generators are making Python elitistic. Old python code
floating around the net is generally easy to read, while newer often is
harder to grasp. I don't like it when my own inherent stupidity becomes
to obvious to hide.
 
S

Sybren Stuvel

Rune Strand enlightened us with:
But back on university, I met a very, very pretty C++ girl who said
many favourable things about Python.

Rrrrrr a very, very pretty girl that likes C++ and Python. Does it get
better?

Sybren
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top