Environment for teaching

I will be teaching a course on numerical methods in dynamic programming, starting mid-February, for which I plan to use Julia. I am wondering what the most mature and hassle-free environment is for

  1. having an integrated editor and REPL,
  2. writing simple programs, around 100 LOC at a time max,
  3. running pieces interactively, debugging them,
  4. making plots of various results

Don’t really need any libraries (DataFrames etc), just plotting simple 2D functions. The purpose is to make everything hands-on. Debugging is a must though.

After a bit of reading and exploration I am currently leaning towards

  1. Juno/Atom,
  2. Julia v0.5.0,
  3. debugging via Juno.@step,
  4. release branch of Plots.jl for plots, with the gr() backend.

I have tested this and it works quite OK, there is a REPL, one can eval, but I am not a user of Juno/Atom, so I would appreciate suggestions on whether I am doing the right thing. I can always sacrifice features for stability, since dealing with computer problems disrupts the flow of the class.

1 Like

IJulia, i.e. the Jupyter notebook, seems to satisfy all your requirements, except for debugging, for which you can drop into Juno.

Now you just do

Pkg.add("IJulia")
using IJulia
notebook()

and it will automatically install Jupyter, and then run the notebook.
Hit the “New” button and choose the Julia 0.5 kernel, and you’re away.

Your students don’t even have to install anything if they use JuliaBox.

Thanks. Is it possible to open some kind of REPL capable of running Gallium/ASTinterpreter from Jupyter (ie attached to the same image?) Jupyter seems nice, but switching back and forth between two environments (if I understood your suggestion correctly) could be disruptive, one would need to reload/rerun everything, etc.

Absolutely. Try Jupyter with Python and type %debug in a cell. I’d love to make that work for IJulia, but I’m waiting for a version of Gallium that doesn’t crash on my machine. Maybe with 0.6.

2 Likes

Thanks, I will keep that in mind, but for the near future, it looks like Juno is my best solution for this course.

I am still unsure about which plotting package (and backend, if applicable) is best integrated into Juno, and would appreciate advice on that.

Yeah, that’s what I would do. I would teach println debugging though because it’s universal, and debugging is more about learning how to read the stack trace than anything else.

In principle that should be possible, but I’m not sure how to to so.

You may be right, but for this course, I really want to focus on the content, rather than programming. I could teach it in some other language, even R, but I feel that learning their way around Julia a bit would benefit these students in their future career. I find that for some students, a stepping debugger makes the difference between staring at the screen in despair at some cryptic error message, or figuring it out eventually.

1 Like

An easy way for them to install most of what they need ( except plots and gr) is the free Juliapro distribution. I tend to use Jupyter for teaching, though, as it is easy and intuitive to share notebooks with students,

https://github.com/Keno/ASTInterpreter.jl/pull/65

It turned out to be simpler than expected. I wouldn’t count on it for a course this semester, though. It has some issues.

4 Likes