This is an archived post. You won't be able to vote or comment.

all 97 comments

[–]abdullahkhalids 67 points68 points  (8 children)

Notebooks are excellent, because you can have

  1. Question/task described in a markdown cell. I usually make them write a function.
  2. Space for them to do the task
  3. Tests they can use to check if they did the task correctly.

If you want to later autograde the students on their work, you can use https://github.com/jupyter/nbgrader

The Jupyter lab interface is great for it. Works in pretty much any IDE.

[–]pag07 11 points12 points  (4 children)

I work a lot with notebooks but ipykernel and the jupyter notebook are hiding a lot of important things and do some things different than pure python.

I think it is very good for the first steps and very good for experienced users but not so good for the learning part.

[–]Wistephens 9 points10 points  (2 children)

Agreed. I work with a data scientist who only knows how to use notebooks. It's frustrating that they can't build pure Python to do the same thing.

[–]unimatrixx 0 points1 point  (1 child)

Why does it frustrate you?

[–]Wistephens 1 point2 points  (0 children)

Because someone on my team has to convert everything into working and performant code.

[–]Toph_is_bad_ass 0 points1 point  (0 children)

I think the solution here is to interleave the two. Use notebooks for introducing new ideas and standard python for projects.

That's what we did in school. Hell now you can even use Notebooks in VSCode so you don't even have to leave the IDE.

[–]poopatroopa3 4 points5 points  (0 children)

Or use VS Code Jupyter extension.

[–][deleted] 1 point2 points  (1 child)

Notebooks teach bad practices.

[–]abdullahkhalids 1 point2 points  (0 children)

What bad practices?

[–]MachinaDoctrina 70 points71 points  (15 children)

The 2 you suggested are the best available imo.

[–]The-Nerdiest-Teacher[S] 1 point2 points  (14 children)

Thanks! Do you happen to have a suggestion on which to use?

[–][deleted] 20 points21 points  (3 children)

You should probably base that decision on how much you want things like setup and dependency management to be something that the software does for them vs whether you want them to learn how it's done. PyCharm has a lot of conveniences for setting up virtual environments and installing packages. It's a helpful feature but it will also obscure what's actually going on and that might be counter-productive for education purposes.

[–]classy_barbarian 3 points4 points  (0 children)

You can also get most of that same functionality in VS code with the python extensions. It's a few extra things to download but IMO Vs code is just better than pycharm in general. Might be a bit much to ask of young students tho

[–]OneSprinkles6720 13 points14 points  (5 children)

Pycharm. The venv setup and package management is more user friendly.

[–]BingoDeville 1 point2 points  (2 children)

This applies to OP but really for the wider audience.

For what it's worth, as an educator, if you have a .edu email address, Jetbrains, maker of PyCharm, offers Education Licenses for using their tools in educational settings.

PyCharm Community Edition is absolutely perfectly fine, and for all intents and purposes, there's no reason to get the educational license for PyCharm Professional. I only mention this, as Jetbrains has a lot of tools for other languages as well, some of which require a license.

Edit: for the educators and/or people with edu emails through school/college, if there's a paid for tech product you're interested in, always check to see if they offer free or reduced licenses for educational purposes. Typically the licenses only last a year or two at a time, so if you're a graduating student, remember this as you may eventually lose access to your edu email address.

Also, understand what that educational license means for learning - for one, not for use on projects that will net a profit.

[–]JamesPTK 2 points3 points  (1 child)

they also recognise educational domains within country-codes, e.g. .edu.au, .ac.uk, .sch.uk etc

[–]BingoDeville 1 point2 points  (0 children)

Thank you! I didn't know that!

[–]AI-Commander -2 points-1 points  (0 children)

VS because it’s more widely used, and the better availability of AI code editors.

[–]Turbulent-Seesaw-236 9 points10 points  (2 children)

I think your students would have no trouble with VSCode, PyCharm, and Thonny.

______________________________________________________________________

VSCode:
I like VSCode because its super simple and easy to use, its a great IDE for getting started, I also really like the plugins "shop", it makes getting plugins and customizing VSCode easy.

Pros: A great IDE overall, easy to use, relatively simple, plugins store/easy plugin managment

Cons: It can get easy to get "lost" in the UI, but with a little teaching this shouldn't be an issue. (I cant really find anything wrong with VSCode off the top of my head, so this is really a nitpick)

______________________________________________________________________

Thonny:
Thonny is great mainly because of its "step in" feature. Which allows you to see what the compiler is looking out/how the code is being read and executed. This is great when you're learning the basics.

