Arrays in Middle School #csk8

How do you give instructions to pull a random book off a shelf? Or to sort all of your books in alphabetical order? Or to remove the books off your shelf that were written before 1960 and order the rest by date? Or figure out the average length or Lexile level of all the books you have on the shelf?
If you have ever considered problems like these, a computer program can help you and you need to use data structures.

In Computer Science, since I started the semester right away with coding AND I have a very sharp class this semester, we have actually gotten to data structures – the kids are learning about arrays. I mostly learned about arrays in college, so teaching it to middle schoolers is still something I’m new at. I am spreading the instruction out over about a week and a half.

I started by addressing the need for arrays, by having the kids modify a little fortune-teller. The starter code is here.

Fortune Teller Starter

The fortune teller uses three variables to store different fortunes, and then picks a random number. Then it uses a series of if/else statements to choose which fortune is displayed. Pretty simple. I asked the kids to add a new fortune to it and tell me in how many places they had to change the code. The kids did, and the consensus was that it needed three changes: add a new variable, modify the random number generator, and add one more else/if clause.

So then I led them through a short explanations of arrays. You have one variable and it contains an indexed list of data instead of just one data item. The first item is always item 0, then item 1 and so on. This indexed list is called an array. It’s like the arrays they worked with in math class to multiply. You can make arrays that are two-dimensional or more, but this one is just one-dimensional for the list of fortunes.

We modify the program so it looks like this.

Array Fortune Teller

I asked the kids if they would prefer me to go over the instructions live or let them watch a video. Almost the whole class preferred live instruction, which surprised me. I made this nice instructional video but then didn’t use it.

Instructional video: Using an array in the fortune teller

With the new code, adding a new item to the list of fortunes requires only one change to one line of code. Much simpler to make changes! But a little trickier to code.

In the next lesson, we look at how to use a loop with an array to do something simple, like print the contents of an array to the screen. This is also a mainly teacher-led demo, but I did make a nice instructional video that again I didn’t use.

I start with this code:

Print an Array Starter

And then I had this video, which we didn’t use:

Video for looping to print an array

I feel that when you start getting into data structures, that’s where interesting algorithmic work with computers really starts. I decided to have the kids do a little algorithmic role-play to see how they would make a computer work with an array.

I lined up a row of kids at the front of the board and told them to all write down a number on a card, but keep the number hidden.

An array of data, starting from index 0. Can you write instructions for a robot to find the largest number?

An array of data, starting from index 0. Can you write instructions for a robot to find the largest number?

Then I asked the rest of the class to write a set of instructions that a robot could use to figure out the biggest number on a student’s card.  The kids asked “can’t you just write an instruction to have everyone flip their number over and see which one is the biggest?” I said no, robots really need things written step by step, so start with which kid I should walk to first, and what I should ask them and so on.

I knew I’d have some kids that would absolutely fly with it, and I also knew I’d have some that would have trouble with this concept. I did. However in the discussion, a basic understanding of the algorithm came out:

  1. Look at the first number.

2. Remember it.

3. Look at the next number.

4. Compare this number to the one you remember. If it’s bigger, then throw away the number you are currently remembering and remember this one instead.

5. Repeat steps 3 and 4 until you run out of numbers. The number you’re remembering is the biggest.

Arrays are hard, in which the array itself has a variable name, and then the index in the array can be referenced by another variable.

int p = 2;

This use of a variable is pretty straightforward and only takes a little practice to understand. Kids have been using variables since 5th grade in math class, so they have some background with it.

int [] p = {9, 72, 40, 12, 35, 99, 33};

This is more difficult as the whole array is named “p” and your algorithms require that you reference each number with “p” and its index. But so powerful. You can manage really complicated math once you have a basic understanding of data structures.

Anyway. We coded the “find the biggest number” problem by using a sample program, below.


int [] nums = {12, 59, 2, 63, 400, 88};
void setup() 
  int num_i_remember; 
  num_i_remember = nums[0];
  for(int i = 0; i < nums.length; i++) 
    if(nums[i] > num_i_remember) 
      num_i_remember = nums[i]; 
  println("the largest value is " + num_i_remember); 


The challenge I gave to the kids was to write a teacher tool. Sometimes, teachers have to do creative things with their data. For example, I gave 11 quizzes during a semester. Students convinced me to drop the lowest score and average the other 10.

The pair programming task: given an array of 11 quiz scores, find the lowest score, drop it and average the other 10, then tell me the average.

The kids did a really awesome job and only a couple of pairs got stuck and needed a lot of support. The most common solution was the one like Anoushka’s, below. She modified the code that found the largest number so it found the smallest instead. Then she averaged the rest of the numbers using brute force, but with only 10 numbers it worked just fine.

Anoushka’s Teacher Tool

Some students were able to get how to iterate through the array to find the total, subtract the lowest score, and divide by how many numbers there were. Maya’s solution works no matter how many quizzes I give during the semester.

Maya’s Teacher Tool


