[Tutor] learning languages

Avi Gross avigross at verizon.net
Thu Nov 22 16:45:17 EST 2018


Steve,

I would go a step further.

The word "industry" is used by some to mean THEM. I would suggest it is more like US as the younger people of yesteryear age into becoming the employees and even management of the industries involved.

When a language like Python has been around long enough so lot of people are exposed to it in places like College, then when they find work, they often select a place that has what they are used to or try to bring it along at some point.

I have had to largely start over several times as the computers and environment at the University of Wisconsin were very different than I had used in N.Y. I used different hardware (as it evolved) and other programming languages and operating systems and so on. When I moved on to Bell Labs, nobody cared about what I could do with PASCAL or with DEC Operating systems. I rapidly adjusted to UNIX and C and all that comes with it. Hence my regular search for novelty and learning new ways. Heck, when I used to teach, I did not want to teach the same course twice. Been there. Done that.

But for many people, the idea of leveraging what they are used to has been a factor in bringing many academic versions of software and ideas into industry. But once in a more real world, people may find that the tools may not fit them as well and the choice is to make new ones or try to change the existing ones. I speculate this is one way to look at the pressure.

I am puzzled about your question of what I meant by free. Yes, if you want a higher quality product you may have to pay for it or if you want to make commercial use. But for routine purposes, there are many things now for free. Look at many of things in the GNU category. You can take a PC (not free) add free enough operating systems like LINUX, add suite after suite of software including Python and R (but not S) and free mailers and spreadsheets and games.

If you want a commercial variant on R, you can buy S. I am not up on it, but Python has many implementations and some may come at a price, especially if you buy it for commercial use. You mention a bunch of variants in your message with some only having a PieceOfThePy and there are many more.

But if you just want to learn it, tons of info is free including plenty of documentation and lots of free add-ons like modules or code that does useful  things. As pointed out, IDLE is a free editor/environment written in Python and just sitting there to be used or edited or adjusted to other needs.

You ask who taught parallel processing in an intro class. True if you mean an intro PROGRAMMING class. But I have seen many classes on topics like Analysis of Algorithms or Machine Learning where a part of the class is to explain partially in the context of one or more computer languages or have you do assignments. Someone recently wanted to know how to program various cryptographic methods in Python and elsewhere asked how to do it in another language. But my point was perhaps not what you assume. My point is that when teaching beginners how to do things within a language, there may be no need for many things. The very basic functionality has lots of black boxes underneath it that can be safely ignored or given as handwaving. Someone wondered if adding generators complicated the language. Yes, but also no. Creating a generator is one thing. Using it is trivial. Isn't it nice to be able to use almost any type or function as a generator and not care how the black box was made? True, it means when you really want it all at once, you might have to wrap a list() command around it or use it in some context that exercises the generator to completion.

Now teaching one of umpteen ways to make a generator or convert an existing thing into a generator, is a tad more advanced. Using them, maybe not so much.

As a reality, as long as machines get ever faster and with more memory, some bloat is tolerable. If a programming language has features rarely seen or used, you can still use it to teach. But people tend to try to show off and even make a virtue of doing more complex things.

How many have been told that python allows something like this:

a,b = b,a

or 

5 < x <= 10

The former can easily be done using a temporary variable and probably is done that way underneath. The latter might also be done a simpler way except you need to make sure x is only evaluated once.

As it happens, the first example is of major importance because it pervades the language with things like a function returning a tuple. 

Last comment. Is it better to teach in a bay language, say showing how you can use turtles moving around to draw objects and then switch to even more complex and complete languages for final use or should you start with something you can grow into? Think starter houses where people move up when kids arrive (and when they can afford it) and maybe downsize after they leave.

-----Original Message----- 
From: Tutor <tutor-bounces+avigross=verizon.net at python.org> On Behalf Of Steven D'Aprano
Sent: Thursday, November 22, 2018 1:06 AM
To: tutor at python.org
Subject: Re: [Tutor] origins bootstrapped.

On Wed, Nov 21, 2018 at 11:31:59AM -0500, Avi Gross wrote:

...

> Can I ask a question that I really want an opinion on? As a preface, I see
> some think python as a formal language is being pushed by industry in
> directions that may not meld as well for its use in other contexts like for
> teaching students.

I think there is always going to be tension between the needs of 
different users. Beginners need simplicity; expert, experienced 
programmers need power; both have very different ideas of what 
"readable code" means.

I don't think Python is being pushed in any direction by "industry". It 
is evolving according to the needs of the programmers who use it, some 
of whom may work for some industry or another.

> How much of that is due to it being a relative open and
> free product? There are plenty of other applications that you pay for and
> thus have to be responsive to the buyers to remain in business. Python has
> many implementations including some freer than others.

I don't know of any non-free (free as in beer, or free as in speech) 
implementations of Python. Can you elaborate?


> Yet is has gone
> through a bit of a bifurcation and many would like to see 2.X retained and
> others wish everyone should migrate. Is there room for a smaller core
> language that remains good for teaching purposes and that is small enough to
> fit in a Rasberry pi, while other versions are of industrial strength? Do we
> already sort of have some of that?

Standard CPython is light enough to run on fairly low-powered devices, 
including Raspberry Pi. For an even smaller footprint, you can use 
Micropython, which will run on embedded devices, although μPy does make 
some comprompises that means that it's not a fully compliant Python 
implementation.

There are, or were, other small implementations:

- Pippy, Python for Palm (probably unmaintained by now...)
- Python for S60, for the Nokia S60 platform (likewise...)
- Pythonce, for Windows CE (who still uses WinCE?)
- PyMite for embedded devices
- Python-iPod
- Py4A and QPython (Android)
- TinyPy
- PyPad for the iPad
- Pycorn, Python running on bare hardware with no OS


> I was thinking of how many languages and environments have been looking at
> working using parallelism.
[...]
> It definitely is worth doing but does everyone need it especially for
> teaching an intro class?

Who teaches threading and parallelization in introductory classes?




More information about the Tutor mailing list