Friday, February 17, 2017

You’re Teaching the Wrong Programming Language

No, really you are. If someone hasn’t told you this yet it’s probably because too few people know what programming language you are teaching. Of course someone probably thinks you are teaching the right language. After all you’re a smart person and you chose it. Asking what programming language should be taught first is probably the best way to start an argument a discussion among computer science educators.

Should it be a block programming language? Of course it should because the cognitive load of traditional programming languages is too great. Of course not because those languages are too limited.

Should it be Visual Basic? Of course because it is friendly and easy to create nice GUI applications. Of course not because BASIC == BAD.

How about C++? Great as it lets you get right to basics. Of course not – have you seen the pointer errors?

Scheme/Racket Of course because functional languages are more in tune with how we teach mathematics. Of course not because they are impractical and not real world.

Java? No, too much cognitive load. Of course, great preparation for AP CS.

Assembly language? If I had a dime for every time I read that suggestion on a site like reddit or slash dot or the like I could buy a pretty good meal. But talk about cognitive load!

Need I go on? Probably not. You get the idea. There are good reasons to use and good reasons not to use most programming languages. Mike Zamansky took both sides on several languages recently. Starting with scheme and Selecting a starting language - why not Javascript Yesterday in conversation I heard some good arguments for Python which seems to be gathering steam in a lot of schools. Aman Yadav, and Steve Cooper talk about block programming languages in a recent CACM article. Fostering Creativity though Computing

Everyone is an expert. What’s a teacher to do? I’m pretty convinced that a good teacher can do a good job teaching students using almost any programming language if they know it well and teach it well. I worry about less experienced teachers though. Frankly I am not sure even the best programming language, assuming one believes such exists, will work as well with an inexperienced teacher as a difficult language will work with an experienced teacher.

My big worry is not so much about the right language or the right curriculum or the right text book as it is good preparation for the teacher. We’re really rushing a lot of people into teaching CS who don’t have a deep understanding of computer science and software development. How much can they really learn in a 5 day or even several week long professional development session?

I’ve been working with some people to come up with licensing requirements for CS teachers in my home state. I like what we are coming up with but I really wonder how we’re going find or how we’re going to develop teachers who meet all of the expectations we are setting.

Friday, February 10, 2017

Software Developers–Quantity vs Quality

Today is a snow day here in New Hampshire. My third one this week. So I have taken care of most of the errands I use snow days to take care of and have some time to think about things. One of them is developing quality developers. In part this is spurred today by an article in InforWorld. The sub headline is “A report from HackerRank finds that while the U.S. and India have lots of developers, Chinese and Russian programmers are the most talented” Really? I wonder.

First off I wonder if this is really a valid way to make the determination. IT is based on people basically playing puzzle games online. Who makes time for that? Obviously some smart people who have time on their hands. And maybe some sort of need to prove themselves or gain attention. Is that situation more or less common in different parts of the world? I don’t really know for sure. I’ve written about the US student attitude towards programming contests before of course - What Is It With US Students and Programming Contests? I know no more about the cultural effects now than I did then. I wish someone would study it though.

One big thing to think about it that programming challenges are by their nature artificial. They don’t take 5 people a year to “solve.” Real world developers don’t work alone and they don’t work on projects that can be done in a few hours or even days. So does these contests rate developers or some form of good on test people?

But suppose the US doesn’t have the most talented software developers? If that is the case how do we fix it? Perhaps the way to start is to look at how the “really talented” developers in Russia and China are developed. Are they getting it in school or on their own? I wish I knew. I suspect that some of it may be how education is focused.

In the US computer science departments are interested (largely) in creating computer scientists. That is a very different mind set than creating software developers. Software engineering degrees appear (and I should look at them deeper) to be focused on the development process. Yes there is always work on algorithms and problem solving but projects tend to  be smaller. Frequently getting involved in a large multi-year multi-developer project is something graduate students work on. Developing developer tools like Scratch, Snap!, BlueJ and many more like that. Some awesome projects which I don’t see coming out of Russia or China by the way. More like the US, UK and others in western Europe.

Are boot camps the answer? I don’t think so. I think we need more than that. Those programs are too short and too focused on mechanics like syntax and libraries and the like.  I think we can do better in regular schools and universities but we need to time to do it. A couple of one semester courses in high school and a year long AP course are not enough for sure. At the university level we need even more change though.  That’s what I am thinking about today. Anyone have any suggestions?

Friday, February 03, 2017

Review the revised K-12 Computer Science (CS) Standards

The Computer Science Teachers Association (CSTA) revised K-12 Computer Science (CS) Standards is now available for review. This is not to be confused with the CS Education Framework (on which these standards build). The committee is now looking for interested people to review them. Below is more information with direct links to sections of the standards by grade level so that people can focus in on their particular areas of specialty. Please help make these the best they can be!