What’s next? I think we will do some unplugged activities to refresh / review, and then make a project that brings arrays to life by storing information useful to teenagers – like the locations of sprites in a video game! I think we’ll work on an animation with a bunch of images that have x and y coordinates stored in an array. Maybe we’ll think of different structures for the data (one array storing both x and y coordinates? 2 arrays? Dare I introduce multi-dimensional arrays?). Then after that… a mini-project, a little game or interactive animation including all of the things we’ve done so far. Processing is so colorful and interesting, I want to see what the kids can make with it.




Review/Extension Activities for Looping and Conditionals

More than once I’ve finished or half-finished a lesson knowing that some kids understood most of it, some really didn’t get it at all and I didn’t get enough information during class to really understand where I should go with things the next day. If you back up and review, you bore the kids who understood already and run the risk of teaching the same ineffective way you did the previous day. If you plow ahead, you will really lose the students who were barely understanding the day before.

In this situation, I sometimes do a code-analysis card sort.  I write a handful of code snippets and produce output from them. Mix up the code and outputs, partner up the students and ask them to match code to output. It takes less than 10 minutes, and then you have a whole-class discussion where you ask groups to report out. What’s a match you feel confident about and why?  What is a match that gave you trouble and why?

Here are a couple of my card-sorts from this year’s CS Exploration course, in which I have been teaching Processing.

Function Match:

example card from the function card sort.

example card from the function card sort.

In this card sort, there are four function definitions, four function calls, and four descriptions.  The students’ job is to match a definition to a call to a description. Before making copies, I put a letter (A,B,C,or D) on each function defintion, a number (1234) on each call, and a symbol on each description.

The card sort is really simple because each function has a different number of parameters. If a student can recognize that the definition with three parameters matches the call with three parameters, they can do the sort. But it creates good discussion when you talk about why the matches work, what the parameters mean, and how we know the descriptions match the definition and call.

I also created a Function Kahoot! quiz to do before or after.


Next I have a card sort on looping. It only focuses on While loops. The task is to match the code with the output.


The cards are here:

Again before I make copies, I label the code with letters and the outputs with numbers to make it easy to report out what matches the students made.

The discussion on this sort usually hits on two ideas. Is the x-coordinate or y-coordinate changing, and how do you know? How do you know how many times the loop will run? Good tie in with some linear algebra here – the starting value has some connection to y-intercept and the increment each time has a connection to slope or rate if you choose to go there. There is one card that will freeze the program because it gets stuck in an infinite loop, and it’s an important one to discuss as I always have students that take some time to understand the idea of the infinite loop.


I also have a Kahoot! quiz on variables and expressions, without loops/conditionals or anything like that. Might be a good review activity.

I’m working on adapting some of my older Kahoot! quizzes from the Khan Academy Processing JS to the stand-alone Processing, but here they are if you are interested in the Khan version.

Khan Kahoot! on conditionals and booleans:


I had this one to quiz students on the draw() loop and how it affects variables. I don’t think I’ll adapt it for Processing but it might be useful to someone.



What are some of your ideas for differentiation, discussion, extension and review?


Teaching event-based programming – a traffic light

Recently as I was looking through my blogroll, I read Mark Guzdial’s review of the Framework. I wished I had been able to review the framework with a group – I didn’t feel that I generated great ideas about it on my own, but I did like reading Mark’s. Reading my social media feed sometimes impacts what I’m going to teach. In this case, Mark made a point about models of computing:

Great research by people like John Pane at CMU has shown that novices think of programs as responding to events, being reactive (e.g., think apps, games, GUI interfaces). Thinking of computing as input-processing-output is an older model, difficult to understand, and less common today.


Huh. I had been teaching programming as input –> do stuff –> output and wondering to myself what to do when this model broke down. I never really thought about how I teach event-based programming differently. I decided I would give it a try, though. In my 7th-8th grade CS class, my kids had learned about variables, conditionals, and functions. Normally I would plow right into iteration but I decided to take a detour and do some activities with the kids on event-based programming. We did a couple of examples working in Processing with draw() and mouseClicked() and keyPressed(). I decided to introduce an activity involving a state machine to teach the difference between linear programming and event-based programming.

I talked with the kids about how many of us think a traffic light works. We see it as a linear set of steps.



But in reality, we know the traffic light has a set of sensors. And when a sensor is tripped and other conditions are met, then the traffic light advances to the next state. You can model the state with a variable. In this case, I used “lc” for light color. We can model the sensors with button clicks and key presses.


We wrote this program together, imagining that the mouse click simulates a timer expiring, and the space bar simulates the sensor that detects your car. I did this as a teacher-led launch. Kids followed along and ran their programs. Easy.


The kids asked about how you simulate a real timer. In Processing, there isn’t an easy implementation of a “delay” function, so you have to poll for a timer. There is a built-in function millis() that returns the number of milliseconds since the program had started. The kids played with the millis() function and had fun writing the time to the screen. So for the next class, I decided a program that used timers would be a good extension and problem-solving activity.

In the second class, we looked at this state machine model.


My amateurish drawing shows looping arrows where you are polling the timer. As long as the “ready” variable, for example, is 0, then the light stays the same. As soon as the “ready” variable changes to 1, then you can advance to the next state. You can check for “ready” by doing some math on variables that store the value of millis(). One variable stores millis() over and over again. Another variable only stores millis() when the state has just changed.

