What should we be teaching: programmers or thinkers?

March 30, 2015

As usual Alfred Thompson’s blog got me working on something I do not really do not have time to work on but anyway…  This time it is a Morse code conversion program.  I am happily putzing along thinking of nifty ways to do the program.  In a moment of brilliance I decide to Google “Java Morse code conversion” and “Python Morse code conversion”.  The solutions are much, much simpler that my solution but they rely on understanding the intimate details of the language (hashmaps for Java, something like it for Python).  No cool algorithms, no problem devolving, just a built-in function that plops the solution down on the screen.  This type of approach/solution to the problem brings up the big philosophical idea of what is programming, at least at the high school level, trying to teach.  If teaching programming is a “get a job” thing (see this blog) then yes, we need to teach the heck out of Java (or whatever) with all the whistles and bells (hashmaps and like stuff).  (Good luck finding high school teachers with that level of Java (or whatever) expertise.)  If, on the other hand, we are trying to teach thinking and problem solving skills how much of a language do we teach?

I look at this Morse code problem as a problem requiring looking at a series of dots and dashes and how am I going to tear that apart and look at the pieces parts.  Once I have the pieces parts then how am I going to compare that to something to get the correct letter.  (I figure the letter to code is easy, the code to letter is the real work.)  I see the problem as developing an algorithm, not as remembering a coding method/function for a specific language and then just typing.  This is what I want to teach the kids.  Once they understand algorithm development then a language is irrelevant.  They could write this Morse code problem from Small Basic to Java.

The other side of the argument for teaching only the basics of a language and then building algorithms using those basics is they can never do anything significant in that language and what they do write is usually very inefficient.  My solution for the Morse code problem is the baseball bat solution, beat it into submission.  The Java expert would be able to use tweezers for the same result.  I realize that as problems get more complex it is a necessity to have more than the basics in the knowledge tool kit but where do we draw the line in high school?

I am a problem solving type teacher.  This is somewhat affected by the fact I can program fairly poorly in about 8 different languages and am a wiz-bang programmer in none.  Given a problem like the Morse code problem I can code up a solution in at least five of those language and, given a little time, maybe another two.  The code will not be pretty but it will work and the devolution of the problem will allow the use of almost any language.

So my question becomes do we, at the high school level, do a two year program of one language in an attempt to generate job market programmers or do we do a more broad field approach with multiple languages in an attempt to generate problem solvers who are not really good at any language?  Of course I am a strong advocate of the latter.

 

BYOD vs. 1-1 with a little Robert Burns

March 25, 2015

A lot of Montana schools are talking about going or have gone 1-1 at some level.  A few years ago I was big into the 1-1 idea.  My idea was the kids would be given a laptop as a freshman and lease it for one-quarter the purchase price every year.  At the end of high school the laptop would be theirs.  Lots of problems with that.  Who want a four year old laptop?  What happens if Johnny loses or breaks the laptop?  What if Johnny is a (OMG) Mac user?  There was also the issue of the school buying that initial batch of laptops.  Finding the money would be a problem.

Our solution was BYOD.  Kids bring their own device, whatever it may be, and we work with that.  It has worked.  Being a 5/8 man band (I teach also) means I do not have a lot of tech time for kids to bring their device to me for operational help.  I was afraid I was going to get buried with tech issues from a dozen different brands of laptop.  It has not worked out that way.  The kids have learned to solve their own tech problems, or find a kid that can fix it for them.  For example hooking up to a school printer.  I show a couple of kids and then the knowledge sort of spreads like the common cold.  I am not proficient with Macs.  If a kid come to me with a Mac I tell them to go see Johnny, he has a Mac.  If Johnny does not know the answer come back and I will figure it out.  They rarely come back.