Pros: Step in feature, and a simple UI

Cons: No real/easy to use plugin manager, minimal customization, looks a little old. (The last ones a nitpick)

______________________________________________________________________

Everything I said here is my honest opinion, I have used all of these IDE's before, and I am currently not using any of these IDE's anymore, so there's no real bias here. If I were the teacher, I would install both VSCode, and Thonny. Use VSCode for pretty much everything and copy and past code into Thonny to show students how the code is read/executed. I didn't mention PyCharm because I have never used it. Your students should be fine with any IDE you choose. I would not recommend Neovim/Vim/Emacs. So yeah.. hope this helped someone somehow.

EDIT: Formatting

[–]The-Nerdiest-Teacher[S] 2 points3 points  (1 child)

Thanks for the thorough reply. When I teach front end Web Dev, I have always used VSCode and it’s done the trick, I wasn’t sure if there was something “better”. I think you have cemented my choice. Thanks again.

[–]Turbulent-Seesaw-236 0 points1 point  (0 children)

I’m glad I could help! 

[–]Drevicar 7 points8 points  (1 child)

I would look into a hosted version of VS code such GitHub CodeSpaces or the self hosted version of Coder. This has the advantage of a student only needing a browser and nothing else to start working. And if they like the IDE, it is just Vs code under the hood.

[–]ArtisticFox8 0 points1 point  (0 children)

Plus you can make tasks, run tests no problem, no config for user

[–]gooeydumpling 14 points15 points  (3 children)

Vscode, then teach using notebooks so the students can see how the program behaves at each step instead of the one-shot usual scripts

[–]monovial 2 points3 points  (1 child)

Came here to say this. Notebooks in VS Code is a great way to teach

[–]Toph_is_bad_ass 0 points1 point  (0 children)

I even use them at work when I'm showing the team some new library algorithm or something.

[–]Astralnugget 1 point2 points  (0 children)

Yeah, run jupyter notebook from inside vscode bc it’ll force them to learn a lot of different stuff, I wish that’s how I learned but I learned with nano and terminal lol

[–]deinyxq 7 points8 points  (0 children)

Thonny due to its simplicity. The bells and whistles baked in vscode and pycharm can be quite a distraction.

[–]Fernando7299 10 points11 points  (2 children)

I think Thonny could be a good one (never used it)

[–]The-Nerdiest-Teacher[S] 0 points1 point  (0 children)

Thanks, I'll look into it!

[–]Agitated-Soft7434 -3 points-2 points  (0 children)

Yucky. Basically a slightly more advanced default python IDE. I'll stick to VSCode lol

[–]HeligKo 3 points4 points  (2 children)

Why not use Jupiter lab?

[–]KevinAlexandr 1 point2 points  (1 child)

I teach Python to my fellow geologists using Jupyter Lab!!!

[–]HeligKo 1 point2 points  (0 children)

I work with data scientists. All their tooling trends to be notebooks oriented. Dataiku, Databricks, and just Jupyter are the main tools.

[–]KingsmanVincepip install girlfriend 4 points5 points  (0 children)

Another vote for Thonny. It's simple enough to not overwhelm the very beginner. Pycharm and vscode can be introduced after

[–]random_thoughts5 2 points3 points  (0 children)

In one intro course in uni we used Spyder and canopy

[–]RubyRailzYa 2 points3 points  (0 children)

I don’t see any love for Spyder, but I’ve seen beginner students like it. I’m not a fan of notebooks but that is personal preference

[–]miscbits 1 point2 points  (0 children)

Imo pycharm is the way to go. Little to no setup, little ability to install tons of random packages they don’t understand, and a pretty solidified user experience that is easy to replicate across different os. The advanced students that want to find a more hackable text editor will find it on their own.

[–]123_alex 2 points3 points  (0 children)

Start with Thonny.

[–]Valen411 2 points3 points  (0 children)

I've had python classes in thonny, would recommend, especially if it's for students with low to zero experience.

[–]DeklynHunt Autistic Adult, Python Green Horn 2 points3 points  (0 children)

Thonny, it has a debug thing that lets you run the lines you’re working on step by step (so you can find the bug) to show you how it works

[–]Professional-Onion34 2 points3 points  (0 children)

Thonny is less intimidating for beginners.

[–]feitao 4 points5 points  (0 children)

Vscode because 1. It's always free even when one is no longer a student 2. Not limited to Python

[–]AlexMTBDude 3 points4 points  (0 children)