I put the kids with a partner and made this a pair programming assignment.  We reviewed the norms of pair programming. I gave them a starter program that just showed a red screen and used the millis() function to display the elapsed time. I had some variables in the program but did not tell the kids how to use them. Their task was: turn the program into a timed traffic light. It should turn the red light on for a certain time, then the green light for a longer time, then the yellow light for a very short time, and then go back to red.

This is the starter program.

// 0 is red, 1 is yellow, 2 is green 
int lc = 0; 
int ready = 0; 
int oldms; 
int newms; 
int elapsedms; 
int interval; 

void setup() 
  ready = 0; 
  oldms = millis();
  newms = millis(); 
  elapsedms = newms - oldms; 
  interval = 5000; 
void draw() 
  if(lc == 0) 
  else if(lc == 1) 
  else if(lc == 2) 
  newms = millis(); 
  elapsedms = newms - oldms; 
  text(elapsedms, 150,150); 

The kids split into pairs and started working. After a while, a few groups were close – they could check for a certain elapsed time and then change the light’s state variable so it switched colors. They didn’t know how to reset the timer, so after about 20-30 minutes, most of the kids could change red-green-yellow and then didn’t know how to get back to red.

So I did a catch-and-release where we talked about the polling loop.  I showed boxes that represented the values of “oldms”, “newms”, and “elapsedms” each time through the draw() function. Some kids figured out on their own that the way to reset the timer is by assigning “oldms” to millis() when you change the light’s color. Others figured out different solutions  and it was interesting to see what they came up with.

The activity took most kids until the end of the class. On the third class, I asked all of the pairs to copy and paste their programs into OneNote. I then called up several groups to do a walkthrough of their solution. They did a really good job presenting. I like OneNote for this kind of sharing because the rest of the class could copy the code and run it to understand what the presenting group did.

Here are some of the solutions! I liked how each group approached it a little differently. Some used my variables and some made up their own. Some used nested “if” statements and some used complicated boolean expressions. Some reset the timer after each state change and some waited until after a complete cycle of the traffic light.

Luke and Andrew’s Method

Anna and Kay’s method

Ryan and Parker’s method

I enjoy seeing the students have their lightbulb moments, and it’s also fun to have the overachieving students that can’t resist being a little creative with their programs.

Maya’s Traffic Light

Ben and Anthony’s Traffic Light with car (it stops on red, goes on green, and speeds up on yellow)

I liked this workshop model with the teacher-led launch, the worktime in pairs, and then the student-presented summary. I think it was a good problem-solving activity for the kids, and for me it was a nice departure from the input-stuff-output model of programming.




National Summit on Teacher Leadership #2016NSTL

I had the privilege of attending the National Summit on Teacher Leadership in Washington, DC over the weekend of February 5-6. This summit involved the Department of Education, the Council of Chief State School Officers, the National Education Association, and the American Federation of Teachers. It was an awesome accomplishment in itself to get representatives from the four groups in the room at the same time. The purpose of a summit is to generate ideas. I was selected to be a teacher-leader representative from the NEA and had three peers from each of the other three organizations: Jeff representing the CCSSO, Kiragu representing the AFT, Karuna representing the Department of Education. Here we are with Dr. Andy Hargreaves, a researcher in leadership and teacher leadership programs. He’s the author of the book Uplifting Leadership.

Jeff, Kiragu, Dr. Hargreaves, Karuna, and me.

Jeff, Kiragu, Dr. Hargreaves, Karuna, and me.

Teams from over 20 states, plus the Department of Defense school system, attended the summit. We sat at a large table and brainstormed around questions having to do with leadership and the teaching profession. Each of the teacher-leaders moderated a session. Each session had a central question. My job, and the job of the other teacher-leaders, was to help guide the discussion, keep it on topic and on time, allow everyone a voice, and keep the discussion solution-focused.

The leaders of the four partner organizations were present and participated in the discussions. It was exciting and so important to hear all of our leadership on the same page. I also got a small collection of celebrity photos. I missed getting a picture with Chris Minnich who was there also.

The discussion started slowly and conservatively at first. We later became more passionate, sometimes emotional, sometimes solution-focused, sometimes preachy. We touched on many different themes around teacher-leadership and I felt we covered an awful lot of ground.

I would like to share a few stories from the summit.

One of my fellow moderators is an incredible and dedicated teacher from West Baltimore. His students can’t drink the water in their school building. They don’t have heat consistently. Computers, robots, musical theater, speech and debate, and science bowl teams are laughably inaccessible. Remember the riots in Baltimore last year? Teenagers smashed a police car. Students from a school with no drinkable water, no heat, no certified math teacher, 50% turnover of teachers every year, poor access to computers and modern learning tools. The national guard was sent in to deal with the rioters. Imagine knowing the government has the money to send in the military to deal with your students… but somehow, no money for drinkable water.

One participant gets her students involved in community service projects, engaging the community in dialogue about race and equity, looking for ways to help their neighbors. She knows well that her students won’t make the top test scores. She hopes to have them measured by different success measures. If your kids are engaged in real-life projects, searching for problems in their community and actively solving them and communicating about it – if they are kind to each other and productive and informed – have you done a good job?