The public review period for the revised K-12 Computer Science (CS) Standards is now open! In revising the K-12 CS Standards toward a more final form, the taskforce took specific steps to closely align its work with that of the K-12 CS Framework.  This alignment will strengthen the value of both resources as tools to communicate the CS concepts and practices critical to student educational experiences today. The Computer Science Teachers Association invites teachers, curriculum supervisors, administrators, business leaders, the broad education and business communities to review the standards and offer feedback.

Below are the links which will lead you to the Standards specific to various grade levels. The public review process is now open and ends Wednesday, February 15 at 11:59 PM PST.

Level 1A – Grade Levels K-2 https://docs.google.com/forms/d/e/1FAIpQLSdbNoh56gnfOk7AawCOYwrcKbuFrnZUrSD46N_mb_-xWA40bw/viewform

Level 1B – Grade Levels 3-5 https://docs.google.com/forms/d/e/1FAIpQLSeU9B4NjXpCMQ0pQeaIfCX8O57LeATZAJGiEaEVTj-w44ZEOw/viewform

Level 2 – Grade Levels 6-8 https://docs.google.com/forms/d/e/1FAIpQLSdJVxgcjpWd286WXg-Y5-2MDXRKXpHj2FGvaijGpnZyBq7CEA/viewform

Level 3A – Grade Levels 9-10 https://docs.google.com/forms/d/e/1FAIpQLScqBMLp3Vq-2iEp-GkNXvPa5l-zZ974B0eMmHfqgqX5G19BbQ/viewform

Level 3B – Grade Level 11-12 https://docs.google.com/forms/d/e/1FAIpQLSc_GD6asyGBwV222i3eY6yEBbL6vbj86kBAfi95BnTOqR5djA/viewform

All feedback is greatly appreciated!

Thank you,

CSTA Standards Revision Task Force

Monday, January 30, 2017

The Complex Question of Complexity in Programming

I spent most of last week grading semester projects written by my students. Reading through the code of beginners is really interesting. It’s interesting in part because of the solutions they come up with. You see in my first course we really only have a few weeks to cover programming. It is part of a full semester course and we do a lot of other things. So the tools that students have are quite limited. We don’t get to arrays for example. And the event handlers we deal with are pretty basic as are the objects they learn about.

One of the programs my beginners often select to program is the game “lights out.” This is how we describe it for students. When a student asks “is this hard?” I am tempted to answer “for you or for me?”

Lights Out – The game starts with 25 red buttons arranged in 5x5 grid. Each button pressed toggles itself and the four buttons around it (above, below, to the right, and to the left) between green and red. The object of the game is to get all 25 buttons green.

imageA typical board would look something like the image to the right. Most students wind up writing one event handler for each square on the board. Each event handler has between three (corners) and five if statements to determine color changes. I typically see something like a 14 page print out.

Creating this is at once simple and complicated. Simple because all of the language tools are very basic. Complicated because tracking all the squares that need to be checked is tedious and error prone.

