exercism / r

Exercism exercises in R.
https://exercism.org/tracks/r
MIT License
26 stars 38 forks source link

Update INSTALLATION.md #315

Closed rainerrodrigues closed 7 months ago

rainerrodrigues commented 7 months ago

I have added another bullet point for optional installation of Anaconda so that User don't have to install additional IDE for both the Python and R track.

github-actions[bot] commented 7 months ago

Hello. Thanks for opening a PR on Exercism 🙂

We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in.

You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch.

If you're interested in learning more about this auto-responder, please read this blog post.


Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.

colinleach commented 7 months ago

I'm not sure how we feel about Anaconda, so I'll leave @jonmcalder to comment on that. My own prejudice is that Anaconda brings in a lot of things, so I prefer to install Miniconda for the base environment and other packages as needed for each further environment (Python, R, Julia, whatever). Opinions no doubt differ!

Reading through the whole of this installation.md document, I was struck by the last paragraph that mentions magrittr. I think we should update this to mention tidyverse which was recently added to the test runner.

BethanyG commented 7 months ago

@rainerrodrigues Hi 👋🏽

Python track maintainer here. I use Anaconda daily, and I really like conda and the other tools that are packaged with it. I can only speak from the Python track perspective, but I do think some of the same considerations apply to R as well.

While we do mention Anaconda/conda in passing in the Python track docs, we don't strongly recommend it to Python language beginners for multiple reasons:

  1. Exercsim was designed to help software engineers skill up on programming languages. While the Python science stack is widely used, it is not the core of the programming language. Learning the science tools is a supplement, but not a replacement for learning to code in idiomatic Python. This is somewhat different for R, but I think it still generally applies.
  2. None of the libraries it installs for Python are usable to solve exercises on the Python track. We only support the standard lib for Python in our tooling. This difference could really confuse and frustrate learners.
  3. It has a different package manager (conda) than what many Pythonistas are used to from the web and the official Python docs (pip). That makes it harder to find help with it.
  4. The full version of Anaconda automatically installs and enables a very large base env that it doesn't warn users about, and that they have no idea how to disable initially. It takes up a LOT of space that users might not have to spare.
  5. It encourages the use of a GUI to manage venvs and associated programs, so users can't use any of the answers or directions out in circulation for the command-line.
  6. It has a different terminal for use with Git, and makes it difficult for users to install or use alternative Git helpers.
  7. It can cause conflicts with other installations of Python (DMG version, Homebrew version) that are subtle and not easy to solve.
  8. The built-in IDE (Spyder) - while great - behaves differently than the more-used Python IDEs such as VSCode and PyCharm. And the Anaconda version is behind the stand-alone version of Spyder.
  9. RStudio/Posit have their own way of supporting R and Python (and interoperating between them) -- and this differs from the way Anaconda supports them. Since RStudo/Posit is also widely used, this adds more configuration considerations, differences in behavior, and issues to the pile.

Again - I use and love Anaconda, but I think we should be careful about recommending its use to learners starting out. Feels like there are some significant pitfalls.

jonmcalder commented 7 months ago

Hi @rainerrodrigues! Thanks for raising this.

And thanks @colinleach and @BethanyG for weighing in here.

I think @BethanyG has said it better than I could and I agree that many of the same considerations apply from the R perspective.

In my experience Anaconda (or other conda variants like Miniconda etc) are commonly encountered and useful when working in "scientific" computing contexts where somewhat heavy package / dependency / environment management can be required and sometimes as a way of facilitating interop between python and R , but as already pointed out neither python nor R are confined to scientific computing (just strongly affiliated) and even in this space different tradeoffs / preferences will apply for different users and use cases so Anaconda is not something I'd suggest or push strongly in the Exercism context or for beginners.

That being said however, I do concede that the current installation doc pushes RStudio strongly without mentioning other popular alternatives like VSCode, Emacs, Vim etc. Do you guys think it should be softer in that regard and suggest more alternatives? Or not mention a specific IDE at all?

Up until now my thinking has been that those who really want to use an IDE or editor they're already familiar with will explore that option naturally on their own either upfront or whenever suits them. But for someone who doesn't know where to start, I think being pointed in a single direction is better than being given a range of options and for starting out with R, I believe RStudio is the most obvious choice because of the way it ties together an editor with REPL, help docs, viewer / environment pane etc without needing to setup any plugins or config.

If anything else is to be added, my preference would be to mention the R Extension for VSCode which is widely used by the R community (and also because many will already use VSCode as an IDE for other languages).

And yes @colinleach you're right that we should update the {magrittr} bit to mention the {tidyverse} instead now that it's supported by the test runner.

@rainerrodrigues would you be willing to update your PR in line with what's agreed upon here? (assuming we haven't put you off)

rainerrodrigues commented 7 months ago

Thanks a lot for sharing your wonderful insight! @colinleach @BethanyG @jonmcalder

I understand that it might detract the focus of beginners from the goal of Exercism and I will try to keep it optional.

Should I update to include VSCode extension for R ?

BethanyG commented 7 months ago

That being said however, I do concede that the current installation doc pushes RStudio strongly without mentioning other popular alternatives like VSCode, Emacs, Vim etc. Do you guys think it should be softer in that regard and suggest more alternatives? Or not mention a specific IDE at all? .... I believe RStudio is the most obvious choice because of the way it ties together an editor with REPL, help docs, viewer / environment pane etc without needing to setup any plugins or config.

Agree. I think its true that many folx who go to learn R end up installing RStudio because it has been around a while, and Posit is so active in the r-related data science community. It also gets recommended a lot for courses (or at least it did). It is very easy to download and set up. So some students may not be aware that it is even possible to install R and use a different IDE or editor. So that (might?) be argument enough for providing at least 1-2 alternatives. Or not.

If anything else is to be added, my preference would be to mention the R Extension for VSCode which is widely used by the R community (and also because many will already use VSCode as an IDE for other languages).

Yup. That's what we did for Python. The VS Code extension for Python is run by a Python Language Core dev, so its really up to date and has really good support.


We had an issue on the Python track where PyCharm has a lot of mindshare, as does JupyterLabs for data-sciency stuff. And then there was VSCode eating the code-editor universe (many online coding sites have or use the Embedded VS code editor - including codespaces here on Github).

So for our docs, we wanted to make sure students were aware that they did not need to buy and IDE (PyCharm or others), and that they also did not have to install a bunch of the scientific python stack and use Jupyter - which wouldn't help them much at all with running tests or solving exercises.

So we ended up listing out a bunch of stuff, starting with VSCode. I think it probably had the net effect of steering most students that direction, but at least they can scan down and try out others if they feel like it. 🤷🏽‍♀️

We do, however have separate installation from development tools. And we point at the PSF installation method rather than any distro like Anaconda or homebrew.

colinleach commented 7 months ago

I think this is superseded by #316 and can be closed.

jonmcalder commented 7 months ago

Thanks again to all 3 of you for your input on this - especially @BethanyG for your insight.