Another participant helped me understand the world of professional development a little better. As she talked about the best professional development she ever had – in her case, it involved a book study, a conference, an EdCamp, and then a presentation she designed and presented to fellow teacher-learners – I realized that the path to teacher leadership can’t involve canned professional development or standardized metrics. You will realize the potential of leadership if your learning is personalized, designed by you, and where the success metrics are matched to your goals. I wonder how we achieve this for everyone in our profession.

I made a little slide show about the major themes from the weekend. If you look at the whole picture, I think an action plan starts to become clear. But it has to match your needs and your students’ needs. What will you do at your school?

National Summit on Teacher Leadership

Creativity and the Coordinate Plane

I’ve been teaching a 7th and 8th grade Computer Science Exploration class, going on my fourth semester now. As I always do, I am changing some things up this time. Starting with coding and then will dive into data and the internet and web design later.  In the past I’ve taken the plunge into coding once we’ve gotten background knowledge on data and information – because that’s how I learned it.

I am using Processing as the text-based language of choice this year. In the past, my first assignment was a problem-solving one in which kids had to make geometric shapes that I chose. I wanted to closely tie the learning in with math. However, since then, I came across this series of articles by and about Mitch Resnick: one of the creators of Scratch from the MIT Media Lab. He writes about the power of creative coding, here.  He also muses on the Hour of Code event, which I love but he makes some good points about. The power of computing is sometimes that you can use it to solve a specific puzzle… but often that you use it as a form of creative expression and open-ended modeling. Often you learn the things you want to learn because you are so driven to complete a project of your own design.

So for the kids’ first project this year, I put together a OneNote notebook summarizing some of the basic 2-D drawing functions in Processing. I also gave them this nice coordinate plane handout from Khan Academy.  We used it to do a few warmup exercises – for example, I would put some lines of code on the board, and they would draw what they thought it would look like and hold up their papers.

Then their assignment was “you’re going to create a free draw. You can make a character, a scene, or pixel art. Use at least three colors and five shapes. It should look like a purposeful drawing and not just random scribbles. I look forward to seeing what you make.”  It was very open. I didn’t have a specific problem in mind the students would solve. They would have to invent their own problems, and I ended up really liking the activity for that.

One student created multiple stars in different shades of blues and purples, and she had to make the same diamond shape but translated to different locations. She was determined to get it right and I heard her say “no, that’s not right” and redo her stars multiple times. She added a shooting star for effect.


Many students made pixel art and I enjoyed watching their different approaches. This student created pixel art by drawing lots and lots of squares with a thin black border around them.


Another student chose to do pixel art, but differently. Instead of drawing each square as a separate shape, he looked for bounded colored regions and used the beginShape() and endShape() functions, adding vertices.


Both students above had the issue of figuring out how big a pixel is, scaling their entire canvas and scaling and translating each pixel. They made it look easy!

I have a few students that enjoy “hacking” much more than they do planning and programming and so the activity was very different for them. For most students, this was an exercise in planning, mathematics, and attention to detail. For the hackers, they liked looking up something that was already done online and then modifying it and learning from it. One of these students found this program online.

A basic smiley face, curated from:

A basic smiley face, curated from:

He first downloaded the code, ran it and shouted “See! I’m done!” so of course you have a discussion about that and about how you can’t just turn in someone else’s work as your own. But I enjoyed seeing where he took the code from that point.
Student: Well, can I turn the smile upside down and add horns?
Me: Sure. I suspect the bezier function is the smile.
Student: Well how do I turn it upside down?
Me: These eight parameters are (x,y) coordinate pairs. You could plan it out on your graph paper, figure out what points would make the curve into a frown and then try those.
Student: Or…. I could do trial and error.
Me: I would plan it out and……
Student: Haha!! TRIAL AND ERROR!
Me: okay then.

So he did, and ended up making a very nice frowny face with horns. It became clear to me that his form of “trial and error” was in fact a great deal of pattern-seeking and mental math. Are planning and attention to detail valuable skills? Indeed. Are they his strengths? No, and he could get the job done well with the strengths that he had. Did he learn about the coordinate plane and color theory? Yes, I think he did. Maybe it’s ok to allow a kid to learn something new through their current strong skill set rather than the one they struggle with. This same student observed “In math class we use a different coordinate plane. This is really hard!” And I believe that code-switching is good for your brain.

Regardless of their approaches, the kids were really self-motivated to make a nice looking drawing. They owned the problems they were trying to solve. They got instant feedback, by running the program, on whether they solved their own problems correctly. Not everyone’s problems were of the same difficulty or even in the same domain. Many kids might have learned different things from what I intended them to learn. But did every kid learn? Yes, I really think so. Now I wish I knew how to put that magic into every assignment.

Arduino Final Projects by Middle Schoolers

This was my 3rd semester teaching an Electronics class for 7th and 8th graders, and I’m learning more and more every time I teach it.  In this class, I want students to learn the basics of electricity, circuits, and programming – and I also want them to learn a maker mindset. How to invent, remix, tinker, recover from setbacks, persist through difficulties, use your resources, collaborate with others. How to teach yourself what you need to know. How to present your project to others so they can build on it and make it even better.