At first I was worried that some kids would not be able to afford a laptop.  There are some kids that do not have a laptop but with a combination of small classroom labs, loaner laptops and the kids sharing among themselves this has been a non-issue.  One of my geeks even started a laptop redistribution program as a project.  He takes in old donated laptops, refurbishes them and hands them back out to people that need them.  Some of the laptops donated are very nice, some are space junk. He has put out at least 40 laptops to the community, not just students.

Many schools going 1-1 are doing the Chromebook thing because of cost.  A Chromebook is dirt cheap compared to a PC laptop and is ridiculously easy to manage.  I am not a Chromebook fan.  You spend $200 for a device to access a free browser.  Something wrong with that.  Yes, a cheap laptop is $400 but not only did you spend $200 for that free browser but another $200 gets you almost everything else you could possibly ask for.  That Chromebook also sort of hits a wall when it goes to college.  When Chromebook first came out a number of parents were providing their kids with them.  That lasted for about the first month of school.  Kids were wandering into my office telling me their Chromebook would not do such and such.  My simple reply was “Yup, it does not”.  Chromebooks disappeared.

Going the 1-1 route puts the onus of support on the school.  Repairs, software, updates, everything is the school’s responsibility.  With BYOD a large part of that load shifts to the students.  After observing about three years of BYOD the students handle everything just fine.  The school is responsible for providing an infrastructure; internet, wireless access, maybe a file server, for the student tech but it would have to do that anyway just to conduct school business.  BYOD also has the sort of hidden objective of requiring the student to learn how to operate and support their device.

There is one major glitch with both BYOD and 1-1.  Internet access.  We are starting to hit the band-width wall.  My school is in a residential neighborhood with residential internet access speeds.  Trying to stuff 300+ computers down a 60X4 Mbps pipe is starting to cause some problems.  Switching to Google Apps for Education and Google Drive has just exacerbated the problem.   It seems most of the schools in the State are hitting the same wall.  Be it BYOD or 1-1, we are going to have issues, or as Robert Burns said so succinctly, “The best laid schemes o’ mice an’ men / Gang aft agley”

Fun with Mindstorms, sort of.

March 23, 2015

I got the leJos working finally.  It is a bit of a procedure.  Lejos is 32 bit and if anything it needs or uses is 64 bit it does not work.  Of course all the laptops we use are 64 bit.  So I needed 32 bit (x86) Java JDK, 32 bit Eclipse (the 64 bit version almost works so I spent some time trying to get it to work until I read the leJos install directions.  RTFM.)  The driver from the Mindstorms NXT-G is needed so NXT-G needs to be installed from the CD.  Downloading the driver from Lego and running it does not seem to work.  Oh, then there is a plugin for Eclipse that you would not know about unless you read the README.txt in the leJos folder.  Who reads the README.txts?  I do now.

Now that I have it running it should be interesting.  I am sort of thinking on having a “How many languages can you control a Lego robot with?” competition.  One of those “CS is more than programming” kind of things.  Sometimes the programming is the easy part considering the amount of troubleshooting it takes to get to the point where you can program.  Got to think on this.

Let’s see,

  1. NXT-G – kind of cheating, it comes with the Lego robot but still a pain to work with.
  2. RobotC – easy to install and use, lots of good documentation.
  3. Java – eek, but worth the learning exercise.
  4. Python – the instructions are on the internet,
  5. VB – I looked, I thunk, I chickened out. Maybe later.
  6. Microsoft VPL – do not see much of VPL anymore but I did it a few years ago.
  7. C# – it is out there.

Looks like fun.

Java and Lego NXT, here I go

March 19, 2015

Parsing text files with Java was just not doing it for me.  Programming is fun, or at least it should be fun.  When it is not fun for me or the kids I shift gears.  Sometimes that is good, sometimes not so good.  But I always figure there is a way of teaching programming so it is fun.  So in the spirit of making it fun I am going to try Java with the Lego Mindstorms NXT robots.  There is a little program called LeJos that allows the two to work together.  I have never messed with LeJos and it is always a bad idea to try something with students you have not done yourself.  Nuts on it.  I have a feeling this batch of kids will get it figured out before I do.

