Thursday, June 22, 2017

Student Programmer Fix This Code

Recently I came across this cartoon and shared it on Facebook.


Responses were interesting. The newer one was to programming the more likely people seemed to be to explain why the if statement wasn’t working correctly. The more experienced one was the more likely they were to point out that you probably shouldn’t have written that code (an option to kill humans) in the first place. There is some validity in both responses of course.

In teaching we often create code that is less than ideal to force a particular observation of a concept if less code. How often do we explain that to students? And how well does it take? I’m not sure but it does concern me.

Returning to asking students to debug code. I like the idea and it is something I want to do more of in the future. The problem comes when students don’t have enough experience yet to find the less obvious errors. On the other hand how will they get experience if we don’t let (make?) them practice debugging? Most debugging practice students get is on their own code. Often they are too close to it to see what is wrong.

Last semester I gave students code written by other students and asked them to test it. Most of the code worked as advertised and what students reported out was missing functionality rather than “broken” code. Maybe I need to write some broken code of my own and have students look at it?

How are you helping students learn to debug code? Any ideas to share please leave them in the comments.

BTW there is some discussion if asking students to debug code is better than asking them to write code on the new CS Educators Stack Exchange. You may want to join in there as well.

Wednesday, June 21, 2017

Become A Computer Science Teacher in Five Days

Garth Flint is a computer science teacher in Montana. While most computer science teachers are a bit isolated, most are the only CS teacher in their school. Garth is more so because Montana is a big state with a small population and few computer science t3eachers. Recently he attended a workshop to teach CS teachers. He wrote a review of the experience - A week of in-service: Another Python course

Some of the teachers had no previous computer science background let alone experience teaching computer science. They were mostly told to teach a course in the fall and figure it out.

Only a couple of us had actually done any CS/programming teaching.     It was a bit interesting talking to the teachers that had been give the directive to offer a programming course at their school.  It was a “come up with something” type of directive

I hear this a lot. You know a good teacher can teach any subject with a little prep time. Well no they cannot. Can you imagine asking an English teacher who spoke no French to teach a French course after a one week PD even at a local college? I don’t think so. Why is it less crazy to do the same for computer science?

As Garth points out in his post, teaching (and learning) programming syntax is the easy part but there is a lot more to teaching computer science than programming language syntax. One doesn’t just learn syntax rules and some vocabulary and suddenly speak French. No, there is idiom involved in a new natural language and that is no less true of computer science.

A week long course can give a CS teacher enough to get ready to teach a new programming language or a new curriculum. What it can’t do is really get you seriously into computational thinking or go deeply into the how to teach or why things are done they way they are. There is just no time.

The best professional development for teachers new to the subject are more involved (and longer) than 5 days. They involve pre-workshop work, post workshop work and ideally the workshop[ is longer than a week.  Even then things are going to be pretty tough that first year (or three). What worries me the most about assuming enough can be learned in a week is a) students will get turned off b) students will have to be retaught later (if we can get them in class again) and c) that teachers will get frustrated and quit before they get good at it.

There are many who believe that it is easier to teach a teacher to teach CS than to teach a CS person how to teach. Please do not mistake me for one of those people.

Tuesday, June 20, 2017

Movies for Computer Science Students

Today was watch movie day. I watched two movies that I have been thinking about showing to my computer science students.

The first one I watched was "The Imitation Game" about Alan Turing. Frankly I didn't like it. I like it even less for showing to my students. Why? Because I don't think students will identify with Turing. He is just to weird. Make no mistake I think Turing was an amazing individual and there are lessons in his story. But, well, it just didn't inspire me to want to do things.

The second movie was "Hidden Figures." This one I loved. Even though few of my students are females of color these women are real and normal in ways that Turing wasn't. They had children, families, and were concerned about others. They had things to overcome and fought to overcome them. That is a message that resonates. I think my students will see people to aspire to be like in this movie.

My experience is that students who see stories like "Hidden Figures" see the injustices against both women and minorities. They understand how wrong that treatment was and is. Sure there were horrible injustices against Turing and his death was a tragedy. But his personality, at least in the movie, is not one to make people feel as sympathetic as the women in "Hidden Figures." And the women won! And in their winning they opened the doors for many others.

So what other movies should I think about showing my computer science students?”

Micro:bit Small-board Computer Launches in U.S. & Canada

The Micro:bit (nee BBC Micro:bit) is now available in the US and Canada. This little device has been in classrooms in the United Kingdom for about a year and a half but is only now become commonly available in the US and Canada. Now at first glance this may not seem like a bit deal. It is a little device that must be connected to a larger computer to program. Seems like an extra step.

Microbit%20render%202%20no%20background But it is a big deal and it is more than just a little device. In a word, the thing that makes the Micro:bit interesting is “Making.”   This little device is easily included in little projects that can really interest students. Just programming the device on its own might get boring quickly. It was for me. But including it in a maker space sort of project is a game changer.

Now you’re asking for resources. The device is programmable in a number of languages and tools from Scratch to Python and JavaScript. There is a 14 week curriculum developed for students by Microsoft. Project Lead the Way also has a curriculum. Both are designed around making things that include the Micro:bit.

The Micro:Bit web site has a bunch of project ideas if you are looking for what others are doing. This could be fun!

Wednesday, June 14, 2017

How To Teach Computer Science

I always read articles like this one - The 5 Worst Ways to Teach Computer Science – with some trepidation. I always expect to find out that I’m doing it all wrong. The other thing that always concerns me is that the author will be all wrong. Everyone who knows how to code thinks they are an expert in teaching computer science. Many of them are wrong. But this article is a good one. (In other words it mostly talks about doing things the way I already do them.) I think to most experienced CS teachers it is review. I think it is written for teachers who are new to teaching CS though and it fits that role well.

I do think there is a place for individual projects though. Not every project needs to be or even should be a group or team project. So the second thing that article did was get me thinking about good practices.

One of the worst ways to teach computer science that the article doesn’t talk about is Do Everything On The Computer. I am seeing that that can be a real problem. My teaching focus is always concepts first and while after 40 years of writing code a lot of things on the computer seem obvious to me. Not so the “digital natives” I am teaching. Many of them separate real life from what is going on in the computer.