I use some formal lessons, but this class is not as structured as a programming or computer science class. For the most part, students are given resources and inquiry questions, and they use the resources to teach themselves what they need to know. Everyone starts in a different place. Everyone has different needs. I want them to create something challenging that they’re proud of – a launching point for future exploration and learning in the world of invention.

I love the projects the kids made! Many made interactive holiday displays, and I got a great variety of others including videogame-themed projects, an LED cube, games, and even a car.  I created a simple Google Sites page to showcase their work.



I also have some reflections on the semester and the class in general. The learning is just as good for me as it is for the kids.

  • Purposeful learning: I believe in giving the students a good foundation in circuits such as understanding measurements and parallel and series circuits. However, students report to me that they find the beginning of the class “boring” and I don’t think I connect it well to the Arduino projects later. I’ve been involved with a project called Engineering Brightness, spearheaded by Tracey Winey, our media specialist, and John Howe, our assistant principal. It’s part extracurricular and part co-curricular, where students build lanterns in our school’s makerspace to send to third-world countries. My kids get involved with the EB program through soldering lessons, field trips, and guest talks and Skype sessions, but it has not been fully interwoven into the class up to this point. Tracey and I have been planning to co-teach this coming semester – we’ll use the EB project to teach basic circuitry and the innovator’s mindset, and infuse cultural/global awareness into Electronics class. I’m really excited about making this partnership stronger. The kids will understand the circuitry much better with this style of learning. Imagine learning about serial and parallel circuits, volts and amps by designing your own lantern for other people. They will love what they’re doing and find it more purposeful. There’s a good body of research that shows this is how to draw girls into engineering, too.
  • Open-source culture: The open nature of Arduino is what makes the platform so beautiful to work with. I have encouraged students to remix found projects and to share their work, but haven’t really tapped into the community to make their sharing more real. One thought I have here is that there is a style of communication that comes with sharing projects. Look at good projects you find on, or, or youtube or any of the Arduino sharing sites. Look at some that are not as well done. There’s a structure and a style that makes your project accessible, interesting, replicable, and fun. Kids in the modern world need to learn to communicate in the medium that best suits their work, to code-switch and adapt their style as needed. I wonder how to teach open-source sharing and communication to middle schoolers. I would love to make the writing and video editing and photography and commenting a really key part of the class, as I’m not satisfied with the work I’m getting at the moment. It would be so important for the Engineering Brightness part of the curriculum as well as the Arduino part.
  • Appropriate level of challenge: I ran into challenges you always run into with a project-based class. Some students got in over their head and tried to do too much. Some kids who were perfectly capable of finding answers on their own raised their hands many times each class and waited for me to help them. Some finished early with a half-baked project that didn’t meet requirements but did not want to challenge themselves further. Work was shared unevenly between partners. Some finished early and asked me what they should do for the next three class periods. Some pushed the deadline right up until the last minute of the last day of class. Some did not understand how to read rubrics or project guidelines. I expect all of these challenges each semester, and sometimes I do a good job working with these situations, but not always. I continue to look for good structures for project-based learning. It’s really hard with one of me. This may be a great opportunity for me and my teaching partner next semester to put some good practices in place for the kids.


Computer Science Education Week at Preston

I’m late blogging about this because our days were so busy with CS Ed Week! I owe a huge debt of gratitude to my partner in crime, Tracey Winey (Twitter: @premediawine) , who listened very nicely when I said “I have some ideas about Computer Science Education Week I’d like to brainstorm with someone”, and she agreed to dive right in and plan a bunch of activities with me. She’s an outstanding organizer and is becoming a darn strong engineer as well, so the world better watch out.

We arranged for teachers to do an Hour of Code with their students over the course of the week, in their regular classes. Many students are doing multiple Hours of Code and they love it. The three activities garnering the most positive feedback from students are the Minecraft Hour of Code on, the Anna and Elsa Hour of Code on, and the BitsBox Hour of Code (which actually lets you download your apps to your mobile device!). I love how the Hour of Code makes coding accessible and fun for every student. Tracey and I wanted to infuse coding into a little bit of a cultural celebration at school. We envision that students should not see coding as a niche activity for a geeky few, but as a normal problem-solving tool that everyone uses.

We set up some open houses in the media center and scheduled students to come to them and take tours. We arranged for current CS and Electronics students to be tour guides and take their friends around different “exhibits” having to do with computer science. Tracey managed the open houses as I had classes to teach during most of them. We had:

Interactive Code, Art, and old Video Games on Monday:

That is PONG, people.

That is PONG, people.

Arduino Day on Tuesday:

Experimenting with a reaction-time game and a pac-man simulator on Arduino.

Experimenting with a reaction-time game and a pac-man simulator on Arduino.

Robot day on Wednesday:

Students love NAO robots and Lego EV3 Robots.

Students love NAO robots and Lego EV3 Robots.

Minecraft day on Thursday:

An Hour of Code with Minecraft Turtles in the lab. Very popular workshop.

An Hour of Code with Minecraft Turtles in the lab. Very popular workshop.

On Friday, we had our first annual Preston Middle School Code-a-Thon. I blogged about how we envisioned it working previously.  We were able to accept almost 80 kids, and it came down to 11 beginner teams and 8 advanced teams. The beginner participants were mostly girls, and the advanced groups were half girls. It was busy but a lot of fun.

