educators should help design languages for coding

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.

python and javascript will give you an error instead; very few languages have ever given you 0, and even modern(ized) users of basic will discourage it or use a compiler option to make that give an error.

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:

x 37

y 28

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.

 

 

Advertisements

8 thoughts on “educators should help design languages for coding

  1. I wholeheartedly agree with your views on this matter. Sometimes people focus too much on the theory than the practice. And too many a time have a number of my friends given up when they face a bug. Debugging in itself is an art form and something any programmer worth his/her salt must know. It teaches you alot more in my opinion rather than when everything goes perfectly as planned. Thank you for the post as always, loved reading it.

    Liked by 3 people

    1. thanks very much for the comment!

      debugging is mostly a matter of a heuristics– heuristics in turn (as you likely know, but for those that dont) can be thought of as a checklist where you say things like:

      “have i done this thing? no. ok… have i done this other thing? no. ok… what about this thing? no. and this thing? a-ha!”

      this is classic problem solving, and the way to not only fix programs (and computers,) but most things; its even good practice for becoming a doctor or nurse! everybody uses heuristics– they just dont call it that.

      as for the “art” of it, people with great experience (or a special gift) can skip ahead a few steps and be right about what things are with impressive accuracy. doing a few of the steps in your head to optimize the order of items on the checklist saves time– you see it in professionals. its merely polishing the same ordinary thing.

      Liked by 2 people

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s