We think they see them as the same because of the social aspects of computer use we observe but I don’t think that is really the case. Young people see the communication aspect of using computers as somewhat parallel to their real life but that is much different from most computer science concepts.
Take counters and accumulators for example. They don’t think in terms of those computer science type words even though they use both in their daily lives. It’s hard for them to make the connection using code. I have them count a hand full of coins. Then I have a student total the value of the coins. Now we can have a conversation about counters and accumulators in the context of a loop.
Speaking of loops I have students walk as a loop. Walk seven steps or walk to this point – demonstrates counting and while/until loops. I’m struggling with how to have them act out recursion though. Ideas?

cs unplugged
More and more I am looking for kinesthetic learning that gets students physically involved in computer science concepts. There are some great ideas at CS Unplugged which I use with several classes. “Steal from the best” I always say.
We use some exercises from there when we teach sorting, parity checking, and more. They work well and get students involved. Of course kinesthetic learning is far from just a computer science teaching thing. The growth of maker spaces is one newer aspect of it and “making” has some potential in computer science education. We can also connect computer science to other subjects which will help students learn both/multiple subjects.

The important thing is that we don’t narrow our teaching to just lecture and things the students do on the computer. We have to be more interactive and include ways to get students doing things.

Friday, June 09, 2017

What is the purpose of a computer science education?

One of my former students posed that question. He then asked if it were:

  • Building computer scientists
  • Building software engineers
  • Building citizens

Now context is important in this question. At the university level, many schools see the first item as their main priority. Some see the second a a priority but then they may also see software engineering and computer science as very different majors. Where does the third item – building citizens – fit? Recent events (think Volkswagen diesel issues and hacking and more) suggest that building good citizens should have some thing of a higher priority.

At the high school level , where I teach, the questions are different still. We are not, for the most part, trying to turn out job ready CS students. Oh sure, many of my students have gotten summer internships and part time jobs based on what they have learned in my classes. But I’m not trying to make everyone a professional developer. Nor am I expecting the end result of my course to be a serious (for example published) computer scientist. No, high school is more about preparing students to take their place in the world as informed and (hopefully) ethical citizens. I teach in a Catholic school so we are allowed to emphasize values pretty strongly. In fat that is part of our mission.

I see the purpose of teaching computer science in high school as about several things. Not about making professional developers but giving students the tools to understand computers.What can computers do? What can they not (yet?) do? And how do these things impact the world they live in?

I see my role as building enthusiasm for the subject. (See What CS Should a Student Know Before High School) Not every student will major in CS in college nor should they all. But if I can encourage a few smart kids to do so that is great. At least I don’t want to kill enthusiasm that students might have.

I really want to instill some ideas about ethical practice. High school should be something what about citizenship. That  is where I want students to start thinking about the consequences of computer science and what it enables. They really have to understand CS to understand what is happening though. They need a vocabulary and some understanding of basic concepts. They need to be able to participate in conversations intelligently and with some knowledge. And they have to learn how to learn more.

High school computer science is a beginning and not an end in itself. A high school diploma is not a terminal degree. If students are a little more prepared for a world where computers are important we have been successful.  

Wednesday, June 07, 2017

What CS Should a Student Know Before High School

Recently a middle school teacher asked what computer science knowledge would high school computer science teachers like their incoming students to know. The first answer was the obvious “send them with enthusiasm and we’ll work with what ever knowledge level they have.” Pretty unsatisfying. I know because university CS faculty tell me the same thing when I ask what they want. So I had to think about it a bit.

So what would I really like? Well I’d like them to know the way around the operating system they use. Creating folders, moving files, renaming files, connecting a network printer, and connecting to wi-fi. That’s not computer science you say! Yes it is. It involves knowing something about how computers work and how to get around in the system. It will save me a bunch of time and the students some heartache. I’d also like them to have some experience trying things out. They should know were to look for different things in menus, in tools, and online.

How about understanding how the Internet works? DNS, packets, IP addresses, and stuff like that. I don’t mind teaching that. It’s actually fun. But students could learn that earlier.
For programming things? I’d love to spend less time on variables, loops, and decision structures. Can they use them to solve simple problems? Do they understand the connections between a variable name and a location in memory, a variable type and how much memory is uses, and how values are identified? Can they understand how a loop works and how an if statement works? If so I saved about three weeks that I can use for more advanced things like arrays and objects and methods and scope and a whole lot more. Even if they know those concepts in something like Scratch or Alice I can jump right to syntax for text based languages.

Honestly though few of my feeders are going to do all that. So I’ll still need my current freshmen course. But if a couple of kids can jump right into Honors Programming or AP CS Principles I could be very happy.

Thursday, June 01, 2017

Need Funds to Attend the CSTA Conference?

OK this is an opportunity too good to pass up if you are a K12 computer science teacher. Seriously.

If you are a K12 teacher, then Rolls Royce wants to help get you to the conference in STYLE!

CSTA and our partner Rolls Royce are excited to announce a scholarship to help K-12 teachers attend the CSTA Conference in Baltimore, Maryland this July.

Thanks to a generous contribution from Rolls Royce, over the week of June 5 - 9 we will give away a total of twenty-five (25) $1,000 travel scholarships for the CSTA Annual Conference. Each day we will release five (5) scholarships until they are gone.

How do you get one of these scholarships?  Here are the rules:

  • You must be a K12 Teacher to be eligible. No exceptions.
  • You may only receive one scholarship to attend the conference. Recipients of other CSTA conference scholarships are not eligible.
  • Each day by 9:00 AM EST we will post a unique application link for that day via Facebook, Twitter, and other media.
  • Applicants can submit one entry each day. All applications become the property of CSTA.
  • Each day there will be a simple question or activity to complete.
  • Each application will remain open for 24 hours.
  • Recipients will be randomly selected from eligible entries and notified by email.
  • Recipients will have 24 hours to confirm the scholarship or it will be released to another applicant.

Have fun, and we look forward to seeing you in Baltimore for fun and learning at THE event for and by CS teachers & teachers that teach CS!

The CSTA Annual Conference will be held in Baltimore, MD on July 8-11 and we have a great lineup of sessions, workshops, and exhibitors planned.

Click here to find out more about the conference.

Need more information?

How To Make Computers Work For People Like You

Years ago I was giving a career talk in Roxbury (a heavily minority neighborhood in Boston) to a group of students. At the end a young African American woman asked me why I, a middle aged white male was interested in seeing more people like her in computer science. A fair question for sure. My reply was basically that I worked for a company, Microsoft, that wanted to have customers of all types. While I have a pretty good idea of what middle age white men want, young African American women probably have different wants and needs that I don’t know so well. So to serve the needs of diverse customers we really need diverse people in the field.