We recruited some adult volunteers from the community… some Preston parents who are engineers, along with some engineer friends and retired teachers, and a staff member from the Larimer Humane Society. We had four judges and eight technical mentors, and we divided them up to work with beginners or the advanced teams.

Tracey and I gave a presentation about the code-a-thon. We talked about how code-a-thons are also called hackathons, and they are engines of innovation. Google is famous for its hackathons, and hackathons usually have a theme – Virtual Reality, Rural Life, and Social Services are a few. Sometimes, employees even stay overnight and bring their sleeping bags, and code through the weekend to come up with their solution. Everyone presents at the end. We presented the theme:
Animal Welfare!  The kids were very excited. We showed this quick YouTube clip to get the students thinking about different problems they could solve related to animal welfare.

The kids started by brainstorming, and Tracey set them up all over the media center with SMART boards, regular whiteboards, a SMART table, a Kapp, butcher paper, desktop computers and laptops. The kids had to choose a problem or a need to address, and what language they would code in. I had set up some group accounts on Khan Academy, Open Processing, and Scratch. One group of students chose to use MIT App Inventor, one chose BitsBox, and three groups decided to create coding solutions using the NAO humanoid robot.  We offered snacks every hour, and had the kids turn their programs in using Google Classroom. They worked from 8:15 until 11:15, and then they gave presentations to the judges. We saw programs on animal abuse, factory farming, saving penguins, catching poachers, endangered animals, quite a few perfect-pet quizzes, a vet program, and a robot dog trainer. While the judges were deliberating, our Humane Society volunteer gave a presentation about what they do and how they help animals in the community. Finally, the judges returned and we gave out top-four prizes in each category.

It was awesome. The kids who gave us feedback said they loved coding something that had a purpose to it. That they really enjoyed having a reason for coding, learning and being social and of course having snacks. I heard from a couple of parents of beginners that their kids were so proud of their coding and had so much fun. Many kids asked if we could do it again. We are pretty exhausted – but we probably will!

Here is a link to many of the programs created by students during the code-a-thon.


I hope you like this slideshow of the code-a-thon. We had a great time!

This slideshow requires JavaScript.

First Annual Code-a-Thon for CSEdWeek

Computer Science Education Week is quickly approaching, and this year we want to go a little beyond the classroom hour-of-code events (which we are still doing). My school has decided to host its first mini-hackathon, which we’re calling a code-a-thon! I have seen announcements for hackathons in my area before and the idea is always intriguing, but I’ve never actually attended one – so this is a big leap, hosting one without ever actually seeing what a hackathon is like. Our awesome media specialist and I are pulling it together and hoping to learn from the experience.

Here is what we have decided so far.

  • We will have two categories: Beginner and Advanced. Beginners can be complete newcomers who have never coded before. Advanced coders have a semester of computer science or the equivalent.
  • Teams will be 3-5 students.
  • First thing in the morning, we’ll make introductions, set up norms, and reveal the theme. The theme will be very broad (the examples I use with students are “sports” or “space exploration”).
  • Students will have 20 minutes or so to brainstorm what they would like to make.
  • They can make anything they want as long as it has to do with the theme, and it is created with code. Any coding language is fine. We will provide access to robots and Arduinos if they wish to use them. Students can use Scratch or Code Studio, or Python or JavaScript or any other language. Web design tools such as Weebly do not count as “code” but can be used to enhance their project. Some ideas include games, interactive flash cards, simulations, trivia, animations, educational programs, etc.
  • We will provide some technical mentors that can help students. Students will get a token or a flag they can turn in to receive a certain amount of time with a technical mentor. They should use it when they really need it!
  • We’ll have breaks for snacks and drinks and movement.
  • Students will get to present their projects to the judges for a short amount of time (3-5 minutes depending on number of teams).
  • Judges will score projects in these categories: Problem Identification / Requirements, Usefulness of Solution, Creativity, Teamwork, and Technical Quality.
  • Winners will receive prizes. Everyone will get food and publicity.

I teach a required sixth-grade tech class so I’m able to pump it up and give the code-a-thon some good publicity in class. I have also appeared on the morning announcements to advertise and give computer science trivia questions. I set up a table at lunch with some signs and sign-up forms.

The turnout was amazing! 116 kids signed up!  63 of them were girls! We are going to need to actually cut some kids from the code-a-thon… what a bummer, but what a great problem to have!

Signing up for the code-a-thon. Groups of friends registered together.

Signing up for the code-a-thon. Groups of friends registered together.

We’re excited to see how the event goes and what kinds of programs the students create. My vision is to create a culture at the school where computer programming is seen as a normal problem-solving tool used by everyone, and not a fringe activity for supersmart kids. I’m so, so encouraged by what I have seen with the code-a-thon signups. Really fun to see kids round up friends at the lunch tables and bring everyone over to register to spend a morning coding. I hope the event goes well, and I will definitely post updates as we get closer!


Microsoft Underground Part 2: The Conversations

