After that you might understand the OP's viewpoint.
After that you might understand the OP's viewpoint.
What made Virtual environments work for me was switching to a different Editor. I use Visual Studio Code currently it works well with Virtual Environments.
When you first create a new python file in a given "project folder" it prompts you to create a new Venv and when you switch project folders it remembers and restores the Venv for each project.
One of my work colleagues pointed me to VSCode - it streamlined a lot of python things for me.
If your students are disciplined about creating a new folder for each project managing virtual environments vscode could help them.
Only issue I have is my work office has a corporate proxy setup and pip needs certificate to connect (and if I work remotely I have to turn this setting off) I wrote a shell script to toggle between the two proxy settings. Not sure if university will have the same issue proxy issues but if so this would certainly be a pain point for many students.
It does answer the question of which text editor to use when the time comes to teach them about editing text files. For a course, it helps that it is free and available on both macOS and Windows.
I have a vague recollection that at some point I was testing without an install of Python and after I selected the Python extension for VS Code, it offered to install one for me. (I don't recall if this was on macOS or Windows and memory could be playing a trick on me.) But in any case, the people behind VS Code do seem to be trying very hard to make it easy for someone who is getting started.
I am a little uneasy about the nudges to use Copilot, but on balance, it might offer a better path for students who are getting started.
I think it is interesting to consider why Python is so popular despite such fiascos. The answers can be very informative but can also be giant red flags.
C/C++? Full of footguns. Java/C#? Too complicated for beginners. Pascal? Outdated. Etc.
I personally prefer C to teach first-year CS students but just as the lesser evil. A good first programming language is sorely lacking.
(Note that I'm talking about the imperative programming paradigm. The debate on whether one should start with functional programming is outside the scope of this comment).
Java's tooling is nice, but frankly Turbo Pascal (or something at its level) is enough for beginners.
C is indeed pretty evil, though slightly less though with modern sanitisers, so you can get a better error message than just a segfault (or silently doing the wrong thing).
Pascal isn't really more outdated than C. Especially if you use Delphi?
Python is actually fine, you can get pretty far with just the standard library, and the libraries that you can install with your Linux distribution's package manager (eg via Pacman). I do agree that package management with Python is pretty bad out-of-the-box.
The answer is really quite simple: F#
If they can’t manage that they have no business doing data science or something similar to begin with
var start = "commtext c00\">";
var end = "</div>";
using var http = new HttpClient();
var page = await http.GetStringAsync("https://news.ycombinator.com/item?id=41425416");
var commStart = page.IndexOf(start) + start.Length;
var commEnd = page.IndexOf(end, commStart);
Console.WriteLine(page[commStart..commEnd]);
or var host = WebApplication
.CreateBuilder()
.Build();
host.MapGet("/", () => "Hello World");
host.Run("http://+:8080");I can teach them a console app with top level statements and have it running before they have installed a Python virtual environment.
I like the recent addition of (proper) pattern matching to Python.
can you? Because I can't.
e.g. "What is the difference between venv, pyvenv, pyenv, virtualenv, virtualenvwrapper, pipenv, etc?" ( https://stackoverflow.com/questions/41573587/what-is-the-dif... )
what is the difference between conda and anaconda?
etc etc
The projects I work with have moved to it because it handles multiple languages (not just Python). It's made things easy to keep "the correct version of a language" that each project needs.
So far so good, anyway. :)
I could see giving them a remote access to a prebuilt env (which can be containerized) to be simpler to explain.
You don't see people complaining that musical instruments are unreasonably complex when that complexity usually gets solved after a couple months of training, or when someone who wants to basic woodworking has to have at least a passing knowledge of the different types of hardwoods, MDFs, and essential joinery techniques.
Hate to say, but it definitely sounds like skills issues.
Simple things like having a student access another student's web server becomes overly complicated, as you're dealing with 4 systems talking to/through each other.
Sure making them understand everything is a journey, but just spawning the server is fairly quick and painless.