While that is true now and was then I have sense learned that things are worse than I knew without diversity. Take this article - Algorithms aren’t racist. Your skin is just too dark. – for example. If I am living in an all white world I might never notice this sort of built in bias – intentional or otherwise. It reminds me of other stories I have heard during my career.

A company I worked for created color CRTs where the default colors were red and blue. The developers had no idea how common red/blue color blindness is. And there is thee famous story of the developers who were so proud of the handwriting recognition of the Apple Newton. Until they gave it to Steve Jobs to try. It turns out they hadn’t tested it with left handed people – like Jobs – and it could not read his handwriting. There are more examples out there but you get the idea.

A reason to increase diversity in computer science is so that computers work better for more people. It’s a diverse world out there and we can’t have computers that only work for white and Asian males. Especially not if they are all cookie cutter examples of a few narrow types.

The best way to have a future that is built for you is to build it yourself. With computers becoming more and more central to daily life we need that diversity building out future.

Wednesday, May 31, 2017

News Flash! School and Industry Are NOT The Same

Computer Science cheating has been a discussion lately. Not just in the NY Times article I referenced the other day (Cheating In Computer Science Class) but on Facebook, on Twitter, and other social media. One sort of rebuttal to the concern over cheating was a blog post - Computer science students should learn to cheat, not be punished for it  - that also got a lot of attention. I see industry people nodding their heads in agreement. The problem is that the rebuttal author doesn’t seem to really understand the issue. There are some common misconceptions that I think need clarification.

Misconception: The goal of a school project is a working program.

That is what the goal is in industry. Make it work to spec and make the user happy. That is not the goal, or at least not the main goal, in a school project. The goal in a school project is to demonstrate what a student knows. Not what their friend or their parent knows but what they know. It is a diagnostic tool for the teacher to see how much learning is taking place. An imperfect tool to be sure but all we have are imperfect tools.

We also want them to practice and use what we are teaching. Cut and paste is usually a poor substituted for figuring out how to solve a problem and properly use the tools that are being taught. One learns more by doing than by simple copy operations.

Misconception: Students who copy code have to understand it to use it.

Oh if only that were true. Any teacher will tell you that students use code acquired from others without understanding it all the time. If a student finds a snippet of code, understands it, and uses it in a project most teachers would see that as a win. The student learned something. Wonderful! We’re happy. Using code without understanding it helps no one.

But it is not just snippets that are involved in cheating. Nothing so remotely borderline as partial borrowed code. Sometimes a student will hand in a full and complete program that they found on the Internet. And they will do it without understanding a bit of it. Who does that help? No one. Remember that in school the goal is gaining knowledge not just handing in something that works.

Misconception: Teaches don't want students searching the Internet for help

The internet is a wonderful learning resource. I know teachers who explicitly recommend sites like Stack Overflow to students and encourage them to look there for help. Some of us actually recommend reading the documentation online and even using sample code. As long as the student understands what they are using. Teaching is not just about covering the limited material but helping students learn how to learn. We’re thrilled when students use outside resources to go beyond the scope of the class. But we do want students to understand what they are doing.

Misconception: Programming for school and for industry should be the same

No. In industry the goal is a working program and in school the goal is learning. Industry expects employees to know things. School assumes they don’t and strives to teach things. The goals are different so the methods must be different.

I have heard the argument that schools should teach the things that industry needs using the tools that industry uses. It’s the old trade school mentality. And that works great for trade schools which serve a valuable purpose. Computer science education has to be more than just the tools of the hour. It has to be on concepts that last for a career. And that process is different from short term goals.

Sure using industry tools can be a good thing. And using things like Git and other source code repository/source code control tools is a good thing. Guess what? Many schools do teach those things. In fact arguably more CS departments teach more of the professional skills, especially soft skills, than many outside of education realize.

Misconception: Computer Science and Software Engineering are the same thing

Computer Science is more theoretical and software engineering is arguably more practical. One should not criticize one for not being the other. At the high school level we are not trying to create professional software developers any more than we are trying to create professional physicists or biologists. Rather we are trying to give students a conceptual basis for understanding the world in which they live. Links to more reading below.

I’ll conclude with one more point which I think may be the most important one. We need computer science professionals with integrity. We need professionals who are honest, who are ethical, and who are dependable. Educators care about cheating in its various forms because we value those traits as  much as we value the technical knowledge students gain in our classrooms and labs.  If a student cheats in school will they not also cheat the companies they later work for? I think so. And that should concern industry people. It should concern them a lot.

On Becoming a Better Computer Science Teacher

Andy Ko, Associate Professor at the University of Washington iSchool and Chief Scientist & Co-Founder @answerdash has posted a blog and slide presentation from a talk he gave called How to be a great (CS) teacher. It’s the best thing I have read on the topic is quite a while. If ever. The article is very good but I recommend you read and save to re-read the slide presentation.

I wouldn’t say that all or even most of the ideas in it are new to me but they are explained very clearly and backed up with references. That is especially cool in that we often adopt ideas without real research behind them. Research is good.

Over the years I have learned a lot from great teachers. Many years ago Carnegie Mellon ran summer workshops for CS teachers where one of the goals was to help us learn how to teach to a more diverse (i.e.. female students and other non traditional) student body. The 6APT program was a game changer for me.

When I was at Microsoft I was able to travel and visit a lot of teachers around the US. And attend a lot of great conferences (SIGCSE, CSTA, and more) Since I returned to the classroom I have tried to adapt many of the things I learned in those years to my teaching practice.

This summer as I put my plans together for next year the ideas in Andy Ko’s work will be a regular reference as I look to how I can improve next year. Always be learning.

Tuesday, May 30, 2017

Cheating In Computer Science Class

An article about cheating in CS classes from the New York Times (As Computer Coding Classes Swell, So Does Cheating) has been all over my social networking feed this last weekend. Harvard’s famous CS50 is the big name example in the article. I wonder if this points to a problem we may be crating inadvertently. Are we creating an environment where taking a CS course is seen as the end product rather than actually learning computer science?

Has taking a CS course become the cool thing to the point where students without real interest in the subject take the course (or courses) more as a resume builder than as a real attempt at learning something valuable for the sake of using it?

