× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Wed, Oct 30, 2013 at 1:00 PM, Buck Calabro <kc2hiz@xxxxxxxxx> wrote:
the learning mode of many of us RPG programmers was to dig
into the code and off we'd go.

OK, fair enough. That is a common learning mode regardless of
language. But Python comes up spades here too. There is an entire
searchable "cookbook" of recipes (of varying quality, just like
real-world RPG code!):

http://code.activestate.com/recipes/langs/python/

Almost all the recipes scratch someone's itch, and so tend to be
inherently useful rather than merely to demonstrate esoteric features.
Some of the highest-quality recipes have eventually been absorbed
into Python's standard library; others have grown into third-party
packages released into the community:

https://pypi.python.org/pypi

There is indeed much, much more learning material available for Python
than there ever was for RPG! The problem for DIYers is that we can't
readily tell which Python patterns to apply for which business problem.
That will come with experience, but that 'experience' has already been
baked into the existing RPG code base.

Hmm. I'm trying to decide whether this perception is colored by the
fact that you're experienced in RPG and a beginner in Python, so
things seem clearer in RPG. I know I keep saying Python is so easy to
learn, but perhaps my view is colored by the fact that I've already
learned (enough of) it.

One thing I think makes patterns easier to find in RPG is that, to be
quite blunt, RPG doesn't make it easy to do very many things. But why
should it? RPG is extremely DB2-for-i-oriented. Step too far away
from that, and you're in the weeds.

With Python (and many other less specialized languages), the language
itself is so expressive and so powerful that the language tends to
mold itself to the task at hand. (This is part of the reason why Lisp
and Ruby programmers wind up developing so many domain-specific
languages; it just happens during the natural course of solving their
problems.) With such languages, there is a lot more "open space" and
a lot fewer "well-worn paths".

But at least you can start with the recipes. If you want to see
uniformly high-quality code, the best place to look might be in
Python's standard library (found in the Lib subdirectory, so
C:\Python27\Lib in a typical Windows installation, for example).

John

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.