Monday, December 30, 2019

Looking Back on Blogging

Both Doug Peterson (https://dougpete.wordpress.com/2019/12/30/10-years-ago-2/) and Mike Zamansky (https://cestlaz.github.io/post/10-years-blogging/) posted to their blogs about blogs from ten years ago. It was pretty interesting. Mike did some analysis of his blogging rates over the months and years. I took a look at my blog posts from ten years ago. I was posting on two sites back then. One a Microsoft owned platform which was my main blogging site at the time. I was cross posting some things to this site as well. Ten years ago this time of year I was posting about projects involving random variables, talking about Monte Carlo simulations, and roulette and slot machines.

Rather than look at ten years ago or do some sort of data analysis of the last ten years (complicated by two blogging sites) I thought I would look at this time as far back as I could. So 14 years ago at the MSDN site I posted a rather aspirational look at The Future of K-12 Blogging I wasn’t even close in terms of prediction.

I think more teachers and administrators are blogging. We’re not seeing anything like the expansion of computer science teacher blogs I was hoping for. I like to think I made a good case for it and that it is still a good case.


Every computer science teacher should have a regularly updated blog. Actually I would like to see every teacher have a blog but for the short term I will settle for computer science teachers blogging. There are several reasons for this.

  1. We need to build a community of practice in CS education. We need computer science teachers, who are generally alone in their building, communicating with their peers, sharing ideas, and supporting each other.
  2. The technology aware teachers need to set an example for the rest of the teachers. If they don’t use technology why should a social studies teacher?
  3. Most importantly, blogging is a wonderful way to share information with your students and their parents. Post links to extra resources along with a recap of a recent lecture. Give students an opportunity to comment on a current assignment or a recent test question. Expand the discussion and the learning outside the bell delimitated world of the classroom. Teach!

I'm really grateful to the CS educators who are blogging though. Mike Zamansky, Garth Flint, Doug Bergman, and Mark Guzdial have been particularly helpful to me learning and thinking. There are others listed at my Computer Science Education blog roll.

Friday, December 27, 2019

Looking Back on Computer Science Education 2019

Christmas break for me until 6 January 2020 and with Christmas over I have some time to think. 2019 was an intere3sting year in CS education. States continue to adopt more CS in K12. Teachers are still in short supply but so to are schools looking to hire them. Schools or perhaps school administrations and school boards, are slow to roll out more CS education. It looks like more schools are offering it which is great. But they are net requiring it so while they meet to checklist of offering CS it is still not for everyone. It’s going to take a while.

AP CS Principles continues to grow in enrollment. I try to get excited about that but it’s hard. AP courses attract too small a subset of the over all population. While there is much to like about AP CS Principles I can’t help but believe we need some more interesting CS courses. Something with depth and an interesting and motivating outcome. The Create task is not that.

Every year I think that the Internet of Things will take off in CS education. The mix of bytes and atoms seems like a natural to me. That didn’t happen in 2019. Perhaps because there is no one promoting it.  I plan on retiring from the classroom in the spring. Maybe after that I will have to time to really dig into it. Who knows, maybe I’ll come up with some good project ideas.

Cloud computing grew a bit in interest in 2019. Amazon Web Services has done some great work on this. Uptake has been slow but at some point it may take off. The problem with cloud computing, and perhaps IoT, is fitting it into the curriculum. It doesn’t fit easily in either AP CS course and too many teachers are working and teaching too many preps to adopt major new topics.

Artificial Intelligence took a jump in interest that surprised me a bit. There was a huge birds of a feature on the topic at last summer’s CSTA conference. AI for K12 has its own website, mailing list, and lots of people interested. See AI4K12.org for more on that.

What sort of Artificial Intelligence can you teach in K-12? Mostly how it is used, how to use existing AI tool and machine learning training systems. Developing real AI takes a lot of math that not many K-12 students have yet. Still, it is very important that students learn this much. The need to know what AI/ML is, how it is used, and discuss the ethnical considerations involved.

As always,the new year is full of potential. K12 CS is on a growing path that seems to have some momentum behind it.  I can’t wait to see what it brings.

Thursday, December 12, 2019

Explain This Confusing Code

My major task today has been finishing off the semester exam for my Advanced Placement Computer Science Principles students. They’re not happy about having an exam but that’s life. Writing a good exam is difficult. Fortunately I have some previous exams to work with. Some I wrote, some other AP CS P teachers wrote. I’m getting close to done. I want to have AP exam style questions to help my students prepare for the actual AP exam in the spring but of course the main purpose is to put a grade in the grade book. OK I’m half kidding. I seriously want to get a handle on what information they have learned and what I should review before we move on.

Coincidently someone posted a question for the AP CS A question bank on Facebook asking for help with explaining it.

How does this evaluate for Java: x / 10 % 2 ?

This is exactly the sort of question that had one of my APCS A students some years ago say there were a lot of examples of poor coding practice in the AP Exam. And this, in my opinion, is a terrible coding practice. I can understand why the question may be attractive to some. The whole order of operations thing. Students should understand it. But good coding practice is to avoid ambiguity and this code is loaded with ambiguity.

Is this integer division? 10 looks like an integer to me. Making it 10.0 would make it look like a floating point number of course. How do you make “x” look like a specific data type? This is not FORTRAN IV where it would be a double since it doesn’t start with a letter from “i” through “n.” And remembering the order of precedence between modulus and division? Who has room in their brain for that to be top of mind?

This makes a great discussion question. A great question to emphasis the need to use parentheses to remove ambiguity. There is no way it would pass code review in a professional development environment though. At least not a review I want to be part of.

Well, I should go finish writing my test and trying to avoid writing horrible questions.

Monday, December 09, 2019

Coding Without a Net

My Programming Honors students are struggling with creating classes in C#. They really wanted me to code up a project live (again) and have them follow along. But I’ve used my usual examples and samples and projects already. First message is that I need more but I had to come up with one for today. And I had writers block. About a half hour before class, with a bit of panic setting in, the other computer teacher suggested a reindeer class. For Santa’s sled. For data use a name, their position on the sled, and if they have a red or black nose. Ok a bit of a goof perhaps but simple and seasonal. Why not?

Now I don’t know about you, but I prefer to write demo code several times before writing it again live in front of an audience. Not an option today but how hard can it be? I’ve written classes many times before and my content knowledge is solid.

I honestly hoped I would make some mistakes. Hopefully the students would catch them. Great learning experience. And yes, I did make a couple of mistakes. I forgot to make the class data private right off the bat. I called for a string parameter in the constructor that should have been an integer. A student caught that one. Winning!

The hardest part for me is that I had only thought through writing the class but now how to test it. I had thought about the constructor (and prepared a data file with 8 normal reindeer and Rudolph) and using ToString (overridden of course) for testing purposes. I had to make up a test for various other properties on the fly. At least that meant students got to see/hear my design thoughts as they happened.

  I’ve also been thinking about a Santa’s sled class that would have an array of reindeer objects. That might be fun if I figure it all out.

Things went pretty well actually. I got a lot of ideas which doing the demo and I’ll be more prepared in the next semester. I need to come up with something seasonal for the spring though. A prom dress class perhaps?So many ideas.

Wednesday, December 04, 2019

Coding for Fun and Advent of Code

My friend Mike Zamansky is a big proponent of the Advent of Code – 25 days of coding problems leading up the Christmas. Since I have been thinking I want to write more code for my personal enjoyment I started in on it myself. Day 1 and Day 2 were interesting (to me) problems and I enjoyed doing them. Day 3 didn’t appeal to me. It looked like something I would want to be paid to write so I didn’t do it. Day 4 looks interesting so I plan on taking it one some time today. After all, it is not coding for fun if it isn’t fun. I’m not looking to prove anything to myself or anyone else at this point in my life. Mike has been blogging about the problems he has been doing from a teacher’s perspective. I highly recommend his commentary https://cestlaz.github.io/

The Day 2 problem was particularly interesting to me though. It is a very simplified computer simulator. Only 3 instructions – 1 for add, 2 for multiply, and 99 for halt. with each of the first two operators having three parameters – location of the two numbers to operate on and the location to save the result. It is potentially self modifying code if any of the addresses points to an operator later in the list of instructions.

The obvious enhancement is to add more operators – division and subtraction for sure. Having a set number of parameters makes things easy so having variable numbers of parameters adds some complication. The more I thought about expansion the more I found myself contemplating a more complete “assembly language” especially as I found myself thinking about literal data and pointers as different types of parameters. Maybe I spent too much of my career writing in various assembly languages. In any case, as a thought exercise I found myself going far beyond what I would want to assign to a beginning programmer.

So I am pulling back a bit. I’m thinking about several smaller pieces. The easy part of a simulator with a few more operators. But maybe, also, what would a compiler look like that would create input for such a simulator? How would it load data into appropriate places? That’s a more advanced project but maybe something for me  to write to make it easier to create input for the simulator?

If nothing else, looking at Advent of Code is giving me ideas for both students and myself. Now that is fun.