Are Julia and Pluto the best way to teach programming?

Mohamed Elsharnouby
3 min readNov 11, 2020
A cute logo for Pluto.jl

I have some experience with teaching people how to program. One day I was trying to teach my wife Python in a Jupyter notebook and she wrote something like this code and executed it:

a = 1
b = a
b

Then in a separate cell she wrote and executed it:

a = 2

And she asked why didn’t b change in the previous cell.

This is when I realized how illogical it is for a non-programmer to grasp the idea that assignment doesn’t mean biding the values of variables together. It seems much more intuitive to non-programmers to see b change in value when a changes. I of course had to explain what’s really happening and spent some time trying to think why didn’t we see a programming language that embeds this design in the language itself so far.

I knew of Observable but I didn’t want to teach people JavaScript especially if the goal of learning how to program is to do data analysis which Python really excels in. Until I found Pluto.

Pluto.jl

Pluto defines itself as a reactive notebook that updates all affected cells that depend on a variable or a function when this variable or function changes. This is exactly the idea that could be most intuitive for a non-programmer. Hell, this is the direction of new front-end frameworks as well like Vue.js and Svelte which focus on reactivity. Even React.js added it recently in the form of a hook useEffect .

Pluto reactive example (the chart updates when the user changes the slider)

It seems that the reactivity paradigm is really good for constructing UIs in an intuitive way that matches how our brain thinks of stuff. You change something and everything that depends on it updates without lots of other boilerplate code or without us thinking of it. I tried Pluto and I found it a very capable notebook that you can create a very interactive notebook that could be used as a scientific paper, data analysis, reports or even a simple tool/calculator.

I think Pluto is a great way of teaching programming, the simplicity of Julia as a programming language. Pluto adds the reactivity part and you have the perfect environment for a non-programmer to learn. It resembles Excel in that when some cell is updated, any other cell that depended on it updates too. For people who need to learn programming for the ultimate goal of performing some analysis , Julia presents the perfect language too. It has many packages that touch on many scientific fields and a great community willing to help newcomers.

--

--

Mohamed Elsharnouby

Software Engineer. Starter of many unfinished things. Love hiking.