In an earlier post, I talked about the Microsoft Underground tour and workshop, and the technology we saw – Skype, Minecraft, the BBC micro:bit, and others. In this post, I want to dive deeper into why it was important – what’s in store for the future of education and what conversations are happening there.

The Purpose of Public Education

The group of people brought together for the workshop was interesting – a few of us are classroom teachers, and there were also educational technology specialists, leaders of ed-tech startups, students, bloggers and thought leaders. It was just as fascinating to note what was NOT said as what was said. We shared many thoughts about how to educate students in a creative, engaging, collaborative way. But the question of “why?” or “should we?” never came up. If you don’t live and work in the public education system, it’s a given that a kid’s education should be relevant and enjoyable, rigorous but creative. However if you gather teachers and administrators in a room, the subject of our conversations will be why and whether we should teach more creatively. The “real world” is ahead of us on this idea.

We also never brought up content standards and only mentioned test-based accountability a little. Again, if you gather teachers and administrators in a room and discuss improving teaching and learning, I guarantee we’ll mention test scores and discuss mapping to content standards. In our world, a quality education covers standards and is demonstrated by outstanding test scores, and if it happens to be engaging and creative, I would say that’s seen as a bonus. At the Microsoft workshop, the desired outcomes of our educational system were mentioned in the context of the four “C”s of a 21st century education: collaboration, communication, creativity, and critical thinking. This difference in mindset between the educational world and the rest of the world is important. Whether we want to admit it or not, for teachers and administrators, the purpose of our work is to meet standards and achieve decent test scores. The four “C”s are seen as a means and not as an end, or a bonus if you can find a way to fit them in.

Accountability, Metrics, Motivation to Change

In our conversations at the workshop, a common question was how to get teachers to more widely adopt innovative technologies and curricula in schools. There are many barriers, and test-based accountability is definitely one of them. Our success metrics are all wrong.

In some turnaround schools, kids get ONLY math and reading instruction and learn no science, social studies, or enrichments because of the need to bring test scores up. Would you want your child to go to a school like that? Yet teachers and administrators understand their metrics and strive to be seen as successful.

We talked about a common scenario in which teachers will visit an innovative classroom, say “Wow! I want this in my classroom! How do I get started?” And they try a more creative, collaborative, project-based lesson format for a while. And then they discover it’s difficult, and messy. The kids haven’t learned how to self-regulate their behavior or manage conflict, they’re not used to being self-directed learners, and there is no control in the classroom. If you aren’t committed to the effort, and your test scores are reasonable and nobody is making you change, it’s an easy call to quit. Put the desks back in rows and get out the textbooks and worksheets again. As Jim Collins says, the enemy of great is good.

I don’t see long-lasting change happening in classrooms unless metrics change. So what would 21st century metrics look like? I got an opportunity to brainstorm with Margo Day, the VP of US Education at Microsoft. Margo is awesome. She has immersed herself in the educational world to understand our model and gets it. I suggested we need the voice of tech companies in changing accountability systems. Big companies have a huge voice, and a more immersive and collaborative model in education benefits them and also the kids. She pushed back at first. Standards and accountability systems aren’t really their role, and I can see where she’s coming from, as it’s not in their business model or core expertise. As we talked more, we started to explore the possibilities in that space. What would an accountability system look like that really moved education forward?

Can you use mastery-based systems that level students up when they have achieved basic skills at a certain level?
What would you get if you asked schools what their students have created that year?
To what extent do you use student voice on how engaged, safe, and appropriately challenged they felt at school?
Can you keep basic standardized tests at a dialed-down level of stress and time?
What does actual college- and career-readiness look like and how do we know if we’re moving closer?

My district’s superintendent, Sandra Smyser, took a line from Jim Collins in her opening speech to our district last year, while unveiling new district goals / ends. To paraphrase, sometimes the best ideas defy measurement – and you don’t shy away from the ideas because they’re hard to measure.

We need to speak louder to our policy makers about this. Metrics drive performance. We’re measuring the wrong things.

Innovative Platforms, not Curricula

Microsoft is going to be a force to be reckoned with in the ed-tech market, and here’s why. Their vision is powerful and aligned with the potential that technology can unlock in our students. They could have come out with products that taught students skills mapped to standards, aligned to a curriculum, and focused on mastery of skills. But that’s not what they have done and it’s not what they believe in. Microsoft has created, and continues to create, open platforms. They’re endlessly personalizable, extendable, flexible. The most powerful learning tools allow the learner and teacher to create their own educational experiences, and to make a difference. Every technology we used, from Skype to Office 365 to Minecraft to TouchDevelop and more, is a gateway to possibilities. I sensed that vision in every employee I talked to. They are excited and passionate about what they’re bringing to the market. They see themselves as changing the world, and with that kind of cohesiveness and passion – Microsoft will, and you do yourself a disservice to underestimate them.

I really love the way they approach computer science teaching in cooperation with the BBC micro:bit platform. It would have been easy to look at the list of standards and come up with a curriculum, tests, and textbooks. Instead they see the challenge as how to create an open and flexible platform with which the kids can learn the key ideas through a personalized creative process. Wouldn’t it be awesome if every subject area had this philosophy?

