5 ms·
My colleagues and I have been discussing recently if we should use Positron IDE as a common environment for teaching R and Python. Emacs is another option, of c
by macleginn 2y ago
My colleagues and I have been discussing recently if we should use Positron IDE as a common environment for teaching R and Python. Emacs is another option, of course.
- setopt 2y agoI love Emacs, but I think it would be challenging to teach an intro programming course using it these days. (We landed on VSCode for teaching Python.)
- nextos 2y agoThe basics of Emacs are not that hard. One of my introductory freshman courses taught us XEmacs in parallel, as we went through Lex & Yacc. Basically you need to learn a few basic movements, which are also really useful on any terminal thanks to GNU Readline, and a some basic concepts like the minibuffer, interactive commands, etc. From there onward, things are quite easy to discover little by little, especially with newer packages like vertico, marginalia or which-key. Obviously, its much harder than VSCode, but investing on Emacs is IMHO worth the effort if one values stability. It will be probably still relevant when most competing solutions are gone. Plus, it offers great support for lots of niche languages and workflows, like Org.
- _mlbt 2y ago> Basically you need to learn a few basic movements, which are also really useful on any terminal thanks to GNU Readline This is one of the biggest reasons why I’m slowly switching to Emacs for most of my editing needs. Those movement keyboard shortcuts are ubiquitous on UNIX family operating systems. They even work in most native text editing fields in macOS and iOS.
- nextos 2y agoI agree, having a subset of Emacs/Readline keybindings available everywhere on macOS is really convenient and made Emacs quite natural to use for me. GNOME used to have an Emacs GTK key theme, but it is no longer available as of GTK 4.0?
- setopt 2y ago> They even work in most native text editing fields in macOS and iOS. Some of them work, e.g. C-a/C-e, which is nice. However, after hearing about that "Readline keybindings work everywhere in MacOS", I was quite disappointed when I finally bought a Mac and the more useful Emacs/Readline bindings like M-f/M-b/M-d were all missing. I'm still happy with my Mac overall, but I wish they went further in this regard.
- _mlbt 2y agoI think that’s because the Meta key is the Option key on Macs which conflicts with some traditional keyboard shortcuts for other things in the OS.
- spudlyo 2y agoThere are conflicting systems in macOS at play here as a result of choosing the "Option" key as your "Meta" key. The basics of the Cocoa Emacs Keybindings (DefaultKeyBinding.dict) do allow for M-f/M-b/M-d to work as us Emacs users expect, however there is a conflict with the default US Keyboard Layout, which hijack these useful Option key sequences to allow for the easy input of letters with various diacritic markings. If you want to undo this, you can use a Keyboard Layout Editor like Ukelele[0] to make a custom layout that allows these key sequences to arrive unmolested at the Cocoa input system. [0]: https://software.sil.org/ukelele/ https://software.sil.org/ukelele/
- TheGrassyKnoll 2y agoLol. Geez, we gotta do something about key sequences getting 'molested'...
- koito17 2y agoFor M-b and M-f, the equivalents are M-<left> and M-<right>
- faizshah 2y agoI think it depends on how new your students are to programming. If they are already coding and have their favorite IDE then it would be nice to force them to try something new to see a different workflow (even if they end up going back to vscode later). On the other hand for newer programmers you want to focus less on the tools, installation and workflow and more on just getting them programming. In that situation the batteries included environments like RStudio would be preferred. Another practical thing to think about is how much you and your TAs want to wrestle with installation issues vs just giving them a web based notebook environment like Colab.
- fuckyah 2y agoVS Code + R extension is pretty good.
- bachmeier 2y agoThis semester is my first using Posit Cloud. It removes the headache whether you're teaching R or Python. The only thing I've found annoying is the need for students to install their own packages. I ran my own RStudio Server on Digital Ocean for years. That worked very well, with students not needing to install packages, but maintaining things myself created more work for me. Before that I had to deal with an unending string of support for the students using their own computers. I would never go back to that again. I used Cocalc once during the pandemic. It has a great set of features, but the students found the interface confusing.
- ekianjo 2y ago> support for the students using their own computers. painful but thats how you teach people to fish instead of being consumers.
- bachmeier 2y ago> thats how you teach people to fish If you're teaching a cooking class, you're wasting valuable time teaching people how to fish. But that wasn't really my point. A lot of the wasted time was mine.
- stackghost 2y agoI'm in an MBA program and in my data science course (aimed at non programmers obviously) the prof used R and Rstudio. At first I thought it was a bad choice, and I did all my assignments with Emacs/ESS. I preferred it, as I do almost all my coding in emacs and of course it's easy to define custom shortcuts to insert the un-ergonomic R operators like the magrittr pipe. But I came to realize that the way Rstudio is self-contained, and oriented around "sessions", or notebook-style code, makes it easier for neophytes to pick up. I can't imagine how difficult it would be to teach a bunch of non programmers how to deal with python given the insane situation with venvs, pip vs homebrew, and 2 vs 3, imports, etc. 80% of my cohort are the type of people who think using the terminal constitutes "hacking" in the CrashOverride sense.
- darby_nine 2y ago> 2 vs 3 Is this really still relevant? I've been using only python3 for well over a decade now and I can't remember the last time anyone even suggested I use python2. the rest of your critiques ring true though.
- stackghost 2y agoMaybe you're right and it's not, but Python is definitely a Rube Goldberg machine of tutorials, libraries, and people who will tell you with a straight face that it's reasonable and expected to have 3.10, 3.11, and 3.12 installed alongside each other because reasons. I say this as someone who writes a fair amount of python and whose package manager decided to install 3.10, 3.11, and 3.12 as dependencies. Anyway, try explaining that to a bunch of business school people who are accustomed to just doing everything in the latest version of Excel, whatever that happens to be.
- macleginn 2y agoThey will soon have a convenient starting point: https://support.microsoft.com/en-gb/office/introduction-to-python-in-excel-55643c2e-ff56-4168-b1ce-9428c8308545 https://support.microsoft.com/en-gb/office/introduction-to-p...
- ekianjo 2y agopositron is nice but still very much in alpha stages. may be better to wait for a year or so