How can I switch tracks like this without buggering up the curriculum or syllabus you ask?  It is a senior course so it does not have to match up with anything next year except college courses.  After talking to numerous college CS instructors they do not want kids proficient in language X, they want kids that can learn language X.  I want my student to be experts at learning, experts at finding solutions with Google, experts at “here is something you have never seen before, figure it out”, experts at tinkering until it works.  CS and programming may be the only high school subjects were this kind of spontaneity is possible.  College math, English, history, foreign language and so on programs are pretty much the same across the US.  Walking in the door and you have a pretty good idea where you will be starting and what you will be doing.  CS not so much.  Calculus is calculus.  CS is uhhh?  The first programming language taught in college is uhhh?  So I think I am OK to jump around like a mouse on a hot metal roof.  I just have to make sure I do not leave any think hanging before I jump.

Besides, it is an elective and we want to have fun with computers.

So I have a two day head start on LeJos.

I am already learning some interesting things.  Did you know that the driver for the Arduino board and the Lego NXT brick are almost identical and that the stupid brick will see the Arduino driver first and not be happy at all with that driver?  The result is the brick gets the “click of death”.  (Those that have worked with the NXT brick will be familiar with the “click of death”.)  So if you have used an Arduino on your computer and you want to use the NXT brick you will have all sorts of new experiences involving hair pulling.  Did you know that none of the suggestions on Google on how to overcome this issue work?  After an hour or so I figured out how to delete the Arduino driver so the stupid brick would see the NXT driver. Joy, joy, joy.  That is the kind of thing I want my students to be able to figure out.  Real world problem solving.

The next thing is figuring out the Eclipse plugin for LeJos.  Something new to problem solve.  Oh goodie.

The value of guest speakers in CS

March 13, 2015

Lately I have been trying to bring in guest speakers for my programming classes.  Last month I took the senior Java class on a field trip to a local tech company.  For a senior class I have come to the absolutely brilliant conclusion this is a great idea. (I impress myself so easily.)  The objective is to not to discuss programming, but to discuss and look at the tech industry.  Last month I had a professor from the university Management Information Services department talk.  He had spent most of his career in industry, not academia, so it was very interesting for the class.  A very different perspective on CS and the tech industry.  Yesterday I had a database manager from Blackfoot Communications, a local telephone and ISP company, come in.  Again, another perspective on the tech industry.  It was very interesting to hear him talk about how many companies he has worked for in his tech career.  All of the people we have talked to have the same job to job pattern.  CS is for gypsies.

Five of the six kids in the class are heading for a CS/tech career.  They get some real eye openers from these speakers.  Perhaps the biggest has been that a university degree is not the end of learning, it is the beginning.  All the speakers have said that the university is a foundation and is only good for getting started in the field.  In all cases the speakers have stressed that the most important thing a university education imparts is how to learn.  What they actually learn will probably be out of date in a very few years.

No matter how we look at it, high school CS courses are job training.  Kids take math without the intent to become mathematicians.  Four years of English and yet how many get a job actually in English?  Most of the high school core curriculum is that way.  CS classes, on the other hand, are full of kids looking at CS/tech futures.  Jobs that are directly related to high school course work.  It is important for the kids to see that broad spectrum of jobs that CS can lead to.  Talking to everybody from the cubical rats to the pure idea people gives perspective.  Knowing the climb from a college degree in programming to being a wiz-bang game programmer is not always direct or easy (unless of course you are going the indie route, then it can be even worse) is important for these kids.  So far I have had everything from the horror of cubical programming to someone who has worked around the world.  Good stuff.

It is not enough to know how to write code.

March 5, 2015