My generation grew up with Microsoft products including Windows, Office, and Visual Studio. Today’s kids find these tools old-fashioned and stodgy, and Microsoft is working hard to win the hearts and minds of the younger generation. They love open-source and hacking and tinkering, social media and communication and creative arts. The way to the kids’ hearts is not through curricula and testing, but through enjoyable uses of technology that push the frontiers of what we can achieve. It so happens that these ideas align with good educational practices as well. This direction could be a true win-win.

MinecraftEDU: The teacher struggle is real

A great deal of our discourse in the educational technology community is around how to use Minecraft in the classroom. It’s a fantastic creative tool and very engaging. I’m Minecrafting at home with my daughters and often find myself excited to get home and start working with them. Minecraft is an open platform with endless opportunities to modify and hack… and some of the latest innovations that have my attention actually use Minecraft to interact with the real world… just wow. I can’t wait.

I teach electives and enrichments, and I’ve been piloting using MinecraftEDU in a couple of my classes to see how I like it and what I could teach with it. I have my enrichment classes using creative mode to create missions and lessons that are educational, so we can upload them to the MinecraftEDU world server. I got my Robotics class to program ComputerCraftEDU Turtles to be their helpful companions in a world where they cannot build, and learn about programming and physical computing this way.

It’s been good. But it’s also been a struggle, and as I’m finishing up the week before Thanksgiving break – a normally busy time anyway that doesn’t always bring out the best in teachers or students – I have plenty to reflect on.

Think about all the things you don’t like about your students or your own kid when they’re playing video games. The obsession and tendency to tune everything else out. The desire to go on side missions that seem more engaging than the real objective. At times, the anger and temper flare-ups. Think about natural tendencies of middle schoolers outside of video games that are hard to manage. Tattling. Bullying. Inability to use words in a conflict. Stubbornness. Seeking revenge. I believe in Minecraft as a creative tool and I am struggling with the reality of managing 30 adolescents on a server at the same time. I give them challenging work – it causes interpersonal problems and I am still learning the tools of managing those.

MinecraftEDU does give you important tools to manage your students. You can freeze and teleport individual kids anytime. There are border blocks, so even if the kids are in creative mode, you can confine them to a certain area. You can turn on and off their building power, and use “build allow” and “build disallow” blocks to limit where they can build/dig and where they can’t.

You can turn off fire, TNT, Player-vs-Player, and animals and monsters. You can always see logs of the chat and who was on the server at a certain time, and I know Minecraft even keeps logs of what blocks were placed and removed, where and when. These are helpful, but kids are more resourceful and determined than you give them credit for. Every boundary is one that can be pushed.

Here are my MinecraftEDU struggles laid bare.

The very feature of Minecraft that makes it so universally interesting, its openness and hackability, can also be a downside in an educational setting. I paid for licenses for my school but found that kids could easily copy the MinecraftEDU directory on a flash drive and paste it onto their own laptops, giving them a free version of Minecraft EDU. I wish this were fixed. It should not be so easy to pirate the software. I actually found today that kids from outside my classroom were logging onto the classroom server and griefing students in my class. I’m in a position now of needing the ability to password-protect the server and changing the password every day as a result.

I have a few students who yell and rage at video games. I have a couple of kids who are sensitive and they cry. Great kids who are still learning appropriate emotional control. This feeds other students who find it funny and do mean things. Little things. They break a block or two, or steal a couple of items from a chest, or just walk into or next to their area and stand there. I don’t even see them do it, I just hear the angry children yelling and crying. Super mean, right? We have normed around appropriate Minecraft behavior multiple times, at the beginning of the unit and every couple of weeks since then. Problems still crop up and you will still have to deal with them.  I always wish I had more tools to do this. I can tell the server is keeping logs of  who is placing, removing, and crafting at each time and position, but I would love a teacher tool to open the correct log and search by username so I can find evidence of what happened and who was involved – this would be so nice when having that hallway conversation with kids and would eliminate the he-said-she-said dynamic. It also doesn’t seem to save the log if the server crashes. Or maybe it does. Again, tools to view the log files would be really helpful.

I also would really like a sort of limited creative mode, where I can have them use unlimited numbers of certain blocks but not others. It would let me give kids power to make a house but not necessarily an army of Iron Golems. I could apply limited-creative mode to students as needed, or apply it to everyone and gradually release to creative mode if all is going well. Filling the screen with chickens? You must be on limited creative mode, creating with only oak and brick, until we can have a chat about Minecraft citizenship. Another helpful feature would be a teacher request tool. Right now my system for kids getting help from me is to have them write their username and help request on a sticky note, and I keep a line of sticky notes next to me. I work on the sticky notes in the order received. This also means I’m not monitoring the chat or student positions while I’m working on help requests, and bad behavior goes unnoticed.

Ultimately though, kids need to be explicitly taught about video game citizenship, and very few are perfect at the interpersonal side of multi-player gaming. Minecraft is about much more than building and creativity and problem-solving. I went into it excited about the creative aspect and have been quickly brought back down to earth – there are boring and uncomfortable and otherwise not-fun lessons the students need to learn about working in this virtual society. I’ll need to spend just as much energy creating a positive culture in the class as I do creating building challenges. If there are videos or discussion guides or other interactive resources for doing this, I am a very willing audience.