Archive for March, 2015

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.