It is not enough to know how to write code.  I am teaching Java for the first time this year.  No biggie, there is a first year for every teacher teaching a language.  We manage.  I have had a lot of first years: Python, Corona, Visual Basic, Small Basic, Gamemaker and it goes on.  In all cases I have had kids walk away with an understanding of how to write a program in the language.  What bothers me is knowing that they are not walking away understanding how to write a program in that language correctly.  (I do have kids come back to me after their first year in a university CS program saying they are well ahead of their peers so I am not all bad.)

This brilliant observation came to me yesterday as I am coding the latest Java assignment I gave the kids.  I can write the program, code it up and get it working.  It is just very ugly and I know there is a better way to write the code.  Could I learn to write “good” Java code on my own?  I doubt it.  I see the problem involving the fact I teach little kid languages like Scratch and Small Basic.  The code is simple because the language is simple.  There is no way to write “fancy” code in these languages.  Everything is pretty much brute force.  No local variables, no classes, no parameters, no nothing.  There is not a whole lot to learn about these languages coding wise.  Something like Java on the other hand has all sorts of subtleties and variations.  Yesterday for example I discovered two things not explained in the book I am using; “throw IOException” when reading a file and what an overloaded operator (+) does in certain circumstances.  Both discoveries involved hair pulling and lots of time lost dinking around trying to find what the heck was going on.

So what is the solution?  One option is to quit teaching big person languages like Python, Java and VB.  I admit I do not have the background to do a bang up job on these languages.  Not a good option in my opinion.  I may do one horrible job with writing pretty code with the correct OOP methodology but at least the kids get some of the syntax and learn the IDE.  Besides, I like learning languages that are challenging.  Learning something new keeps me out of getting in a teaching rut.  Even if I end up beating a problem to death with the baseball bat of the coding world it is still a solution that can be refined.

A second option is to take some programming classes at the local university.  Tried that but the classes I need are offered in the morning only and that pesky teaching job interferes.  I tried to get a “Programming for Teachers” course started for next fall semester.  I even had an instructor that was excited about offering the course.  It would have been on-line, which is a real biggie in Montana, and be offered for graduate credit.  I had about 20 teachers across the state interested.  The CS department chair was even onboard.  Budget cutbacks killed it.  How budget cutbacks kill a 20 student course that would only cost the time of a salaried instructor is beyond me but then lots of things are beyond me other than Java.

For my Java class I have been applying option three.  I have a CS instructor, Mike, from the university come over and teach the class a couple time a month.  Mike is one of our middle school parents and enjoys coming over.  He is a bit fried on college kids and likes working with my programming geeks.  He is a bit fast for the kids.  OK, he is a bit fast for me and I tell him it is the kids.  He takes our junk code and shows us how to do it properly.  Sometimes it makes sense, sometimes not so much.  This is an interim solution but it is the only thing I have at the moment.  I figure if he is able to come over for a couple more years I will have enough “good” Java to do a half way decent job of teaching Java.  Opps, I just remembered I will have no kids taking Java next year.  It is a Python year.  I will have to find a Python expert to come in.  By the time I offer Java again I will be starting from scratch.  Oh well. Mike’s oldest kid is an eighth grader so I have him for at least 4 more years.

A CS Field Trip – Oh my!

February 11, 2015

