<div dir="ltr">The title is very catchy :-) I am genuinely interested in improving CS education, both from the perspective of a recent grad and a learner in general (who isn't?). But I think we all do appreciate every effort this community put together as a whole.<div><br></div><div>> One of the things we would like to try is a framework for CS101 [Intro to programming]</div><div>I am still unsure what kind of framework we are proposing. What is the exact goal? Is it just teaching more FP? Benefit? What are the user stories? Maybe this is not something people would integrate into CPython, and probably something you'd fork from CPython.</div><div><br></div><div>From my experience, the hard thing about learning a new programming language is not always about undefined behaviors, under-documented APIs or confusing syntax, but sometimes the lack of documentation demonstrating how to effectively use the language and leverage community tools frustrate people. Python community is extremely supportive and there is so many info out there that a search would yield some useful answer right away. For some other languages that is not that case. But Python can do better, and I feel this is the issue with learning a language more effective. Teaching syntax, or understand how to model your problem before you crack a solution are secondary IMO. I as a learner is far more interested in "how do I accomplish XYZ" and then I will get curious about how one come to a particular solution. Similarly, when I see beautiful Vim setup I would go look for "how to setup my Vim like this."<div><br></div><div>I say all the above because, IMO, OO vs FP, Scheme vs Python vs Java vs C is really not an interesting debate. I am biased because the first language I was taught officially in my undergraduate career was Python (but I knew basic programming well before that). I appreciate the expressive of FP, and how FP "supposedly" help reason your solution, much closer how you would write a proof. But with all due respect, I don't think FP vs OO is really the problem in CS 101, or just about any one learning a new language.</div><div><br></div><div>Teachers (including TAs) would have to spend time to get a Python setup working on each student's workstation, or troubleshoot environmental issue (to be fair, this is part of learning dealing with different platform, different toolsets). Hence I love projects which aim to reduce administrative tasks in classroom (ipython notebook, online compiler/interpreter etc).</div><div><br></div><div>Or maybe more verbose warning for beginners? For example, there was a PEP (???) to add a warning when someone type (print "hello world") in Python 3 instead of showing invalid syntax. That can be extremely helpful for beginners and this is something worth thinking. For example, certain errors / deprecations could show "refer to this awesome PEP, or refer to this interesting discussion, or refer to this really well-written blogpost - something python core-dev agrees with."</div></div><div><br></div><div>Thanks.</div><div><br></div><div>John</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 25, 2015 at 2:33 PM, Wes Turner <span dir="ltr"><<a href="mailto:wes.turner@gmail.com" target="_blank">wes.turner@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Mon, May 25, 2015 at 7:11 AM, Rustom Mody <span dir="ltr"><<a href="mailto:rustompmody@gmail.com" target="_blank">rustompmody@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><br>On Monday, May 25, 2015 at 1:31:58 PM UTC+5:30, Andrew Barnert via Python-ideas wrote:<span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="auto"><div>On May 24, 2015, at 22:06, Rustom Mody <<a rel="nofollow">rusto...@gmail.com</a>> wrote:</div><div><br></div><blockquote type="cite"><div><div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div></div>Context:  A bunch of my students will be working with me (if all goes according to plan!!)to hack on/in CPython sources. <br></div><br></div>One of the things we would like to try is a framework for CS101 [Intro to programming]<br><br></div>So for example beginners get knocked out by None 'disappearing' from the prompt<br></div>Correctable by<br><br>>>> import sys
<br>>>> sys.displayhook = print
<br><br></div>Now of course one can say: "If you want that behavior, set it as you choose"<br></div>However at the stage that beginners are knocked down by such, setting up a pythonstartup file is a little premature.<br><br></div>So the idea (inspired by Scheme's racket) is to have a sequence of 'teachpacks'.<br></div>They are like concentric rings, the innermost one being the noob ring, the outermost one being standard python.<br></div></div></div></div></div></div></div></div></div></div></blockquote><div><br></div>How exactly does this work? Is it basically just a custom pythonstartup file that teachers can give to their students? Maybe with some menu- or wizard-based configuration to help create the file? <span style="background-color:rgba(255,255,255,0)">Or is this some different mechanism? If so, what does setting it up, and distributing it to students, look like?</span></div></blockquote></span><div><br>Frankly Ive not thought through these details in detail(!) <br></div><span><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="auto"><div></div><div>I realize that below you talk about doing things that are currently not easy to do in a pythonstartup, like hiding all mutating sequence methods, but presumably the patches to the interpreter core would be something like adding hide_mutating_sequence_methods() and similar functions that teachers could then choose to include in the pythonstartup file or whatever they give out.</div><div><br></div></div></blockquote></span><div><br>I personally would wish for other minor surgeries eg a different keyword from 'def' for generators.<br>From the pov of an experienced programmer the mental load of one keyword for two disparate purposes is easy enough to handle and the language clutter from an extra keyword is probably just not worth it.<br>However from having taught python for 10+ years I can say this 'overloading' causes endless grief and slowdown of beginners.<br></div></div></blockquote><div><br></div></span><div>* <a href="https://docs.python.org/2/library/tokenize.html" target="_blank">https://docs.python.org/2/library/tokenize.html</a></div><div>* <a href="https://hg.python.org/cpython/file/2.7/Lib/tokenize.py" target="_blank">https://hg.python.org/cpython/file/2.7/Lib/tokenize.py</a></div><div>* <a href="https://hg.python.org/cpython/file/tip/Grammar/Grammar" target="_blank">https://hg.python.org/cpython/file/tip/Grammar/Grammar</a><br></div><div>* <a href="https://www.youtube.com/watch?v=R31NRWgoIWM&index=9&list=PLt_DvKGJ_QLZd6Gpug-6x4eYoHPy4q_kb" target="_blank">https://www.youtube.com/watch?v=R31NRWgoIWM&index=9&list=PLt_DvKGJ_QLZd6Gpug-6x4eYoHPy4q_kb</a> </div><div>* <a href="https://docs.python.org/devguide/compiler.html" target="_blank">https://docs.python.org/devguide/compiler.html</a></div><div>* <a href="https://docs.python.org/2/library/compiler.html" target="_blank">https://docs.python.org/2/library/compiler.html</a></div><div><br></div><div>I identify functions that are generators by the 'yield' (and 'yield from') tokens.</div><div><br></div><div>I document functions that yield:</div><div><br></div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_extra"><div class="gmail_quote"><div>def generating_function(n):</div></div></div><div class="gmail_extra"><div class="gmail_quote"><div>    """Generate a sequence</div></div></div><div class="gmail_extra"><div class="gmail_quote"><div>    # numpy style</div></div></div><div class="gmail_extra"><div class="gmail_quote"><div>    :returns: (1,2,..,n)</div></div></div><div class="gmail_extra"><div class="gmail_quote"><div>    :rtype: generator (int)</div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><br></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div>    # google-style</div></div></div><div class="gmail_extra"><div class="gmail_quote"><div>    Yields:</div></div></div><div class="gmail_extra"><div class="gmail_quote"><div>        int: (1,2,n)</div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><br></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div>    """</div></div></div><div class="gmail_extra"><div class="gmail_quote"><div>    returns (x for x in range(n))</div></div></div></blockquote><div class="gmail_extra"><div class="gmail_quote"><span class=""><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br>Then there is even more wishful thinking changes -- distinguishing procedure from function.<br>After 30 years of Lisp and ML and ... and Haskell and square-peg-into-round-holing these into python, Ive come to the conclusion that Pascal got this distinction more right than all these.  However I expect this surgery to be more invasive and pervasive than I can handle with my (current) resources.<br></div></div></blockquote><div><br></div></span><div>@staticmethod, @classmethod, @property decorators</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>etc<br>etc<br>In short I am talking of a language that is morally equivalent to python but cosmetically different and is designed to be conducive to learning programming</div></div></blockquote><div><br></div></span><div>I suppose you could fork to teach; but [...].</div><div><br></div><div>You might check out <a href="http://pythontutor.com/" target="_blank">http://pythontutor.com/</a> and/or <a href="http://www.brython.info/" target="_blank">http://www.brython.info/</a> (Python, JS, and compilation).</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><br></div><br>_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" target="_blank">http://python.org/psf/codeofconduct/</a><br></blockquote></span></div><br></div></div>
<br>_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" target="_blank">http://python.org/psf/codeofconduct/</a><br></blockquote></div><br></div>