[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Pythons & Ladders

Benoit

2/27/2008 11:24:00 PM

I've been teaching myself the python language over the past few months
using Mark Lutz' Learning Python, 3ed. Python is also the first
programming language I've ever taken up. I find the language easy to
learn and rather productive in relation to the introductory course on C
++ I'd begun in January for fun @ school (we're practicing dynamic
arrays using pointers... kill me now). My problem, however, is that I
found myself lacking problems with which to create solutions and so
practice what I've learned. I think I'm one of those people who
really get into something when the instructions come from without.

So I'd like to ask you resident python gurus to help me learn. Give
me something to do! Specifically, I'd like to be given tasks that
incrementally increase in difficulty, starting from simple file/text
manipulation to those harder things like built-in function overloading
(you know, where you can make the "+" operator do something different
in relation to a given object). I hope my request doesn't come off as
demanding, as perhaps we could archive these tasks for future
pedagogy.

If something like this already exists though, please point me in the
right direction. Otherwise, thanks for any and all assistance.
15 Answers

Benoit

2/27/2008 11:26:00 PM

0

On Feb 27, 5:24 pm, Benoit <benoit.barberou...@gmail.com> wrote:
> I've been teaching myself the python language over the past few months
> using Mark Lutz' Learning Python, 3ed. Python is also the first
> programming language I've ever taken up. I find the language easy to
> learn and rather productive in relation to the introductory course on C
> ++ I'd begun in January for fun @ school (we're practicing dynamic
> arrays using pointers... kill me now). My problem, however, is that I
> found myself lacking problems with which to create solutions and so
> practice what I've learned. I think I'm one of those people who
> really get into something when the instructions come from without.
>
> So I'd like to ask you resident python gurus to help me learn. Give
> me something to do! Specifically, I'd like to be given tasks that
> incrementally increase in difficulty, starting from simple file/text
> manipulation to those harder things like built-in function overloading
> (you know, where you can make the "+" operator do something different
> in relation to a given object). I hope my request doesn't come off as
> demanding, as perhaps we could archive these tasks for future
> pedagogy.
>
> If something like this already exists though, please point me in the
> right direction. Otherwise, thanks for any and all assistance.

Just some background: My main thing is XHTML/CSS, and we're on
javascript in my Web Design course. I'm ultimately interested in
dynamic website design.

Jeff Schwab

2/28/2008 3:18:00 AM

0

Benoit wrote:
> I've been teaching myself the python language over the past few months
> using Mark Lutz' Learning Python, 3ed. Python is also the first
> programming language I've ever taken up. I find the language easy to
> learn and rather productive in relation to the introductory course on C
> ++ I'd begun in January for fun @ school (we're practicing dynamic
> arrays using pointers... kill me now).

Get a better teacher, if you can. Please do me a personal favor: Don't
hold the crappy course against C++. For the record, you should never
have to manage dynamically allocated arrays manually, nor store pointers
to them. Try the std::vector template, and post in comp.lang.c++ if
have any trouble.

> My problem, however, is that I
> found myself lacking problems with which to create solutions and so
> practice what I've learned. I think I'm one of those people who
> really get into something when the instructions come from without.
>
> So I'd like to ask you resident python gurus to help me learn. Give
> me something to do! Specifically, I'd like to be given tasks that
> incrementally increase in difficulty, starting from simple file/text
> manipulation to those harder things like built-in function overloading
> (you know, where you can make the "+" operator do something different
> in relation to a given object). I hope my request doesn't come off as
> demanding, as perhaps we could archive these tasks for future
> pedagogy.
>
> If something like this already exists though, please point me in the
> right direction. Otherwise, thanks for any and all assistance.

Happy hacking!
http://www.pythonchal...

Marc 'BlackJack' Rintsch

2/28/2008 7:10:00 AM

0

On Wed, 27 Feb 2008 19:18:27 -0800, Jeff Schwab wrote:

> Benoit wrote:
>> I've been teaching myself the python language over the past few months
>> using Mark Lutz' Learning Python, 3ed. Python is also the first
>> programming language I've ever taken up. I find the language easy to
>> learn and rather productive in relation to the introductory course on C
>> ++ I'd begun in January for fun @ school (we're practicing dynamic
>> arrays using pointers... kill me now).
>
> Get a better teacher, if you can. Please do me a personal favor: Don't
> hold the crappy course against C++. For the record, you should never
> have to manage dynamically allocated arrays manually, nor store pointers
> to them. Try the std::vector template, and post in comp.lang.c++ if
> have any trouble.