Yesterday I took my Java programming class on a field trip here in town to a company called OnXMaps.  OnXMaps produces property line maps and chips for Garmin GPSs and apps for iOS and Android.  The maps are primarily used by hunters.  OnXMaps designs the maps, the software and flashes the chips.  It is a fairly small company, maybe 30 people counting outside contractors.  The building is the size of a medium house.  The trip was absolutely fascinating.  This was not like touring Microsoft or Google, both of which I have done, where you may meet a member of a team that writes a part of some software you may have heard the name of.  Our guide was the chief engineering officer of the company.  Lots of experience with programming, managing software projects, marketing, and a general broad field expert.  We also sat down with the guy that is writing the iOS version of their software.  The guy.  The guy was about 25, was a CS graduate of Montana State University and was not a geek.  What more could you ask for in the way of a speaker?  Young, local and THE GUY.  My class has a number of seniors who are not shy so there were lots of excellent questions.  What language should we learn?  Pick one.  He knew eight and works primarily in Xcode, which he taught himself after getting this job.  He suggested Java as a good base language to build others on.   OnXMaps uses C#, Java, Python and Xcode depending on the platform and the purpose.  He said he was not an expert in all of them but he could make himself one if he had to.  Is a CS degree a good thing to have if you want to get a job like this?  Absolutely, positively a must.  His comment and our guide’s comment was that the degree gave you the underlying foundation needed to be a good programmer.  It also taught you how to learn.  Both had experience with self-taught programmers.  They said the programmers were an expert in that one language but did not have the background needed to expand easily.  Our guide made a very interesting comment when we started talking about schools. He said when considering a school to look at who hires the graduates and how many are hired directly out of the school on graduation.  That is an excellent measure of how industry thinks of the quality of that school.  Something I had not thought of.  Luckily MSU is a heavily recruited school for CS.  UM not so much.

I have got to find more industry based field trips.  I could take them to Logisys where I worked for 6 months but that would only convince them to never work in the CS field.  Logisys was Dilbert and Office Space all rolled into one.  I know at least 10 people who worked for Logisys for less than one year.

I think it is critical for students to see an industry like this.  My students are all thinking of computer fields for college and without really seeing what it can lead to they really do not know where they are going.  Which makes me think a trip to Logisys would not be a bad idea.  Be good or this could happen to you.

Beginner languages – the usual infinite loop

January 28, 2015

Alfred Thompson pointed out this article, Retiring Python as a Teaching Language, in his latest blog.  Mike Zamansky’s comment sort of hit the nail on the head.  I always wonder when I read articles like this who the authors are teaching.  High school freshmen?  Not likely unless the kids have one heck of a middle school programming curriculum.  AP level kids that have two or three years of programming background?  Then the author has an argument but they are far from “beginners”.  Most professional programmers that have ideas as to what a beginner language in education should be really do not understand the definition of “beginner”.  Beginners are not the kids that have done programming at home because it is fun.  Beginners do not know how to use an IDE of any kind.  Beginners do not understand that an equal sign does not always mean equal (or is that rarely means equal?).  Beginners do not understand that in order to use a language the language has to be downloaded and installed on the computer, sometimes not a trivial exercise.  Beginners are sometimes taught by teachers that are beginners themselves so any beginner language better be stupidly easy to install and get started with.  The language also needs a beginner level textbook written by a teacher, not a really smart expert in the language.  Beginners, more often than not, are kids taking this one and only programming course because there was nothing else offered that period.  (Small school issue but in Montana most schools are small.)

Just because a language does not do certain tasks easily is not a reason to eliminate the language.  I like to mess with Lego robots.  Visual Basic will work with Lego robots if you beat on it hard enough (the language, not the robot).  I do not want to beat on it so I use RobotC for the robots.  Does this mean I should remove VB from the list of languages to teach?  No way.  If I want a language to write a program that requires buttons of various types, text input fields, the ability to make pretty GUIs and can read and write to a simple text file VB is my choice.  Both VB and RobotC can be great beginner languages.

I will argue that the reason any language is used in a high school classroom is that the teacher is comfortable with the language.  It has little to nothing to do with the practicality of the language, its usefulness in the job market, or what the colleges want the incoming freshmen to know.  Teachers will teach what they know.  (Of course I am presently teaching Java and I know no Java, but then I am an idiot.)

Maybe JavaScript is a great beginner language but I have a feeling Scratch and Small Basic, just to name a couple of my favorite beginner languages, are much more appropriate for beginners.

Now that I have said all this I am curious about JavaScript.   I dug around for a few minutes and I noticed Khan Academy is using JavaScript as their intro language.  The trouble is KA does just coding on a web browser interface.  Nothing on how to do standalone coding on a computer, what IDE to use, what to download to program with JavaScript, how to publish to a device or any of those handy little skills.  I guess those should be obvious to a beginner.