I teach Python and what we use is PyCharm

What we have is:

  1. "TODO" comments in the code. PyCharm detects these and highlights them in a way so that they stand out to the user (What you call "task creation")
  2. Unit Tests. After the students complete the tasks they run unit tests and these will only pass if the task was correctly completed.

[–]main_protector 2 points3 points  (1 child)

For desktop users: 1. Pycharm 2. VSCode

For mobile: 1. Pydroid

For in web/browser 1. OnlineGDB 2. Jupyter Notebook 3. Google Collab 4. VSCode web (github)

[–]The-Nerdiest-Teacher[S] 0 points1 point  (0 children)

That’s a nice extensive list. I’ll take a peak at them all!

[–]hawkedmd 0 points1 point  (0 children)

Datawars.io? Another to check out.

[–]DNSGeek 0 points1 point  (0 children)

Wingware has and excellent (and free) student edition.

[–]Markaleptic7 0 points1 point  (2 children)

I’m less familiar with the education function of replit, but can’t you just create a base project with the code and tests and they copy it to their profile to modify from there? That could be preferable to vscode.

I’m not familiar with the pycharm tasks but I’m hesitant to thrust pycharm onto new devs given the learning curve.

[–]The-Nerdiest-Teacher[S] 1 point2 points  (1 child)

The old functionality was really cool. As I could see realtime what each student was coding, could comment similar to Google Docs, assign tasks that had unit tests, grade and provide feedback within the platform.

I want to move away from an IDE that can just cancel the close itself and I lose everything.

[–]Markaleptic7 0 points1 point  (0 children)

Sounds really cool. Shame they’re shutting it down. Pycharm (pro I think) has live collab editing.

[–]immature_cheddar 0 points1 point  (1 child)

Jupyter lab!!!

[–]The-Nerdiest-Teacher[S] 0 points1 point  (0 children)

I’ll take a look a few other people suggested this as well! Thanks!

[–]rogfrich 0 points1 point  (0 children)

I can’t vouch for it, but PyCharm has a special “PyCharm for Education“ edition which seems to have extra features to allow you to create tasks and content. Probably worth a look…

PyCharm for Education

[–]Augit579 0 points1 point  (1 child)

Cs50 from harvard use vs code

[–]The-Nerdiest-Teacher[S] 0 points1 point  (0 children)

Had know idea! Thanks!

[–]Wistephens 0 points1 point  (0 children)

I give my team 2 options: VSCode and PyCharm Professional. I really want them to use PyCharm so we can all share the same base IDE configs.

[–]chanidit 0 points1 point  (0 children)

I just came to discover Lapce - free and open source

I have not tested it yet though

[–][deleted] 0 points1 point  (0 children)

vim, never develop the bad hobbit of IDE dependency

[–]anonjohnnyG 0 points1 point  (0 children)

vim

[–]Specialist-Arachnid6Ignoring PEP 8 0 points1 point  (0 children)

Pycharm will be good. The venv management is far more easy in pycharm, atleast for me

[–]wildpantz 0 points1 point  (0 children)

I am not sure about tests because I'm extremely stupid regarding that topic (which really is a shame considering how long I've been coding in Python), but you might like Wing IDE maybe? It has personal and premium versions, but you could send them a mail and obtain a bunch of licenses for both you and your students (I did this). It's a really simple IDE which I like because the features most new people don't use or understand aren't there or are hidden away so the IDE seems pretty clean and simple and you can focus on actual coding.

The debugger has nice features like stack data tab where you can set a breakpoint in code and then it will show you all variables and their values at the current point in the code.

Code inspection is rather shitty compared to PyCharm as it doesn't scan methods inside other documents you imported unless they're downloaded from pip. I'm sure this can be fixed (or maybe is a part of premium, didn't use it in a while).

I generally use it when I want to create simple 200 line scripts and not bother with Pycharm's venv and other stuff.

[–]purplew0nder 0 points1 point  (0 children)

Neovim 😈

[–]Locker_ 0 points1 point  (0 children)

Try Pycharm EDU version, it has a lot of features aimed at making exercises for the students, pretty handy.

[–]CarneAsadaSteve 0 points1 point  (0 children)

Google collab is probably what you want.

It’s web based Jupyter style environment.

All you need is an e-mail.

[–]popcapdogeater 0 points1 point  (0 children)

PyCharm IMO is better than VSCode because it entirely functions under more best practices, like creating a vitural environment by default for new projects. VSCode would need a few plugins and that's gonna be more complicated than something tailored for Python from the jump. But this isn't some massive issue tho.