Hey a flame bait. I'll bite. This a bit of an overreaction unless you
know what the course was about. If the goal is to learn about the
computer and that basically everything is a number in the end, then C is a
good choice. More portable than assembler but nearly as close to the
metal.

To the OP: If you try C++, don't hold that crappy language against C#, D,
or Java. ;-)

Ciao,
Marc 'BlackJack' Rintsch

Aaron Brady

2/28/2008 8:02:00 AM

0

On Feb 28, 1:10 am, Marc 'BlackJack' Rintsch <bj_...@gmx.net> wrote:
> On Wed, 27 Feb 2008 19:18:27 -0800, Jeff Schwab wrote:
> > Benoit wrote:
> >> I've been teaching myself the python language over the past few months
> >> using Mark Lutz' Learning Python, 3ed.  Python is also the first
> >> programming language I've ever taken up.  I find the language easy to
> >> learn and rather productive in relation to the introductory course on C
> >> ++ I'd begun in January for fun @ school (we're practicing dynamic
> >> arrays using pointers... kill me now).
>
> > Get a better teacher, if you can.  Please do me a personal favor:  Don't
> > hold the crappy course against C++.  For the record, you should never
> > have to manage dynamically allocated arrays manually, nor store pointers
> > to them.  Try the std::vector template, and post in comp.lang.c++ if
> > have any trouble.
>
> Hey a flame bait.  I'll bite.  This a bit of an overreaction unless you
> know what the course was about.  If the goal is to learn about the
> computer and that basically everything is a number in the end, then C is a
> good choice.  More portable than assembler but nearly as close to the
> metal.
>
> To the OP: If you try C++, don't hold that crappy language against C#, D,
> or Java.  ;-)
>
> Ciao,
>         Marc 'BlackJack' Rintsch

Welcome! This is the self-proclaimed 'impossible and useless' guy.
Since you're in to TMLs, try escaping a text file with a small subset
of characters, so that it's readable with a browser. Say by replacing
all the ampersands with &amp;, the line breaks with <p>, and maybe
even a 'list' with <li>s. (That went easy, moderate, hard.) Then,
for impossible, do it without (I repeat, WITHOUT) reading the whole
file into memory, say only 32 characters at a time.

Sadly, even at teenages, specializations you make affect your
specializations later. There's no best specialization priority, and $$
$ned if I'm picking yours. Mine gets me here; that's all I can know.
Electives or bust!

Anyway, Marc is right. Python teaches you a lot about programming,
but C teaches you a lot about computers. More generally, you can
write in one line in one language what takes hundreds in another, but
in one line in that one what's impossible in the first. It's -your- -
day-; "allegretto: meter's running".

Erik Max Francis

2/28/2008 9:47:00 AM

0

Marc 'BlackJack' Rintsch wrote:

> On Wed, 27 Feb 2008 19:18:27 -0800, Jeff Schwab wrote:
>> Benoit wrote:
>>> I've been teaching myself the python language over the past few months
>>> using Mark Lutz' Learning Python, 3ed. Python is also the first
>>> programming language I've ever taken up. I find the language easy to
>>> learn and rather productive in relation to the introductory course on C
>>> ++ I'd begun in January for fun @ school (we're practicing dynamic
>>> arrays using pointers... kill me now).
>> Get a better teacher, if you can. Please do me a personal favor: Don't
>> hold the crappy course against C++. For the record, you should never
>> have to manage dynamically allocated arrays manually, nor store pointers
>> to them. Try the std::vector template, and post in comp.lang.c++ if
>> have any trouble.
> Hey a flame bait. I'll bite. This a bit of an overreaction unless you
> know what the course was about. If the goal is to learn about the
> computer and that basically everything is a number in the end, then C is a
> good choice. More portable than assembler but nearly as close to the
> metal.
>
> To the OP: If you try C++, don't hold that crappy language against C#, D,
> or Java. ;-)

He was talking about C++, not C. Jeff has quite a good point; teaching
C++ as C is not terribly useful.

--
Erik Max Francis && max@alcyone.com && http://www.alcyon...
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
Wyrd has swept all my kin / all the brave chiefs away! / Now I must
follow them! -- Beowulf

Alan G Isaac

2/28/2008 2:50:00 PM

0

Benoit wrote:
> Give
> me something to do!


Help to improve one of the experimental
writers for docutils.

IIRC, the ODT writer does not yet support figures
and tables.

