[Twisted-Python] Twisted for Novices [Was: Advice sought on application evolution]

Justin Warren daedalus at eigenmagic.com
Wed Mar 26 19:40:53 EDT 2008

On Tue, 2008-03-25 at 10:20 -0700, Andrew Francis wrote:

> A part of getting things right, is knowing what wrong
> looks like. Both Twisted and (Stackless - what I work
> with), don't dedicate much time to showing what is
> definitely wrong.

Indeed. Also important is understanding *why* something is wrong.
Sometimes this is non-obvious, or counter-intuitive, which can be
confusing to the novice.

> >The easiest place to start learning is with code that
> >looks like all the other code you've written before. 
> I am not sure about this approach although there is
> much to be said about having a programming style that
> makes you feel confident to tackle problems. 
> I find a good way to learn is looking at good but
> simple examples that do something useful, then tinker
> with them. This is the way some of my favourite
> computer books work - the various
> Kernighan/Richie/Plauger books, Steven's "Unix Network
> Programming"

I completely agree. I guess I was trying to say that when I start to
learn something new, it's easier if I can start with a bit of newness
that isn't completely alien to me.

> In the case of Twisted, I found the Abe Fettig book
> good - I looked at webcat.py and requesthandler.py and
> that gave me a start. From time to time, I also posted
> on this mailing list to get little examples - very
> helpful. 
> I also like the design patterns approach to learning:
> this is the name, the situation/context, the problem,
> the solution, references. 

Definitely, particularly when it's something that comes up a lot. The
canonical echo server/client example is ok, but it's a toy problem, not
a real world thing. It might be nice to have a real world example of
something (simple!) most people are likely to want to do, and how
Twisted makes it easy/great.

It'd be great if there was a sequence of tutorials designed to get
people to the 'Aha!' moment of twisted where it all suddenly makes
sense. Maybe there already is, and I'm simply ignorant.

Justin Warren <daedalus at eigenmagic.com>

More information about the Twisted-Python mailing list