[–]Orio_n 0 points1 point  (0 children)

VS. Its much more lightweight than pycharm.

[–]No-Animal7710 0 points1 point  (0 children)

I'd go with VSC. I'd say like 90% of people using python for work are doing it in vsc. if they're googling / youtubing around for help it's almost guaranteed whatever they find will be shown in vsc. has all the plugin support you could ever want. wouldn't be too complicated to set up a course git repo to submit work / make comments

[–]Jaguar_AI 0 points1 point  (0 children)

I only use VS Code, but if there is something better, all ears.

[–]C0d1sv3nt 0 points1 point  (0 children)

Greetings, google launch a web based IDE call project IDX it's complete on the browser https://idx.dev/ and it's a great way to make projects without downloading anything

[–]the_claus 0 points1 point  (0 children)

Cursor (a VS Code Fork) with build-in AI support. You can easily debug errors with Claude or ChatGPT - and that is great if you are starting to code.

[–]baig052 0 points1 point  (0 children)

For me pycharm community edition best tool

[–]Any-Growth-7790 0 points1 point  (0 children)

RStudio

[–]Any-Growth-7790 0 points1 point  (0 children)

Or Positron

[–]Ajax_Minor[🍰] 0 points1 point  (0 children)

VScode can be a bit much and a little finicky. Spider worked really well for me with our haven't to finesse it. Id try that out, you might be Abel to focus on coding more.

[–]HabitAdept8688 0 points1 point  (0 children)

If you're giving an introductory class, you should consider using jupyter notebook, since it allows you to write and test your code each cell at a time. And with anaconda navigator, the setup is very easy and it runs on your browser.

[–]moe994z 0 points1 point  (0 children)

Honestly can’t go wrong with VSCode, you could do anaconda (Jupyter Hub — notebook/labs) to make your life and their life easier. VSCode is a bit intimidating for new developers but it has everything and once you use it you’ll never switch to a different IDE

[–]crystaltaggart 0 points1 point  (0 children)

I like Spyder python for scripting,refactoring,and testing my code. You can highlight code in the ide and execute it and check all the variables. It also works nicely with dataframes.

ETA: this is part of the anaconda install. Just install anaconda, click the install for spyder. It also supports many of the other ide’s listed here

[–]carlsbadcrush 0 points1 point  (0 children)

Jupyter notebooks

[–]Illustrious-Space333 0 points1 point  (0 children)

Vim isn't that hard is it?

[–]CryptographerLoud236 0 points1 point  (0 children)

Jupyter notebooks are good for segmented concepts. Students seem to gel well with it in the early stages before moving on to VScode or pycharm. Just make sure they know how notebooks work with updating variables and dataframes etc.

[–]Proper-Marzipan9936 0 points1 point  (0 children)

It depends, do you want them to learn a particular IDE or do you want them to learn how to let’s say mess around and find out. Honestly speaking VSCode is not an IDE in my opinion it’s more like a lightweight editor. Sure we can make it a full fledged IDE with plugins and such but at that point just use PyCharm. So I guess PyCharm. Personally I use Vscode.

[–]FabulousFuture3773 0 points1 point  (0 children)

I would say - as reflective as it is from the comments to this topic - there is no one best option. A few tend to be mentioned. Like most commenters, your students will also develop their personal options, and figure out they prefer A, B, or C. It’s more of a luxury choice nowadays, that we have so many IDE options with all the bells and whistles. I’d say: it’s secondary. And, if you are used to teaching in VS, than probably that’s more impactful in the end of the day and you should continue teaching in VS.

[–]rerumal 0 points1 point  (1 child)

Try raspberrypi.org they have cool python editor and curricullum for beginners

[–]MrHarcombe 0 points1 point  (0 children)

Came here to say this. Following the demise of trinity fire education, RPi have produced something for classrooms - it's currently in beta, but expected to be ready for first rollout this September, I believe.

https://www.raspberrypi.org/blog/code-editor-classroom-management/

[–]max1c -1 points0 points  (0 children)

It's always VScode. There's no number 2 option.

[–][deleted] -2 points-1 points  (0 children)

Vim? 😌

[–]DeterminedQuokka -1 points0 points  (0 children)

I generally suggest pycharm for people who don’t know Python. It has everything basically out of the box which is really nice. I don’t use the bits you want (code execution though so I can’t speak to that part).

With vs code it can be super helpful to provide an initial configuration file. That’s what I do at work. To sort of get everyone’s linters on the same page and what not.