Mark Lewis
1 min readJan 2, 2022

--

“Meaningful variable names” — that addresses the “m”, “n” example, but not “name” vs. “names” or most other typos. Even meaningful names can have typos. Indeed, because meaningful names are longer they are probably more prone to typos.

“Unit tests” — I believe that I address this in a comment above, but the problem here is that you just added a topic to CS1. I cover unit tests in CS2 with statically typed languages. What did you push out of CS1 to put unit tests into it?

“Use an IDE” — This is one that I’m torn on, but for statically typed languages. IDEs can be far more powerful for statically typed languages than dynamically typed ones. Most of my example errors aren’t caught by IDEsa in dynamically typed languages because the information doesn’t exist until runtime. Given a value “data” you can’t generally know if “data.foo” is valid in a dynamically typed language until runtime. Also, how do you put scope warnings in languages where you don’t declare variables? How can the IDE know if a typo is a new variable or an assignment to an existing one?

Where I’m torn is that I think there is value in students knowing a basic text editor like vi/vim. I’ve had lots of situations in my professional experience where I have to use that type of editor for various reasons. Having said that, I can see an IDE with auto-completion (only really available with statically typed languages) reducing the cognitive load on students.

--

--

Mark Lewis
Mark Lewis

Written by Mark Lewis

Computer Science Professor, Planetary Rings Simulator, Scala Zealot

Responses (2)