off topic aside: dear wordpress, please move it back to the left. thats terrible over there! how many websites do you know of that put stuff like that on the right? ive right-justified this paragraph to exaggerate how absurd the move is. oh… and now everything on the reader is off-center, why?
amidst the idea that coding is just about teaching logic (and the suggestion that we put more time into the abstract than the functional,) lets talk about the benefits of actual coding.
for many educators, they already struggle with the problem of connecting “how are we going to use this?” with coding. incredibly, they already know one of the answers: coding is great for teaching people to problem-solve using logic.
its also good for getting people to finally “make friends” with their computer. instead of trying to point at stuff to make it do things all day, coding brings the computer in as a real ally and workhorse. instead of telling an application to talk to the computer, youre talking to it yourself! coding is the shortest and straightest route to digital literacy.
but even though it helps solve (or even prevent) computerphobia, the fact that some educators are mildly computerphobic– and notice it in their students– leads them to say things like “wait! this is good for teaching logic– cant we just teach logic instead?”
now youve not only thrown out the bathwater and baby, but the bathtub as well! and youve thrown out the tool that was so great for teaching logic– even with practical everyday applications.
dont forget, coding actually produces something. it may not be the next version of windows or even the next popular video game, but it has results that people can look at and even reuse– how many school assignments are like that, really? theres only so much room on the front of the icebox.
laura has the right idea: make tools easier to teach with, rather than shy away from using any actual computer tools. https://codeboom.wordpress.com/2017/01/07/gui-zero-making-python-guis-really-simple/
thats also the idea behind the fig language– but this isnt about just fig. fig was intended as an example; i also use it, but fig was meant to be one tool that makes it easier to learn coding. there are several!
nonetheless, fig is a showcase of ideas that can make coding more forgiving, and easier to learn. it even throws one of those ideas away– in basic, if you ask for the value of “x” and x wasnt set, it gives you 0.
i could have made fig return a 0 for unset variables, but some error messages are actually helpful. heres what fig does instead of giving you 0:
each_line_starts_with_a_variable “hello world” ucase print
a few special commands (block commands mostly) start without a variable, but other than that its a standard in fig. and naming the variable at the beginning of the line sets it to 0, but you have to actually name it before you can use it. then you can do all you want with it on that line, and the value persists– until you start a line with it again. if you want variables to persist, switch to another one after using them:
now x print
now y print
x # now x is 0 again
what it doesnt do is let you name a variable later on in the line, if you havent used it already. then you still get an error:
fig 4.1, jan 2017 mn
1 now p print
error: variable or function not created, but referenced… “p” needs to be set before first use
error in line 1:
now p print
why do you want an error? the same reason you want your spellchecker to underline thisword in red. its trying to help!
writing helpful error messages is an art (not one im claiming mastery of, either.) most error messages will presume you already know enough about what youre doing that youll at least understand the error message. it would not be impossible to make a system for coding where the error messages would offer to teach you how to do anything properly that you did wrong.
if theres room on the screen, you could offer a simple example of something that works instead. you could even offer an interactive tutorial. however, the more information you add to an error, the more someone might think “oh, no! look at all that– this is really bad!”
a kernel panic really is bad: https://en.wikipedia.org/wiki/Kernel_panic
for one thing, it means anything you havent saved… however after you turn it off and reboot, it will probably be alright otherwise. an average user might get a kernel panic once or twice a year (if that,) unless your electric lines are noisy.
when youre programming, most error messages mean “you typed something in wrong.” thats ok! find it and fix it. it will often tell you where, and figuring it out is part of coding. it also teaches you one of the most valuable applications of that logic they want you to learn: debugging.
of course, once youre not afraid of error messages, youve overcome one of the things that the average user lives in fear of– a message that says “hey, somethings wrong!” and they dont know what it is. and that is a great reason to learn coding!
but educators shouldnt throw away these tools– by all means, add more. but its rare to offer such a strong connection between learning concepts and applying them as there is with computing. dont squander it! use your voice– online or with computer-savvy associates– to talk about what would make the coding experience easier, without throwing the whole opportunity away.
- license: creative commons cc0 1.0 (public domain)