9 ms·
Code with Mu: a simple Python editor for beginner programmers
- miduil 8y agoThe editor was used at David Beazley's talk [1] "Die Threads" at the EuroPython 2018 by live coding how threading in Python could look like [2]. [1]: https://youtu.be/FsvmT2Ir7B8?t=26m https://youtu.be/FsvmT2Ir7B8?t=26m [2]: https://github.com/dabeaz/thredo https://github.com/dabeaz/thredo
- devxpy 8y agoI was wondering what editor that was and just saw this post xD. David's talks always have these funky looking editors.
- hprotagonist 8y agonormally it starts with a hacked-to-hell-and-gone iterm2 session.
- 8_hours_ago 8y agoAre there any talks in particular that you recommend? I love to watch live coding to see how other programmers have their development environments set up.
- devxpy 8y agoDavid probably isnt the best guy for that. But here's one of the famous ones on GIL. https://youtu.be/Obt-vMVdM8s https://youtu.be/Obt-vMVdM8s Beware though, his talks are known to be devastating to the programmer, resulting in serious head injuries, trauma, headaches and other fun stuff.
- tudelo 8y agoBy the way, if you want to watch some impressive live coding presentations, +1 for David Beazley.
- ModernMech 8y agoHere is the source, which strangely enough I don't think is linked from the website, unless I'm just missing it: https://github.com/mu-editor/mu https://github.com/mu-editor/mu
- paradite 8y agoYou go here: https://codewith.mu/en/developers https://codewith.mu/en/developers Which links to here: https://mu.readthedocs.io/en/latest/ https://mu.readthedocs.io/en/latest/ Which links to github (Watch button): https://github.com/mu-editor/mu/ https://github.com/mu-editor/mu/ I guess they didn't want "users" to accidentally think they need GitHub or read the "developer docs".
- ntoll 8y agoGot it in one! I spent a LOT of time working with beginner programmers and saw many examples of learners finding their way into documentation and sources of information that were unhelpful, intimidating or not intended for them. Chaos, confusion and disappointment would ensue and this would take a significant amount of time and effort to undo. https://codewith.mu/ https://codewith.mu/ and https://madewith.mu/ https://madewith.mu/ are both websites for the target users of beginner programmers or those teaching coding (Python). Mu's developer docs are in the "usual place" for Python projects (mu.rtfd.io) and I hope they make sense to any experienced developer. All feedback most welcome.
- rendaw 8y agoI would not go to the off-site technical documentation to find a link to a project's source code, normally.
- ntoll 8y agoHi, I created Mu. Happy to answer any questions you may have. :-)
- severine 8y agoHi, congrats and thanks! What's been your rationale when deciding what are the most essential features? Do you envision Mu as being someone's learning-to-code editor, then "graduating" to one of the big players or you think one can "grow into a programmer" and keep "living" in Mu? (edit: the 2nd question is answered here: https://codewith.mu/en/tutorials/1.0/moving-on https://codewith.mu/en/tutorials/1.0/moving-on)
- ntoll 8y agoThank you! The rational for deciding features is three-fold: * A positive answer to, "is it going to make it easy for a beginner to write, execute and change code?" is the first requirement (we check this with user research -- I've observed lessons, code clubs and other beginner-related activities as well as interviewed teachers and learners to find out how they react). * Alternatively, we checked the features the Raspberry Pi Foundation had feedback about. For instance, the zoom in/out buttons were one of the most requested features from teachers in feedback to the RPi education team. When I demoed this to teachers for the first time there were gasps of amazement (which made me smile, given what a simple / easy to implement feature this is). This is extraordinarily useful in a classroom situation and for learners who may have a visual impairment (such as older learners with bad eyesight... a group I had never initially thought would want to learn... but hey... I rather like the idea of Granny coding Python). ;-) * Can we demonstrate an obvious progression from Mu's (simple) implementation to a similar feature in an editor to which the user is likely to graduate? For example, the visual debugger is very simple, but looks similar enough to a "proper" debugger in a professional IDE that a beginner graduating to such an environment won't feel out of their depth. Once a feature is "in" a lot of time and effort is spent making it as simple yet useful as possible. This is likely to be the first time someone will have used such a feature and we need to ensure that the intention is clear, the use is obvious and the outcome useful from the perspective of the learner/teacher. We also have a "rule of three" when it comes to "nice to have" features... if three people independently ask for something we try to implement it (a good example being toggling on/off of commenting).
- maltalex 8y agoHaven't seen Mu before. What's the benefit over giving a beginner a copy of VS Code?
- ntoll 8y agoVSCode is for professional developers... while this may look beautifully simply (because it is) to experienced developers like you and me, it still isn't particularly "friendly" for beginners. The point of Mu is to be the first editor you use... it introduces you to the various concepts and capabilities of IDEs in a simple, approachable and coherent way so you quickly graduate to something like VSCode. As I say in my PyCon talk (linked to in another answer), if you're still using Mu as your main editor after becoming proficient in coding, you're doing it wrong (and should graduate). Hope this makes sense.
- sandGorgon 8y agovscode has a pretty awesome plugin capability. why did you choose to focus on creating an entirely new editor vs creating a very opinionated plugin for vscode ?
- ntoll 8y agoMu is an accident. I was one of the volunteers who contributed to the BBC micro:bit project under the auspices of the Python Software Foundation. I actually wrote the browser based editor and, like a conscientious developer, tested it on teachers. The feedback was pretty resounding: while the browser is convenient the limitations of not being able to connect to the MicroPython REPL, having to download a hex file, copy it to the device and wait in order to run your code was also a stumbling block. It was a rainy Sunday afternoon and I asked myself, "how hard can it be to write a simple editor that was a native application so I could connect to the REPL and automate the flashing of the device?" Fast forward a bit and Mu appeared, teachers used it with the micro:bit and started asking for it to be a "generic" editor for Python (not just micro:bit). The Raspberry Pi foundation's education team also wanted a generic Python editor based on the feedback they'd received from teachers and learners and so they supported me to make the editor modal (i.e. there's now Python3, PyGame, Adafruit and micro:bit modes) with a visual debugger for Python 3 mode. So, be careful what you hack on a Sunday afternoon... I certainly wasn't expecting this to happen. ;-)
- mdhughes 8y agoWhy would someone use this instead of IDLE, which ships with Python and does the same things?
- ntoll 8y agoIDLE has lots of problems for beginners, isn't accessible for certain users and is a difficult code base to change. Mu is largely based upon the feedback given to the Raspberry Pi Foundation from teachers and students who have used IDLE. My talk at this year's PyCon mentions some of this in passing: https://www.youtube.com/watch?v=T5IAf5vGGSk https://www.youtube.com/watch?v=T5IAf5vGGSk
- gigatexal 8y agoIn a round about way Dave Beazly endorsed this editor for beginners in his Die Threads talk from euro python 2018. That’s high praise.
- gigatexal 8y agoShit I was beaten to the punch. https://news.ycombinator.com/user?id=miduil https://news.ycombinator.com/user?id=miduil
- Keyframe 8y agoThis is fantastic. Never knew about it, but now I know what to give to kids interested in learning programming!
- dotancohen 8y agoMy 9 and 11 years olds write Python in VIM, and have been for about two years. Learning VIM itself can be fun, if you teach it properly. And it is a skill for life.
- vuln 8y agoAnd tips on teaching it properly?
- Keyframe 8y agoI've forwarded this video: https://www.youtube.com/watch?v=5r6yzFEXajQ https://www.youtube.com/watch?v=5r6yzFEXajQ to several friends, and they all 'got it'. No one moved to vim though.
- dotancohen 8y agoMotivation! We started with a goal, in our case it was to recreate the car from the `gti` command (git wrapper). I created a file with maybe a dozen lines of 72 spaces, and let them get to work. They started with basic hjkl navigation and the i command, then they learned to replace with r and jump to specific location with /. After that I was simply answering their questions, as they already understood that everything has a shortcut.
- Keyframe 8y agoI'm 38 and use vim since Amiga days and vi before that and would never even consider giving vim to anyone starting out! How do you teach kids that? I know kids learn fast, but still. Aren't they in a phase where they ought to catch on 'normal' things first in apps, isn't wrestling with vim averting they concentration from what they should be paying attention to (python)?
- hacker_9 8y agoAs someone who doesn't write python regularly, wasn't python supposed to be human readable for non coders? Or not need an IDE to be understood? Clearly very different messages being transmitted here.
- untog 8y agoI don't see how the two things contradict. You still need a "run" button for even the most readable code. And syntax formatting, auto-complete etc is always going to be useful no matter what. At the risk of stating the obvious, this is for making code human writable, not human readable.
- lichenwarp 8y agomy first editor was visual basic 6, (aim/aol/progz) days. I've seen it posted on twitter and really like the interface, I think it will be very useful, I guess we had to learn the "hard" way.
- kovek 8y agoI really like that in the tutorials, there is a “Moving on from Mu” page. It shows that there is a clear understanding of the goals and scope that Mu should strive for.
- ntoll 8y agoThank you!
- dgasmith 8y agoIs there a compare and contrast of this editor against other similar efforts such as Jupyter?
- ntoll 8y agoActually, Jupyter is used in Mu: the Python3 REPL is an iPython notebook. ;-) Mu is a code editor, Jupyter is more an unfolding of thought and code (i.e. they're different). My aim is to complement and amplify the amazing work that Jupyter are doing and suggest people look into using Jupyter "proper", in the "Moving on from Mu" tutorial page (https://codewith.mu/en/tutorials/1.0/moving-on https://codewith.mu/en/tutorials/1.0/moving-on).
- philonoist 8y agoBut how is this different from thonny.org? How do they both compare?
- ape4 8y agoSurprising that "theme" is considered essential.
- ntoll 8y agoYes, very much so... here's why: In many schools the projector used in the front of the class is old and/or inadequate. Depending on the conditions, some work better with "light" applications, others better with "dark" ones, and some are so bad the only solution is a "high contrast" look (which also aids those with visual impairments -- education and the tools thereof should try to be accessible to all). Like zooming in/out, this was a bit of a favorite complaint of teachers which was very easy to fix in order to help them overcome the widespread hardware inadequacies. I guess the moral of the story is: "assume nothing". Hope this makes sense. ;-)
- raegis 8y agoA++++++ Thank you for understanding, as I plug my laptop into the VGA connector at school.
- craftyguy 8y agoHow is this licensed?
- moreati 8y agoIt's GPL 3
- fladd 8y agoIt is entirely not clear to me which Python binary this editor uses by default. It is most definitely not the one that the `python3` command on my system is set to. Hence, it finds none of my packages. The editor seems to use some Python 3.6.5 (where ever that comes from), while on my system 3.7.0 is installed.
- ntoll 8y agoAs mentioned elsewhere, the feedback we got from educators was that they just wanted everything packaged in with Mu, including a working version of Python. That's why you're seeing the behaviour you report. However, you could also use your system Python and do: pip install --user mu-editor
- fladd 8y agoThanks for clarifying this. This was not clear from the website. So Mu is actually not a "simple editor", but a full Python distribution :-)
- fladd 8y agoI now did install it with Pip, and while the REPL now sees my correct Python version (3.7.0), it still does not know any imported packages that are installed in this system Python. Unfortunately, there also does not seem to be any setting in the editor where I can change which Python it uses, nor can I see which one has been chosen for me.
- allan_s 8y agowould be great if it integrates ideas from http://www.pythontutor.com/ http://www.pythontutor.com/