The article points out that a CS class can involve a lot of work. This often leads to cheating in many subjects. After all the end goal of taking a class for many students is to get a good grade. Oh sure there are courses where a student may really be interested in the topic and wants to learn as much as possible. But there is only so much time in the day so if a few corners are cut for the sake of a good grade outside the student's real interests what’s the harm? (Or so the rationalization goes.)

My experience is that other students get very upset when their peers take shortcuts. It’s unfair if someone gets grades they don’t deserve. It makes me wonder if grades hurt more than they help. The same motivation seems to lead to cheating as often as it does hard work.

It’s actually somewhat more complicated in computer science though. There is a fine line between collaboration and helping ones peers and actually cheating. Where is the line to be drawn? Once in industry the motto I heard often was “steal from the best” and code reuse was touted as a very good thing. Of course one was always expected to really understand the code they reused. And one usually learned from it. A course is a shorter term thing though and one can sometimes borrow code without understanding it.

What is the answer to cheating? For some it is better detection of cheating and swift, firm, and noticeable punishment. An other option is projects that are more tuned to student interests. It can help if the student becomes more interested in completing the project and learning what they need to know to do so. But it is hard to come up with projects that motivate every student. Especially in a huge auditorium course like CS 50. High school teachers may have it easier there. BY degree at least.
Maybe part of the answer is less focus on grades. That’s hard though. High school students are told over and over again that good grades get them into a good university which will get them a good career. Not good learning – good grades. The words we use matter.

Clearly I don’t have a final answer. No teacher does and we have been dealing with this issue probably as long as we have had grades that matter. For now I find that semester projects of a student’s choice work best. They don’t eliminate cheating. But I think they reduce it. And that at least is a step in the right direction.

FWIW here is a contrasting view - I reply to it at

Wednesday, May 24, 2017

Interesting Links 24 May 2017

It’s been a while since I posted one of these collections. And I’ve been blogging a lot less lately. Call it a sort of blogging vacation. I just needed to prioritize other things for a while. We’ll see how things are going forward. In any case I felt like I had a lot of things I should share so here we go.

I know a lot of people are using Python these days and with summer coming you may be looking at projects for next year as I am. So I thought I should share this Collection of free Python lessons (Shakespearean Insult Generator, Magic 8 ball, Sorting hat, Mad Libs, and more) I’ve used similar projects with students in other programming languages and they work well with students.

Announcing Microsoft MakeCode for Circuit Playground Express – From Microsoft Education. The really cool thing about this online development tool is the variety of interesting and inexpensive hardware it can be used with. Combining programming with “making” opens some really interesting possibilities.

Speaking of making – this look at what Doug Bergman is doing with his students is really impressive. A spirited teacher reshapes the computer science classroom for 21st-century makers He has a very interesting computer lab with movable tables, lots of interesting hardware (think several kinds of robots plus Kinects) and really lets students get creative.

Researchers unveil new password meter   - security is getting more and more attention lately so this information about good passwords may be a good discussion starter. The source code for this password meter (it’s in JavaScript) is available.

The ACM Code of Ethics, Draft 2 is now available for comment. Deadline for Input Is June 5th, 2017. This update is designed to make sure that the code is current with the technology. I plan to have some discussions about ethics based around the final document with my AP CS Principles class. I will at least bring it up in the rest of my courses though. Ethics is VERY important and getting more important to teach all the time.

From the UK there is a new edition of Hello World magazine out *now*. Download via   Brought to you by Raspberry Pi, CAS and the BCS Academy. Lots of awesome in this edition. Things are really moving in CS education in the UK and the rest of us should take advantage of the resources.

Check out the Computational Thinking Interview Series from  CSTA “The CSTA's Professional Development Committee is gaining perspectives on computational thinking by meeting with leaders in the field. In this interview series, we are asking, ”What is computational thinking?””

Designing a Computer Science course with constraints  by Mike @zamansky is a good look at how teachers often have to deal with constraints outside of their control when designing a course.

Three Computer Games That Make Assembly Language Fun – They’re not free but they’re not all that expensive either. Some interesting possibilities for some classrooms I think.

Acer Windows Mixed Reality Headset Developer Edition is one of two mixed reality headsets offered by the @MicrosoftStore Available in August when birthday comes. Seeing these inspired a blog post of mine. A post with some ideas and questions I am still looking for feedback on.