The new semester is here!!!!

January 20, 2015

Second semester starts today and as usual I am totally prepared.  For Programming II (sophomores) we are going to do Small Basic for a while then something else.  That is all I have.  The “for a while” and “something else” are the hang ups.  I have two issues that affect those.  First is the students.  Of the six kids in my class there is one that could leave me in the dust crying.  He is very smart and really digs programming.  Two others can do anything I throw at them but are fairly typical sophomores.  The last three are capable but have motivation issues.  The other issue is the teacher that also teaches Programming II.  Programming is not his gig but he puts a lot of work into it.  He is also offering and writing a new personal finance course this semester which is going to eat his time.  Doing a language he does not know (Corona or Python) on top of that might be a killer.  He knows Small Basic so that is not an issue.  The only other language he is somewhat comfortable with is Visual Basic.  Personally I think VB is as interesting as watching paint dry but a language is a language and I am sure we can make an interesting course with it.  I had originally considered getting him started in Python but since I offer a yearlong dual credit course in Python to Juniors there is no real need at the sophomore level.  Corona would be my favorite choice but I think it would blow away some of my students and would take a lot of work on the part of the other teacher.  Corona can do some fun stuff and I like fun stuff.

So we will work out the “for a while” on the fly.  When we exhaust what we feel it worthwhile in SB we will start on VB.  Not exactly sure what we will do in VB but that just keeps us on our toes.  I did find enough textbooks for VB.Net.  I had forgotten we even had them.  It is amazing what you can find if you look.

It is nice when the class is such that the goals are flexible.  In the Junior Python the kids have to get to a certain level of proficiency and they have to retain certain amount of knowledge to make it worth the dual credit rating.  Programming I and II we can just have fun with computers and programming.

First semester of teaching Java

January 16, 2015

This is our finals week.  As such I gave my Java class a final.  I borrowed a test from the instructor from the University of Montana who has been helping me with the class.  He happens to be a friend.  Since I really dislike the concept of a single test defining a class the final was a group final.  Since my knowledge of Java is about two days more than my students I was part of the group.  This is a group of students I can do this with.  After we had discussed the test in class I invited my friend over to discuss our answers to the test.  He helps regularly with the class, after all, he knows Java.  The class had narrowed down the problems we were sure we knew the answers to and the ones we did not have a clue about.  We wanted to know how we did.  A couple of problems we thought we understand we did not have a clue about but overall not bad.  We now have a better idea on what we need to target.

When I originally thought of offering this course I knew my knowledge of Java was going to affect the direction of the course.  I understand learning a new language is usually a syntax thing, not a major issue for me after this many years of learning languages.  After teaching Java for the semester I was sort of correct and sort of not.  The problem has been understanding the Object Oriented Programming concept.  We can write Java code, it just is not pretty and does not really use the OOP strengths.  Learning to program in a new language while trying to teach it is not impossible, it just takes lots of time.  Reading, coding, trial and error debugging and understanding the why of a program/language design can really slow things down.

I am debating not offering the course again until I have actually taken a course in Java this century.  The last time I took a Java course was last century.  (I turned the assignments in through an acoustical modem.  Cutting edge shared drive storage method.  I remember the system was called Gandalf.  Programmers and network dudes were going through a Lord of the Rings phase.) The OOP paradigm just does not come through when trying to get it strictly through a book.  The “why do it this way” is missing.  When my friend comes over and explain things it is kind of a “now it makes sense” moment.  The trouble is there is no Java course taught at a time where I could take it.  That pesky daytime job thing.

I will keep tinkering with Java, after all it is one of the top 5 in languages used.  I have found a Java for Kids book that might be fun to work through.  Sure cannot hurt.


Follow

Get every new post delivered to your Inbox.