Julia as first language

ahh I hate this part haha. I like homework problems where when you’re done, your implementation is as good and as fast as the library implementation. If you could not have written the library, you worked on a toy. Otherwise it’s hard to know what you don’t know: people believe they understand how matrix multiplication because they implement it and then hear “Python is slow, don’t worry about it”. No, teach the student right there about cache misses and go the next step.

What happens from this is the whole “use a LinkedList” model of the world. Students learn a too simplified model of how computation works, are told that they don’t need to worry about how libraries are written because “that’s just details”, and then walk away with simply an incorrect view of how a program works. I think you should be able to at the end of a data structures class/module, show this video:

and in the final exam ask “LinkedList insertion to the beginning is O(1), while Array insertion at the beginning is O(n). Why are arrays faster in practice in most cases?”. If a student just learns big-O but does not understand why this paradox exists, then they have not learned a good model of programming.

The high level Python style of teaching leaves students completely dumbfounded when you ask them questions like this, to the point where I have talked with people who simply believed it’s not true. Big-O is all there is to an algorithm, right? Understanding that there are different levels to the abstraction in not just programming but the model of computation is essential for practical programmers, and for setting them up for the next stage of learning theory of computation.

13 Likes