My solution involves invisible boarder boxes and a single event handler that handles all cases simply and easily. Keeping track of what boxes to check is trivial. The print out is about 2 pages long and includes more features than the typical student project. This is also in some ways both simple and complicated. Simple for me because I have done this sort of thing many times before. Complicated because of the use of a two dimensional array (which my students haven't learned yet)  and because some students have trouble grasping why the invisible boarder makes the code easier and not harder.

Complexity seems to depend on a number of things. One is of course the “tools in the toolbox.” The more tools one has the more options one has. That’s pretty obvious. It seems like one of the biggest developments in programming in my time is the arrival of extensive libraries and functionality that is built into to programming languages. Anyone ever have to write code to subtract, multiply or divide? I remember doing that for a PDP-8 program I wrote in college. Everything was built on adding. I’m really class I don’t have to do that anymore.  Of course there is a lot more to learn as well.

The other thing is experience. The more code one has written and read (especially read) the more design options on knows and understands. After a while one naturally sees patterns that are not always obvious to beginners.

Teaching the basic syntax still seems like the easy part of learning to program. Understanding how those building blocks can be assembled is the hard part. There is still a lot of “reinventing the wheel” on the part of students as they “solve” well understood problems. That is part of the learning experience in many disciplines but I often wish we could move that part along faster. And less painfully.

Wednesday, January 25, 2017

Computer Science Education at SxSWEdu 2017

sxswedu logoSxSWedu is one big conference I have never been to. Seeing how it is tied to the big South By SouthWest Interactive and Music conferences it has always fascinated me though. Attending doesn’t easily fit with my travel budget these days and in the past I haven’t seen specific CS Ed content  to justify spending other people’s money either. This year looks very different. Pat Yongpradit of code.org has put together a Google Doc with all of the computer science education related sessions at SxSWEdu. It’s an impressive list. Note that this list has been updated since my original post.
There are some 15 or 16 sessions on Pat’s list. While in some quarters SxSWEdu has a reputation about being all about companies trying to sell educational technology to schools these CS sessions are different. Almost all of the presenters are faculty or researchers at some level. Plus many of my favorite CS education activists are involved. People I’d go out of my way to listen to!
There is one industry panel that looks particularly interesting though – “Why Tech is Investing in Teaching Tech Early” People from Google, Microsoft and Tynker are part of the panel. With a lot of concern about the influence of tech companies on education I think it will be interesting to see how these people talk about their companies’ motivations.
If you are thinking about attending SxSWEdu this year and definitely if you are planning on attending check out Pat’s list of CS education related SxSWedu sessions.

Wednesday, January 18, 2017

What I Learned in College

For various reasons my thoughts lately have been on my college experience. Now I graduated in 1975 which was a few years ago. A lot has changed in computing and computer science in that time. But those four years were quite foundational to my whole career. In fact without those four years I would probably never have gotten into computing in the first place. As I said it was a different time.

In the 1970s there were few computer science departments in universities. My college, Taylor University, had a computer science department of sorts but no computer science major. I took my first CS course to meet a general education credit. A professor who make it interesting, gave lots of projects, and was a really great person gave me the opportunity to get hooked. I patterned my own teaching in part after his. I like to think I have gotten a few others hooked over the years. So things started there.

Taylor was, and is, a smaller school. While my wife at a large public university saw her school’s computer at a distance I had hands on experience. My last couple of years I had my own key to the science building and computer lab. This was not the sort of thing that was common back when a university would have one computer lab to hold the one computer. At smaller schools though it was an option for serious students. I left with a lot of hands on experiences that my peers from big name schools did not have. Better than that I got to try a lot of things and learn a lot of things that we not taught in class. This was a big boost in my early career.

Two other, and related things, I learned in college were debugging and grading. Related? Oh yes. You can’t grade unless you can tell what is working and what isn’t. I some experience in these things in two ways.

Without graduate students, we undergraduate students worked in the computer labs as lab assistants. A lot of this time was spent helping students debug their programs. As a result of that experience I (and the other lab assistants) get to see a lot more errors and learn a lot more about finding and fixing bugs. Learning from other people’s mistakes is a true gift for which I am grateful.

We also spent some time making a first pass of student projects before the professor graded them. We learned to deal with rubrics, spot missing features and attributes, and basically learn to tell good code from bad. I review my students projects in many of the same ways today. Some things do not change.

But that debugging stuff. Wow! That is hard to teach in a class. In fact I doubt anyone teaches a dedicated course in debugging. People are left to figure that out themselves and yet for many people it is the most valuable thing they can learn.

The key thing I take from my reminiscing is that my learning combined classroom and practical out of class opportunities. Would I have had the later if I’d lived off campus or if I’d viewed learning as just something to do in class and partied a lot? Probably not.  University is a lot about what you make of it. If you view it as parties interrupted by classes you’ll probably not get a lot out of it. If you think you can max out on learning by just taking a lot of formal classes you’ll probably miss opportunities.  If on the other hand you view “school” as a holistic learning experience with classes as framework and out of class interactions and involvement as important and valuable you can get a lot out of it. I don’t think college is dead. I think it just needs to be down right. And that is still a possible thing.

Monday, January 09, 2017

How Important Are Number Bases for pre-University Computer Science?

Do high school or younger computer science students really need to understand number-base conversion and binary, decimal, and hexadecimal number systems? Obviously most students are comfortable using decimal numbers. How important though is them knowing Binary? Or hexadecimal ? Especially hexadecimal?

Now in my career there have been times when I used Binary, hexadecimal, and even octal (very useful in machines with 12 bit words.)  But do we need to teach these to secondary school CS students? If so why?

Do we have students reading hex dumps or looking at data in hexadecimal format? I can’t remember the last time I asked students to do something like that. So why hexadecimal?

Now ok Binary comes in handy for understanding things like why character variables are between –128 and +127 when expressed as integers. ASCII (and other formats) are available in decimal as often as Binary, Octal, or hexadecimal. So we really need students to know that a space is 20 in hexadecimal and 32 in decimal? Isn’t the decimal enough?

Binary is useful in other ways of course. Setting and reading flag bits for example can be very efficient and useful. And it is helpful in some cases to get a deeper understanding of data storage.

Now I do think understanding number systems is important. Just as learning a new natural language often helps people understand their native language, learning about number systems/bases can help students understand decimal better. But is the a math requirement or a computer science requirement?

OK let’s discuss.