1. F5 is unnatural on a Mac. Should be something like ^r (and ^R) or similar.
2. The interface looks very, um, VisualBasic or Microsoft Excel. That is fine. There is certainly a market for that. But it will turn off a huge segment of your market, namely those that aspire to be the lead in the TV show Mr. Robot. You may get some traction reskinning this whole thing to make it more slick like a machine gun you hide under your trench coat like in the Matrix and putting up a separate website or webpage and seeing which version gets more downloads.
Either way, I love this!
I know that this is meant kind of in jest, but do younger people really have much opinion one way or another about computer UIs? There's so much UI fragmentation on the modern Windows desktop, the aggregate effect is an aesthetic mess no matter what you do.
To even moderately experienced developers, a UI is a tool we use to interact with an application.
To everyone else, the UI is the application.
We developers need to develop an novice-level understanding of many things we touch but don't specialize in... Perhaps the domain we're developing software for, or networking, or database work. We also tend to get the classic novice overconfidence in those topics because we've never needed to know as much as the experts and therefore have never encountered problems we weren't qualified to solve... or so we think. UI design is one of those things.
I'm an art school educated UI designer, have done significant work in serious graphic design, and worked for a decade as a full-time back-end web developer for a reputable organization. The number of developers that have tried to explain UI design to me, even knowing my background, is astonishing. I'm male, but it looks exactly like mansplaining by my estimation.
UI design is a profession totally separate from software development and graphic design because making a good UI is a totally different process than either of those things– it's more akin to industrial design. Most developers don't understand its importance, and vastly overestimate their ability to create and evaluate interfaces themselves. I contribute code to open source projects all the time... but trying to contribute design work is a miserable experience. This is the reason independent open source alternatives will remain alternatives and never become standards.
I take supporting evidence from IDE market shares. All of the top results are either commercial software or mostly controlled by companies that have staff UI designers. The one org that controls a top contender that didn't seem to employ a dedicated UI designer is Eclipse, which is famous for its usability... Just not in a good way.
Kids are influenced by movies and they want to be cool and powerful.
More seriously, I see some plugins for reskinning to dark themes https://thonny.org/#plugins (e.g. https://github.com/ranelpadon/thonny-onedark/)
Maybe that's a feature? You know you're getting into the swing of things when you start customizing your IDE.
I've used Thonny on the Raspberry Pi and find a few things frustrating about it. The only other Python IDE I've used is PyCharm on the Mac. I prefer PyCharm but where Thonny feels a little too bare-boned, PyCharm has too much going on for this newbie.
I'm a seasoned developer, so this is not for me, but I am impressed.
This kind of take always shows up in threads about simpler tools and it always amazes me. This reads to me as "I'm a seasoned developer, so I'm too good for this." I'm not sure what you consider seasoned as I've only be developing software for 25 years but one day I hope to achieve these lofty heights. namely those that aspire to be the lead in the TV show Mr. Robot
I work with loads of hackers who avoid "real IDEs" like the plague. I think you vastly misunderstand that crowd.Higher order function ? Just more substitution !
Your source code is a long text template, no magic to it.
>Your source code is a long text template, no magic to it.
No, no, no! This is wrong, and really bad pedagogy.
def func_1(x):
return x + x
def func_2(y):
print(y)
return y
z = func_1(func_2(5))
If function application is substitution, then a student may expect the expansion to work something like this: z = func_1(func_2(5))
z = func_2(5) + func_2(5)
z = { print(5); 5 } + { print(5); 5 } # pretend python has curly braces for this to make sense
so 5 would get printed twice. But in reality it only gets printed once.Doing the substitution from inside-out doesn't help either, you get the same thing:
z = func_1(func_2(5))
z = func_1({ print(5); 5 })
z = { print(5); 5 } + { print(5); 5 }
I've had to un-teach this mistaken idea in beginners before. It harms their understanding of the call stack, scoping rules, etc.I would avoid the word "substitution" until after evaluation order has been covered. Python has applicative order evaluation like most languages. Pedagogically, since evaluation is just a basic concept, it should be explained before the student even gets to functions. Then, when you get to function application, it probably shouldn't take much more to explain that arguments are evaluated first and only then is the function applied on the evaluated values of those arguments. The values are then substituted wherever the parameter appears.
If side effects weren't in the picture, you could postpone discussion of evaluation order a little bit longer until you discuss the consequences evaluation rules have for runtime complexity (using pedagogically appropriate language, of course). So you could get away with allowing inaccurate ideas about substitution for a little while.
What you’re showing is lazy evaluation which is an alien concept in Python land.
4 → square_root → triple → ?
How does the square_root function work? It's an interesting question but often times assembling multiple atoms into a structure is more empowering and exciting; plus children will be using functions where the details elude them for quite awhile. Using functions with elusive details is also typical in math pedagogy so children should get used to reasoning around black boxes.
Would like to have a word with you.
I have tried to teach that and students have always (seem) to like & understand this approach. It was for student at university level, so maybe more able to understand this 'functional' view of functions.
Dictionaries are more like functions and indeed I taught myself to understand hashmaps as "frozen functions" way back when. You can easily find the set-valued inverse of a function by saying
{v: [k for k in d.keys() if k[v]==v] for k, v in d.items()}
and that's close to the mathematical definition too.
The problem is that it gets very complicated real fast once you start dealing with non-trivial expressions as arguments, shadowed identifiers, and recursion.
What I like most is that because they typically start you off with a simple file and a "run" button, there is no "how do I get this going" you just paste in your "Hello World" code sample, and you're off to see it live in seconds.
I would never use it to build a startup or some production tier work, but for prototyping its great and has significantly less distractions, you're in there to edit code and get out.
I wish Go, Rust, and even D had editors in a similar spirit to the ones I've mentioned. I feel like adoption rate for those languages (specifically D and Rust) would probably rise, especially if you bundle it all-in-one for beginners as some of these editors do (definitely Processing does!). This also would force Rust and D to consider the possibility of having a minimal built-in UI library, which I hate that these new languages do not go that route, it is why Electron is the lingua franca of UI these days.
I think Replit is closest to this with a wide variety of languages.
It's nice for quickly verifying something.
I actually use it regularly to run small snippets of code. It's integrated into the documentation, for example https://dlang.org/phobos/std_algorithm_searching.html#.find, so that you can play with the function to see how it works.
I haven't seriously used Repl.it, but how close does it come to providing something like this experience for those languages?
Additionally, if you had these bundled editors, and offline copy of your docs for that language release, you could essentially have everything someone needs to learn a language in one shot, even if the internet is unavailable momentarily.
I've used Thonny to teach programming to complete beginners with good results.
Most people love it and are loathe to switch to VS Code to PyCharm later on in the course.
What really works nicely for teaching is that after code is run from .py fle, session stays interactive and you can use commands from REPL and see variable values, types, ids.
Really helpful when starting out.
When switching to VS Code, students are confused why debugger is not "live" after code is run.
Some tiny pain points with Thonny:
I do wish a few keybindings were more "usual"
For example un/comment is Ctrl(Cmd)-3 . It makes sense for Python, but Ctrl-/ is pretty much standard everywhere else.
Also pop up help for functions and classes and tab completion does not work too well (at least on versions under 4).
Thonny has a nice built in interface to pip. Unfortunately it used to conflict with Anaconda installations.
Had a case 2 years ago when half the class had problems with packages because Thonny was installed ahead of Anaconda.
Maybe those issues are fixed now in the latest version.
Anyway, I think this would be an excellent resource for him to take his first steps.
Perhaps start w/
This is also my favourite way of packaging python apps. Excludes all need for layer upon layer of external packaging, dependency, and distribution requirements.
but in any case, even if it werent, the point I'm making above is exactly that you dont have to use external programs to package, distribute, or manage your "app". it's just a normal python package, run as nature intended, so to speak.
For the latter specifically, Thonny has a mode where for every call stack frame, it opens up a separate child editor window that displays the code of the function in that frame, highlighting the current line. When you step through, the visual substitution of expression results happens in the window for the frame where it is happening. Thus, when you have a chain of recursive calls, you can see all the substitutions that it took to get there.
102 comments last January: https://news.ycombinator.com/item?id=25674134
https://datasheets.raspberrypi.com/pico/raspberry-pi-pico-py... Page 27, (PDF)
Thanks for that. I spent part of the day fighting with my kid's Windows 11 PC to properly install the requests module in the Python IDLE, without success. He had Thonny already installed and installing requests was a snap.
Would make it much easier to introduce the language.
Completely in the browser.
I'm on a phone right now so I can't try it, but does it by any chance allow evaluation in the paused state? That's also been pretty handy for me when teaching beginners.
Another option would be Mu: https://codewith.mu/
Anyway, it must've helped give him the bug because a couple years later he was asking to help me load software onto his Raspberry Pi-powered car, entering Linux commands with ease.
He turns 12 this year. He's probably outgrown Thonny. I bet he's ready for Emacs.
https://github.com/thonny/thonny/blob/bd9614be483e80c28b0166...
However, experienced developers may appreciate the extra features of using their favourite IDE combined with mpremote running in a terminal:
https://docs.micropython.org/en/latest/reference/mpremote.ht...
It's pretty magical to mount your PC filesystem on an embedded device - and extremely productive!
I hadn't even heard of it before I purchased one of the above (I'm well versed in just using vim or PyCharm), but it seems great for newbies. Things like this need to exist - UIs like PyCharm are overwhelming for starter programmers.
I downloaded and installed the Mac version, I wrote a basic program to play with it, clicked the little "bug" on the top, and the entire program crashed, which is a pity because I think this could be really useful for my students.
And if I can add something, I feel like the addition of plugins might overcomplicate things and, at that point, maybe the users are ready to move into another IDE? Not saying it is bad, just maybe that not all IDEs need plugin support.