http://www.rexx.com/~dkuhlman/odtw...

The rst2wordml writer appears to be getting its
features in place, but when I last used it,
some tinkering was required. You could work
on adding features.

http://docutils.sourceforge.net/sandbox/rst2wordml/r...

If you get good enough a docutils, provide an option
to have the number for the note be superscripted, like
the note reference can be.

fwiw,
Alan Isaac

Jeff Schwab

2/28/2008 6:35:00 PM

0

Marc 'BlackJack' Rintsch wrote:
> On Wed, 27 Feb 2008 19:18:27 -0800, Jeff Schwab wrote:
>
>> Benoit wrote:
>>> I've been teaching myself the python language over the past few months
>>> using Mark Lutz' Learning Python, 3ed. Python is also the first
>>> programming language I've ever taken up. I find the language easy to
>>> learn and rather productive in relation to the introductory course on C
>>> ++ I'd begun in January for fun @ school (we're practicing dynamic
>>> arrays using pointers... kill me now).
>> Get a better teacher, if you can. Please do me a personal favor: Don't
>> hold the crappy course against C++. For the record, you should never
>> have to manage dynamically allocated arrays manually, nor store pointers
>> to them. Try the std::vector template, and post in comp.lang.c++ if
>> have any trouble.
>
> Hey a flame bait. I'll bite.

Excuse me? Somebody posts about an introductory course on C++ covering
"dynamic arrays using pointers" and literally says "kill me now," and
I'm the flamer for asking him not to hold the language responsible for
the bad course?


> This a bit of an overreaction unless you
> know what the course was about.

It's supposed to be about C++, according to the OP.


> If the goal is to learn about the
> computer and that basically everything is a number in the end, then C is a
> good choice. More portable than assembler but nearly as close to the
> metal.

And a better choice than C++ would be.


> To the OP: If you try C++, don't hold that crappy language against C#, D,
> or Java. ;-)

What's the relevance of C#, D, or Java to the OP's post?

Aaron Brady

2/28/2008 8:03:00 PM

0

On Feb 28, 12:34 pm, Jeff Schwab <j...@schwabcenter.com> wrote:
> Marc 'BlackJack' Rintsch wrote:
> > Hey a flame bait.  I'll bite.

[ redirected to OP ]

>>> OP.flamebait= 1.0.
>>> bait.bite()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'FlameBait' object has no attribute 'bite'

> Excuse me?  Somebody posts about an introductory course on C++ covering
> "dynamic arrays using pointers" and literally says "kill me now," and
> I'm the flamer for asking him not to hold the language responsible for
> the bad course?
>
> > This a bit of an overreaction unless you
> > know what the course was about.
>
> It's supposed to be about C++, according to the OP.
>
> > If the goal is to learn about the
> > computer and that basically everything is a number in the end, then C is a
> > good choice.  More portable than assembler but nearly as close to the
> > metal.
>
> And a better choice than C++ would be.
>
> > To the OP: If you try C++, don't hold that crappy language against C#, D,
> > or Java.  ;-)
>
> What's the relevance of C#, D, or Java to the OP's post?

public static void synchronized flamewar() {}
virtual void flamewar() {}
def flamewar(): pass

[ castironpi has changed the newsgroup to comp.lang.flamewar ]

Programming is very hard. And on that note!

Benoit

2/28/2008 8:09:00 PM

0

Forgive my language concerning C++ as its turned the thread into
something I did not intend. I merely wished to point out that Python
was easier for me to learn than C++. To Schwab, its likely that Mark
Lutz is simply a better instructor than my professor.

Marc 'BlackJack' Rintsch

2/28/2008 9:00:00 PM

0

On Thu, 28 Feb 2008 10:34:45 -0800, Jeff Schwab wrote:

>> Hey a flame bait. I'll bite.
>
> Excuse me? Somebody posts about an introductory course on C++ covering
> "dynamic arrays using pointers" and literally says "kill me now," and
> I'm the flamer for asking him not to hold the language responsible for
> the bad course?
>
>
>> This a bit of an overreaction unless you
>> know what the course was about.
>
> It's supposed to be about C++, according to the OP.

Yeah, sorry I've read C. Actually it's about a language called C
++ according to the OP.

>> To the OP: If you try C++, don't hold that crappy language against C#, D,
>> or Java. ;-)
>
> What's the relevance of C#, D, or Java to the OP's post?

The same as C++ to the OP's post if he would have talked about C. :-)

Ciao,
Marc 'BlackJack' Rintsch