Using Virtual Reality for Teaching Computer Science

    Thursday, May 11, 2017

    Using Virtual Reality for Teaching Computer Science

    Maybe you can help me? My gut tells me that virtual reality or even mixed reality can be useful for teaching computer science. How to do that is the question. I don’t want it to be just another device that students program. That’s not really innovative. I want to think of ways that help students learn computer science. I want them to “see” things that can not ordinarily be seen.hololens-military

    My first thought was a virtual tour of a computer. While I do show students mother boards and other pieces of computers wouldn’t a “walk through” of a virtual computer be better? More interesting? On one hand a video, perhaps just an animation, can do that fairly well. On the other hand virtual reality is the opportunity to take different paths through the computer to trace things the way a student would like. A mixed reality tool would label items as a student looked at a physical device. Taking the tour would be more fun though.

    How about following instructions as data through the pipeline in a CPU? That could be fun and make things more real to students. In fact a general walk through a CPU could be good. The improvement over a simple video would be the ability to travel non linearly. IS that enough? I’d like to find out.

    How would virtually tracing the path of code in a program work? Could we set things up so a student could follow (visually) a variable through code to see what happens to it? Perhaps watching the variables as they appear (are instantiated) and disappear (as their scope expires)? The idea of being mixed in with the code ala TRON or The Matrix has a certain appeal to me.

    Do these ideas make sense to people? Would they help? Do you have other ideas?  Is this even possible with current technology? Putting this together probably requires some talent, time, and even money. Who will do it first?

    Monday, May 08, 2017

    Pseudo Random Numbers Are Confusing

    Random numbers are really useful in computer science. We use them a lot for simulations (or games – pretty much the same thing) and to make programs more interesting. But they are not as simple as might appear. First off they are not really random and secondly there are often timing issues. And then there is the whole testing situation. randomnumber_wordle

    Let’s start with the first of these. Those of us who understand random numbers in CS understand that it is impossible for computers to calculate truly random numbers. Cryptography which really relies on true randomness uses all sorts of tricks and tools to generate groups of random numbers. No serious cryptography person would use a standard library for use in cryptography. But for most things we do  in high school computer science built in library random number tools are just fine.

    Where things have gotten complicated for my students lately is with timing issues. The libraries we are using use time from the computer’s clock as a seed value for the generator. If you instantiate two different random number objects at the same time, or rather within a single clock interval, you get two lists with the same values. Whoops! This is pretty much the opposite of what students really want. They’re generally better with one variable than with two but that is not obvious to many beginners. After all if one is good two is better right? And even if you have one variable if you instantiate it over and over again in a tight loop you can also get a lot of duplicates. Various languages have various ways around this (static variables for example) but hardly obvious to a student who just heard (or read) about generating random numbers.

    And then there is testing. Oh my. Seldom a student strong suit. After all if it compiles isn’t it right? The special problem with random numbers is how does one test if the data is different all the time? Visual Basic has a Randomize statement that makes things “more” random. If one doesn’t use it than the program will use the same random numbers every time. In other languages (libraries really) one can use a fixed seed value to get the same set of random values for each run. How ever one does it, it is useful to have a known set of data for testing purposes. Talking about this is an important part of the larger issues of understanding random numbers AND of testing program.

    One of my tasks for this summer is going to be trying to document this better for students. I realize that I need to cover this in more depth if students are going to really be able to use random numbers effectively. I can only talk so much in a single semester course. Perhaps if I provide supplementary reading for homework it will help. It’s a theory.

    Maybe I’ll bring into the mix. Looks like some interesting tools there.

    Monday, May 01, 2017

    Punch Cards, Comments, and Learning From the Past

    Doug Peterson, whose blog always makes me think, had a post last week about internal documentation. Specifically things like comments which a lot of the popular block languages don’t really do that well. Of course this made me think about my code and what I teach.

    Punch CardsThe image to the right is some code I wrote in university. Yes, I have a 45 year old deck of punch cards and yes, that is a FORTRAN program. I ran into it while cleaning up this past weekend. Doug’s post had me looking at the code. And the comments.

    The comments  are great. They really let me know what is going on. That’s good because my variable names are horrible. What ever was I thinking? I’d do things a lot differently today. And in fact I do do things differently today. I have written programs like this one several times and in several different languages over the years. The variable names are much better. We’ll talk about comments in a moment.

    The first time I dug out this deck of cards was some years ago when I tried to rewrite this program in Visual Basic. The comments, one in particular, was critical for me making things work. I use this as an example for my students of why they should comment their code  in fact.

    My most recent iteration of this program has been in TouchDevelop. I’m pleased to say my variable naming is MUCH better now. My commenting? Not so good. Part of the problem is the nature of the language. Comments are supported but somehow I never seem to think of them the same way as I do in other languages. This seems typical of block or drag and drop programming languages. (Doug brings this up which made me really think about it.)

    Of course lack of commenting is not unique to drag and drop programming. Students have pointed out that some sample code I wrote and gave to them to learn from could use a lot more comments. BLUSH They are quite correct.  I really need to fix that. Perhaps I’ll take on as a summer task to well document the demo code I show students. I really should be modeling what I present.

    I do worry that we are losing the focus on internal documentation these days. There is this theory that well written code with well chosen variable names and identifiers should be understandable without comments. Like many theories that doesn’t seem to work as well in practice though. Well, I’m off to comment some code.

    Thursday, April 27, 2017

    How important is the first programming language really?

    We really need people who have never faced a room full of  students in their lives to teach us how to teach computer science.

    Said no CS teacher ever.

    What brought that on you may well ask. Long story. First Mark Guzdial posts about changes at Stanford (Stanford CS department updates introductory courses: Java is Gone) highlighting an experimental version of their first programming course to use JavaScript. Then it hits Reddit (Stanford is moving from using Java to JavaScript for their introductory CS course) where hundreds of comments follow. Yes, hundreds. Most appear to be from people who have never taught a class themselves but have strong opinions of what a first language should be. And the occasional journalist kicks in with something like Universities finally realize that Java is a bad introductory programming language

    How ever would we poor ignorant teachers get along without these experts? Fortunately for my sanity Mike Zamansky who actually is a teacher jumps in with some useful thought. A new first language? What's the follow up plan?

    I believe that a first programming course is very important. The language used, while important, is not the biggest consideration. Rather is is the concepts covered (see Mike’s post) and how well the instructor does in preparing students for what comes next. The new course at Stanford is going to be taught by Eric Roberts who is one of the al time outstanding CS educators. I’d sign up for that course because of the instructor even if it was in COBOL.

    Teacher is important. Curriculum is important. Projects and assignments that help learning are important. Language some where down the line.

    I figure I’ve learned a new programming language about once every three years for the last 45. While I joke that I can still write a good FORTRAN program in any language the truth of the matter is that learning new languages changes how I code and how I think about problems. The first language got me hooked. But that was not the end all and be all. The first course is just the first course. There is a lot more to come and it would be a mistake to try to cram a four year undergraduate curriculum into a one semester (or even full year) high school course. And yet that is what some "experts" seem to be trying to do.

    Wednesday, April 26, 2017

    Surface Book–a first look

    I’ve had two Surface Pros. A Surface Pro 3 and a Surface Pro 4. I love them. Make no mistake these have been idea travel computers for me. And powerful enough for just about everything I could want. They are also great for teaching as I can carry them around the room, use the tablet, and project wirelessly to my LCD projector. But I have had my eyes on the Surface Book for a while.

    And now, thanks to the MIE Expert program and the Surface Experts program ( I just received a new Surface Book. As someone who teaching computer science this means three things for me. 1) More disk space - more VS is being installed now 2) more memory (8gb) so emulators should run better for mobile development 3) a faster CPU.

    Actually the more memory means the most to me. More disk is a close second. Modern CPUs are fast enough for just about everything I do. Also the screen on the Surface Book is larger which is also a nice thing.

    As I said though memory and disk are big plusses for me. I’m not your average classroom teacher. I like to install lots of software (I’ve had as many as three versions of Visual Studio installed at once in the past) and I always want to try more things. The disk space on the Surface Pro limited me a bit. The Surface Book has twice as much disk so I have installed a bunch of Visual Studio things to play with. I may not need it all for teaching but I do for learning.

    Memory is the next big item. My Surface Pros have 4gb of RAM. I can run mobile emulators but barely and I have to be very careful about what else is running. With the Surface Book and its 8gb that problem goes away. With my computer lab being updated to 8gb systems over the summer I now have a lot more options to my Mobile Development course next year. To say nothing of my own “needs” for mobile development.

    The look of the Surface Book is nice as well. I’m not big on esthetics of computers but having a nice clean design is nice. I understand the keyboard (a very nice friendly keyboard BTW) comes off but I don’t need that very often. And I still have my Surface Pro 4 if I do.

    All in all I am very happy with it so far. It’s everything the Surface Pro is but more. Just what a computer science teacher who can’t stop trying new things needs.

    Wednesday, April 12, 2017

    Code Slow Finish Fast

    Looking through student code today brought this quote to mind.

    “I didn't have time to write a short letter, so I wrote a long one instead.” Mark Twain

    Students are always in a hurry to write the code for programming projects. No matter how strongly I suggest they think about the problem and design their code most of them start coding right away. This often results is a lot of code where a small amount of code will work just as well if not better.

    Often the techniques for less code require a bit more thought. Setting up a long set of if statements with a bunch of different variable names is tedious but doesn’t always require as much planning as setting up an array and loop solution does. Students are in a hurry so they take what they think are shortcuts.

    Experience tells of course. My version of Whack A Mole (our current programming project) can be changed from 5 possible “moles” to 6 by changing one 5 to a 6. Some of my students would have to write, well let’s just say I don’t want to do the math.  We’ll go over the options during our next class. The theme will be to think more before starting to code though.

    Tuesday, March 28, 2017

    Math vs Programming

    MathTake a look at these two equations. I found the first one on Facebook. The second is my first attempt at rewriting it for the computer. What is the answer?

    Well the first answer is 1. The second answer is 9. How is that possible? If you think about it there is a sort of implied parenthesis around 1/3. It’s pretty clear in the more traditional mathematical expression that one is to divide by one third and not 1 divided by three. imageA more accurate expression for the computer would have some parenthesis to make things obvious. That would give one the answer 1 that the traditional expression provides.

    We see this sort of thing a lot – students assuming that equations in programming are exactly the same as the mathematical expressions their are used to using.  The most common issue is students thinking that the = sign allows copies from left to right as well as right to left. After all in mathematics the = sign means that both sides of the equation have the same value. That is not the same think as the = sign meaning copy the value on the right into the location on the left.

    Some functional languages do things differently. The WeScheme IDE and DrRacket used by Bootstrap for example. That curriculum takes a much more algebra focused look at computer science. Or is that a more computer science focus approach to algebra? Either way it seems to be very effective. (Note that Bootstrap training is available though CSPdWeek and other venues.)

    Those of us using other platforms though have a lot to contend with as we teach students how to build expressions that mean what students think they mean. Is it worth the effort? I tend to think so. But it is confusing at times.  Days like to today make me rethink things.

    Computer Science Teachers Association T-shirt Campaign

    Are you a computer science education super hero? You know you are so now you need the t-shirt. Get yours here and also support the computer science teachers association. cs hero

    Just the thing to wear to the CSTA conference or really any education event. I would love to see lots of them at ISTE to let people know that CS educators are there

    Saturday, March 25, 2017

    CSPdWeek: Free Professional Development for many K-12 Teachers

    The people I talk to who went to last year;s event rave about it. If you are looking for some good professional development this is well worth looking into.

    Thanks to funding from Infosys Foundation, NSF, NCWIT, and CSTA, CSPdWeek is *on* again for next year: July 17-21st, 2017

    . CSPdWeek is a distinctive cross-curricular event that offers high-quality professional development for teachers planning to teach any of the following: 

    •       AP CS Principles
    •       AP CS A (Java)
    •       Exploring Computer Science
    •       Bootstrap

    Each of these week-long workshops will be led by leaders in the field. In addition, counselors are invited to attend half the week (2.5 days) for professional development. 

    Please share this email with anyone planning to teach computer science in K-12 during the 2017-18 academic year, as well as counselors at high schools. Extended details on each of the CSPdWeek tracks are below. Information and application materials are available at:

    Colorado School of Mines is excited to host this exceptional event.

    Thursday, March 23, 2017

    ACM and CSTA Announce Cutler-Bell Prize Student Winners

    Make no mistake I think the Cutler-Bell Prize is an outstanding award. I love that it recognizes early computer scientists (high school students!) for outstanding achievement.

    This year's winners appear (based on the names) to be computational focused magnet schools. On one hand that such schools exist is great and even exciting. On the other hand I worry about the kids who have great interest in computer science but who don't get the opportunity to spend several high school years learning the cool stuff and working on great projects. Will the publicity for this award motivate more school districts to set up more similar magnet programs? Or perhaps at least look at expanding the CS offerings they offer? I hope so.

    In the mean time I congratulate these students. It looks like they have done some serious work and I wish them great success in the future.

    ACM and the Computer Science Teachers Association (CSTA) have announced the 2016-2017 winners of the Cutler-Bell Prize in High School Computing. Three high school students were selected from among a pool of graduating high school seniors throughout the US. Eligible students applied for the award by submitting a project/artifact that engages modern technology and computer science. A panel of judges selected the recipients based on the ingenuity, complexity, relevancy and originality of their projects.

    The Cutler-Bell Prize promotes the field of computer science and empowers students to pursue computing challenges beyond the traditional classroom environment. In 2015, David Cutler and Gordon Bell established the award. Cutler is a software engineer, designer, and developer of several operating systems at Digital Equipment Corporation. Bell, an electrical engineer, is researcher emeritus at Microsoft Research.

    The winners are Elizabeth Hu, Thomas Jefferson High School for Science and Technology (Virginia); Avi Swartz, Cherry Creek High School for Computational Biology (Colorado); and Aaron Walter, Yorkville High School for Computer Science (Illinois). Their submissions ranged from using data to study refugee migration models; determining type and quantity of protein components in biological samples; and a software program that evaluates students’ understanding of curriculum components.

    Each Cutler-Bell Prize winner receives a $10,000 cash prize. This year’s recipients will be formally recognized at the Computer Science Teachers Association’s annual conference, July 8-11.

    Tuesday, March 21, 2017

    Datasets For Use in Teaching Computer Science

    I found this thanks to the APCS A mailing list. 

    CORGIS Datasets Project

    The Collection of Really Great, Interesting, Situated Datasets

    “The CORGIS Datasets Project seeks to make highly-motivating introductory computing experiences through simple, easy-to-pick-up datasets for beginners. We offer a wide range of libraries for many different programming languages and contexts. “

    I haven’t looked at the libraries yet as they are for languages (Java, Python, and Racket) that I am not currently using but I would be if I were using them. There are also raw data sets in sql, JSON, and CSV formats. I use CSV files a lot and was very please with the look of the 43 data sets in that format. I can see some interesting projects ahead for my programming classes, data analysis in Advanced Placement Computer Science Principles, and even my freshmen course where we use EXCEL.

    If you are interested in good data for real learning I recommend you take a look at

    Friday, March 17, 2017

    Hip Hip Array

    My programming courses are a semester long. That’s it. After that someone else gets to teach them more programming and computer science. A semester is not a lot of time  so we can only cover so much material. There are days when I really envy my friends who have students for years as in 2, 3, or even 4 year long courses. On the other hand I am finding that I am appreciating the basics more and more all the time.

    Take arrays for example. I’ve been around long enough and coded enough that I understand arrays pretty well. I’ve done the who pointer arithmetic thing in C. And the use of offsets in assembly language programming. So I understand what is behind arrays in ways I don’t have near enough time to explain to my students. I think this understanding gives me a greater appreciation for this tool in my toolbox. I literally spent an hour or so last night just contemplating the beauty and power of a simple array. Add to that the power of arrays of objects and mind blown.

    OK maybe I get excited easily. On the other hand in many ways writing code seems as new and cool to me as it did when I tool my first programming course over 40 years ago. If anything I am developing new appreciation for the simple less complicated elements of programming languages.  One doesn’t need all the latest and greatest bells and whistles of languages and libraries to have fun writing code.

    Though that doesn’t mean I am giving up features like Array.Sort. I’m not totally crazy.

    Monday, March 13, 2017

    March Madness and Programming Projects

    Yesterday was selection Sunday and the NCAA announced the teams entering the 2017 basketball championships. So of course I thought about programming projects. I mean there is data and something a lot of my students are interested in so it is a natural. Now there are already all sorts of automated bracket generating tools on the Internet. LOTS of them. But being me I needed my own.

    The first thing I did was build a data file. (NCAA 2017 seeding information) That link gets the comma separated data file. It looks in part like this:


    It’s pretty basic with the seeding number, the university name and for most of them their record. Once I had that I could write a program to read in the data and display it. My next step was to write code to semi randomly (its weighted by seeding) pick which team went to each next step of the competition. I get graphic so I generated the following:


    I’m thinking I could let students do something more simple in output. I did this with parallel arrays but I can see creating a class making some things easier. In any case I get to p[lay with reading and parsing data, building and processing arrays, and other data manipulation. There are many variations I could do here.

    Students could create their own schemes for generating brackets. Or they could write code that lets the user select which teams would advance. I’m open to other suggestions as well. What sort of project would you assign with this data?

    Sunday, March 12, 2017

    Conferences for K-12 Computer Science Educators

    If you are a K-12 teacher looking for conferences about using technology in education there are many conferences one can go to. If you are a post secondary school computer science educator there are a good number of conferences you can go to. If you are a K-12 computer science teacher you have fewer options. Sure you can go to the higher ed conferences and look for things applicable. And you can go to tech education conferences and hope for some good CS education content. But if you really want conferences with a lot of value for you in particular there are fewer options. I’m going to go over a few I like.

    CSTA ConferenceThe CSTA Annual Conference is of course your number one event. Workshops, concurrent sessions, networking with CS educators from all over – this conference has it all for K-12 CS educators. It’s my all time favorite. And it is growing in sessions and attendees every year. And it is during the summer so you don’t have to miss school to attend. You should be there.

    The Amazing SIGCSE 2017 Logo, in blueish and greenish.SIGCSE is my number two choice. Sure it looks like it is for higher education people but there is also a lot for K-12 people. The sessions on how to teach work for all levels. The chance to talk to great educators is a big plus as well. Friday has a lot of special sessions and events for K12 people My big problem is that it is during the school year. With snow days like we have here in New Hampshire I feel bad about skipping school to go.

    isteISTE I really like ISTE. While it is really about using technology in education I have been seeing more and more computer science content in recent years. Plus it attracts a lot of people who see themselves as teachers of some other subject first and computer science second. So you get to meet some people who teach CS but who don’t go to CSTA or SIGCSE. A bunch of big computer companies exhibit here so I spend some time visiting with them. I get to ask some good questions and learn stuff which makes it worth while.

    imageTCEA is also a big conference about using tech in education but Texas has a lot of computer science education and that makes TCEA stand out for me. Like ISTE, TCEA has a lot of teachers who are not full time CS teachers. There are also more CS sessions than a lot of other ed tech conferences and with its size there are a lot of networking opportunities.

    HomeA year ago I would not have brought up SxSWEdu (South by Southwest EDU)  SxSWEdu has a reputation of being for and about tech companies and startups trying to sell tech to teachers. This year that was a lot of computer science education content. It may be too early to see if this continues but I hope it does.

    Other than SXSWEdu I’m been to all of these multiple times. I’ve learned a lot from these conferences over the years. I’d love to hear other people’s opinions both about these conferences and others I might have missed. Where do you go for K-12 CS learning?

    Friday, March 10, 2017

    What’s New in C# 7.0 for Beginning Programmers

    Well it looks like Visual Studio 2017 is out. I've installed the community edition on my Surface (not enough disk for everything I'd like :-( ) but enough to try some things out. I found this awesome blog post on what is new with C# 7. I wonder if there is one coming for Visual Basic?
    As usual, many, perhaps most, of the improvements are exciting to professional developers or more advanced students. I teach raw beginners and I don’t have near enough time to cover as much as I would like. But there are a couple of new things in C# 7 that I think I will use with my students.
    The improvements in out variables will be useful for example. I use TryParse with my students a lot and being able to declare the variable inside the TryParse will save a step and prevent some errors. Maybe create others but that is ok.
    C# 7.0 allows _ to occur as a digit separator inside number literals now. This is cool. Especially with binary literals. This may let me do some additional cool stuff with Binary flag bits and maybe make parsing some numbers easier or more interesting.
    Well that is a first look from me. I’m still playing with things and hope to have some insights into what is new with Visual Basic and Visual Studio the IDE soon. IN the mean time, what is everyone else finding interesting?

    Tuesday, March 07, 2017

    Infosys Foundation USA Asks Why Do You Make #WhyIMake

    Thanks to a Facebook link I found a video interview created by Infosys Foundation USA. on why he “makes.” This lead to one with Adam Savage of mythbuster fame on the same topic.Infosys Foundation USA. is asking other people to share why they make using the #WhyIMake hashtag. So I’ve giving it a go.

    I’ve always like making things. As a kid I made push carts and push cars using wheels of all sorts. Mostly stuff we found discarded along the streets. Later we found bamboo poles that carpet had been rolled around for delivery and made interesting things like pole vault pits. Amazing we didn’t kill ourselves.

    As I got older making became somewhat more practical. Installing shelving in closets, building decks and docks, and other things we used to just call do it yourself work around the house. I think of it as making though. It’s one thing to install pre-fabricated materials and something more (better? Maybe. Different? for sure) to take and repurpose things in ways they were not originally created to use.

    Much of the making I do though is around software. It’s a blast to make some new creative program to do something interesting. Sometimes even useful.  I’ve made games to play, demos to show and teach concepts, and just to solve small specific and perhaps just personal problems.  Sometimes there are existing tools to do the job. The other CS teacher at my school has written programs to randomly call on students for example. I wrote my own. Not because his was bad or inadequate but because I had my own vision that was slightly different. And because the exercise of creation was just plain fun.

    That gets to the heart of it. Making someone of my onw design is not always the easiest thing to do. And it is not always the most cost effective. Pretty often though it is the most fun.  Making things is fun. And while making can be educational and sometimes it can save you time and money most of the time being fun is reason enough.

    Monday, March 06, 2017

    Bit Rot or How do I read this data?

    Last night I had a very weird dream. In it I was trying to recover the programs I wrote in college. I have saved most of them. Well in a manner of speaking. Some of them are on punch cards. Yes, I have 40+ year old punch cards in the attic. I can read them as they have the letters typed along the top. And I could probably figure out the hole punches if it came to that. On the other hand, more of my programs were saved on a DECtape. That was the subject of my dream FWIW.

    Image result for dectapeWhat? You don’t know about DECtape? It was a proprietary magnetic tape for storing data. A powerful and reliable tool in its day. These days machines that can read one exist for the most part in museums and the occasional Canadian Nuclear power plant. Since I have access to neither getting the data off of my old tape seems unlikely.

    This is a problem most of us do not pay much attention to. We think short term as in now or a few years. And yet time after time we have seen storage types become obsolete leaving access to the information stored on them inaccessible. Even when devices are still available often the media deteriorates. I’ve read a lot about Disc Rot as older CDs and other optical media are starting to stored deteriorate.

    This is not a new problem. There are many ancient documents (word used loosely) that are difficult if not impossible to read because the language has been lost. We don’t know how many things were done in ancient times because the information was lost. Just look at all the theories and questions about how the Egyptian pyramids would built for example.

    Some people do worry about this. I have heard that Apple, for example, has a vault with older computer hardware stored in case it is some day needed. And smart CIOs have plans to move data to newer data storage devices as they become commonly used.  I suspect though that most regular people don’t give it a second thought. We just assume that all our data will always be there.

    If we’re careful maybe it will be. I typically move all the data from an old machine to a new one when I get one. Or I store the important stuff in “the cloud” assuming that someone else is keeping it safe and current. Over the years I have moved data from tapes to disks to CDs to USB drives to the cloud. Have I kept it all? Probably not. Without a good plan losing things is inevitable. Somehow I lost those student written programs of the 1970s. But I like to think I have kept the most important things. I’m thinking though that I need to talk about this with my students. If I don’t make them think about it will they see the problem on their own? Will they see it in time to do things about it?

    Now if only I could get to that DECtape and see how bad the code I wrote as a student is.

    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

    Level 1B – Grade Levels 3-5

    Level 2 – Grade Levels 6-8

    Level 3A – Grade Levels 9-10

    Level 3B – Grade Level 11-12

    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 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.

    Sunday, January 01, 2017

    Computer Science Education Things I’m Watching in 2017

    What is going to be big in 2017? It’s always hard to tell but there are several things I think I need to keep an eye on this year. (Note: Last year’s things to watch is here.) Some of the things are repeats from last year. They are still developing. Others are things I’ve seem more of last year with indications that they are moving forward. What will you be watching this year?

    Computer Science for Everyone - This moved along very well in 2016 with huge support from the White House. Will the new president be supportive? I don’t think anyone knows. Fortunately there is a lot of movement in the states and Congress seems to see CS education as a bipartisan issue. I am hopeful that progress will continue but it is something those of how care about need to be active in making happen.

    Advanced Placement Computer Science Principles – This really took off in 2016. What I am most interested in seeing is how well the various big name curricula do in terms of test results. The other thing I am watching for is teachers who get really innovative on their own in teaching this course. I’ll probably be teaching it for the first time in the fall of 2017 so I’m hard at work figuring out how I will teach it. Lots to watch.

    Expanding CS Education Before High School – I’m seeing more and more interest in K-8 computer science. has been instrumental in promoting this with training and curriculum materials. Bootstrap has been growing in middle school (BTW if I were a middle school principal or math teacher I would really be looking at Bootstrap – seriously – math and computing is a way that works and is fun? ) The #CSk8 twitter chat is growing by leaps and bounds. All of the new state standards are looking at K-8 as well as high school.  We’re on a roll here. I can’t wait to see how it continues to develop in 2017.

    Making and CS – I have been trying to figure out how to categorize this topic. Initially I was going to call it Internet of Things. IoT for short. That was a big surprise this year. Several professional development events I attended had session labeled Internet of Things. They were all over subscribed. What is IoT? That definition seems to be fuzzy. I tend to think of it as smart devices that are  internet connected. Things like the web enabled cameras I use to keep an eye on my family’s vacation home. They are smart enough to let me know when they see people rather than just motion. Or programmable thermostats like Nest sells.

    What I am seeing at workshops makes me think more of what I associate with Makerspaces though. Smart devices but not necessarily internet connected.

    How ever you see IoT I see a lot of interest in using or making smart devices. People are interested in programming things other than pixels on a screen. And they don’t just mean robots, though those are still popular.

    So I think we’ll see people taking advantage of cheap computers, simple sensors, and basic communication tools to make and program interesting things. I’m not sure how much this will penetrate the school day though. So far a lot of the activity seems to be afternoon and weekend “extra” programs and special events. I can see this fitting into AP CS Principles for one thing. And it has the potential for cross curricula projects. I’d love to see CS classes build things for science classes for example.

    All in all I see great potential for making computing more interesting to new groups of students.

    So what are you expecting to see and learn in 2017?