Pseudocode is meant to be a way to quickly sketch or communicate how a coding problem could be solved. It’s not a real programming language, but usually resembles the language one is targeting.
Well, I’ve been teaching a class based on a book that takes the approach of learning the fundamentals of programming by focusing on pseudocode. It’s a mixed bag. Yes, a lot of complexity is avoided so students can focus on the logic rather than syntax, but there is no way to test it. It all feels abstract and theoretical.
I tried doing examples in class to demonstrate, but many students need that experience to make it stick. Long story short, I created a web page that gives them something to experiment with. It’s based on the pseudocode outlined in the textbook, Extended Prelude to Programming. (I should note that I’m in no way affiliated with the author or publisher of the book.)
Basically, I take what’s typed into a text input and convert it via php into javascript that runs on the page. Much simpler than writing a real compiler, but it’s a bit of a parsing job (and very incomplete.) Still, it should prove very helpful to some students. Especially if they have access to it from the beginning of the class.
It’s located here.
Tags: code, javascript, php, Programming, pseudocode, Teaching, web