[Edu-sig] Python + JS == more than their sum()

kirby urner kirby.urner at gmail.com
Mon Nov 21 20:39:13 EST 2016


I'm continuing to advance the notion, in
Medium comments and elsewhere, that
learning one computer language at a
time may be less efficient than tackling
two or more, but with a "main one" front
burner. [1]

I credit the LEX Institute for this idea.[2]

The theory being: contrasts and comparisons
help concepts stick, whereas just one example
(of a language, human or computer) provides
less traction, a slipperier slope.

Like learning the J language (jsoftware.com)
even a little helps one realize how different
languages can be, bringing Python into sharper
relief against a background.

But J (of APL heritage) might be too exotic
as a #2, why not do JavaScript?  Python + JS
could be as common as HTML + CSS.

That's a little self serving as a common bootcamp
design if JS front end, Python back end. Our
PDX Code Guild in Portland takes that tack.

The curriculum, then, would continually bring
them together to discuss their similarities and
differences.  Either one could be foreground
first, with the other as background, but we'd
do a lot of jumping back and forth (and not
just with JSON :-D).

A breakthrough realization I had earlier today
was that Jupyter Notebooks already gives me
a JavaScript interpreter, even when my main
kernel is Python 3.

%%javascript at the top of any cell creates a
node-like experience, and I'm able to write
ES6 (JavaScript) with classes, arrow functions
and everything.  It feels a lot like using
node --harmony testfile.js on cloud9 (another
learning platform I visit).

Here's an example, of a Jupyter Notebook
running through nbviewer, with both Python
and JS code cells.  The point is to show off
the similarities.

https://goo.gl/nj9RPO

Kirby

Useful tools:
http://codepen.io/
http://jsbin.com/

[1] https://goo.gl/U4Yx6l (comment on one
of Quincy Larson's, about which language
to learn first)

[2] 'Who Is Fourier?' (one of its pubs) appears
way back in edu-sig.  Jason Cunliff and I
met and talked about it in New York that
time.

Here's one of Jason's from 2002:

https://mail.python.org/pipermail/edu-sig/2002-September/002255.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/edu-sig/attachments/20161121/24a4338a/attachment.html>


More information about the Edu-sig mailing list