Wednesday, October 01, 2014

Do It Without Code

One of the projects I like to assign involves counting the letters in a set of text. In other words, how many times does each unique letter appear in a string. How many “a”s, “b’”s, etc. I usually want some thing that looks like this:


Students generally understand what I am looking for very easily. Writing the code seems to be harder. Students tend to say they don’t know where to begin. At first this project is pretty abstract to them. So today I tried something different.

I put a sentence on the board and asked them to count the letters on paper. Five minutes later we talked about how they got their count.

This was pretty interesting to me. There were several different ways of doing this which were different from how I approached the problem. Several students took the first letter in the string (a “T” in this case), copied it to a piece of paper and then traveled the length of the string counting how many times “T” was there. Then they looked at the next letter, copied it and again searched through the rest of the string counting that letter. And so on.

Other students listed all 26 letters and went from letter to letter in the string making a hash mark next to the appropriate letter on their list.

There were subtle variations on these two solutions but the basics were the same. The second solution is the one I have coded many many times over the years to where it has become the only solution I think about. The first one though is pretty interesting though.

Having two solutions game me a wonderful opportunity to talk about analyzing algorithms for efficiency. In this case we have an obvious tradeoff between space (the first solution optimizes how many counters we use) with performance (the first solution does a lot more comparisons). I wish I could say I’d planned that.

Regardless of intent I think we had a good discussion. Now we’ll see how the students do at converting the ideas into code.

Monday, September 29, 2014

Interesting Links 29 September 2013

The big deal for me this past weekend was the birth of my first grandchild – a grandson. People are already asking me about what his first technology will be. I think I’ll leave that to his parents. At least for now. Earlier in the week though I did collect a few things to share.
First off, in case you missed them, I’ve blogged about several contests/competitions/awards for students lately. Check them out and see if any are appropriate for your students.
iPads and Pens in the classroom by Garth Flint. It sure does seem like a lot of technology is thrown into schools without proper planning and teacher preparation.
This is the largest collection of FREE Microsoft eBooks I have ever seen. Your IT support people may be very interested.
CS EdCamp Anyone? is my latest guest post at the CSTA blog. What do you think of a computer science unconference somewhere and sometime?
Inspiring Quotes from 10 Influential Women in Tech something for a bulletin board perhaps?
I love this carton from xkcd. A lot of people, basically people without experience with computer science, don’t understand the difference between what is easy and what is hard in software.

Wednesday, September 24, 2014

IBM Master the Mainframe Contest

imageFor something different, IBM is running its tenth Master the Mainframe Contest for students age 13 and up.

From the web site:

What you need to know:

In Fall 2014, IBM is running its tenth Master the Mainframe Contest for students across the Unites States and Canada.

No experience with mainframes is necessary. In fact, the contest is designed for students with little or no mainframe experience, increasing with difficulty as the contest progresses. Students just need to bring drive and competitive spirit and be ready to compete!

Frequently Asked Questions/Answers:

When is the contest?

Registration will be open from September 23rd until December 31st! The contest runs from October 6th until December 31th. Students can register and join the contest through December 31st.

Why compete in a Mainframe Contest?

The prizes up for grabs in the 2014 Master the Mainframe Contest include:

  • IBM Master the Mainframe T-shirts
  • IBM Master the Mainframe Prize Packs (which includes):
    • Hooded Sweatshirts
    • Water bottles
    • Messenger Bags
    • IBM Notepads
    • And other cool IBM swag
  • Tablet Computers
  • All expense paid trip to the IBM facility in Poughkeepsie, NY
  • Experience!

Today's mainframes are growing in popularity and require a new generation of mainframe experts. This contest is designed to equip students with basic skills to make them more competitive for jobs in the enterprise computing industry. Participation in the Master the Mainframe Contest could give you the edge you need.

To help employers connect with the best mainframe students, contestants are encouraged to check out the jobs posted on the System z job board at

Who can compete?

Anyone is who is currently a student at the high school or university level can compete (13 years of age or older) – no experience is necessary! Please click here for the official rules and regulations.

Tuesday, September 23, 2014

American Computer Science League Programming Competition

If you didn’t see this in the recent CSTA email blast read below about the ACSL Programming Competition:

ACSL has offered a unique programming competition for 36 years. Here are some excellent reasons to participate this year:

  • ACSL contests are conducted at your local school or institution throughout the year.
  • All of your students can compete and be successful, not just a very few.
  • All necessary preparation materials are supplies as soon as you register.
  • The contest allows for various experience levels - Junior, Intermediate, and Senior.
  • The Classroom Division provides a non-programming version of the contest.
  • Programs can be written in any language(s) that the students know how to use.
  • ACSL can extend the actual curriculum in computer science or be used as an extracurricular activity.
  • New, creative contest questions and programming problems are used every year.
  • Previous years' contest questions are able to be purchased for extra practice.
  • Important Computer Science topics such as Boolean Algebra, Graph Theory, Computer Number Systems, and Data Structures are introduced.
  • Prizes are awarded on a regional basis to top scoring students and teams during the year.
  • Fast e-mail response is provided for all questions and concerns.
  • Sample student-written programs in several languages are provided after each contest.
  • The level of programming increases in difficulty as the year progresses starting with only IF-THEN statements for the first contest.
  • ACSL has sponsored regional contests continuously since 1978 and is now international.
  • There is an annual All-Star Contest that is hosted at a different location every year and this year it is in Orlando, FL!
  • ACSL is on the Approved Activities List of the National Association of Secondary School Principals.
  • ACSL is an institutional member of CSTA.
  • All of the ACSL team members have been high school Computer Science teachers.

If you are interested in participating in the ACSL contests, please visit our web site, read the 'How the ACSL Works' link and view the 'Sample Questions' link. All questions about ACSL can be sent to Jerry Tebrow @

As in the past, ACSL will include a free contest CD in the registration packet that is sent to all new teams if the advisor is a CSTA member.

Monday, September 22, 2014

Interesting Links 22 September 2014

Last week ended with International Talk like a Pirate day. Talk_Like_a_Pirate_DayI doubt this would have spread as far as it has without the Internet. Things were very busy for CS education on the Internet last week. I’ve got a lot to share today. I hope you find something useful here.

Last week I learned about Gidget  (thanks to Mark Guzdial) which is a more text based programming environment for teaching programming.

Gidget is a game designed to teach computer programming concepts through debugging puzzles. Gidget the robot was damaged on its way to clean up a chemical spill and save the animals, so it is the players’ job to fix Gidget’s problematic code to complete all the missions. As the levels become more challenging, players can combine newly introduced concepts with previously used commands to solve the puzzles and progress through the game.

The MacArthur “Genius Grants” for 2014 were announced last week. A computer scientist, Craig Gentry who is an IBM Research Scientist in their Cryptography Group was one of the recipients.

I created a short video introduction to operators (math and relational) in C# which you can watch or download from Office Mix -

Mark Guzdial announced the release of JES 5 (the Jython Environment for Students) It includes: New Jython, Faster, Updated Watcher, with Jython Music.

Karen North is  hosting a Houston Texas area Code Studio workshop (for teachers, grades K-5). 

The 2015 Code Hunt Challenge is part of the Microsoft Imagine Cup competitions.  The first event was over this past weekend but they are running more of them monthly. Worth pointing your students to since they don’t have to go anywhere but the Internet to take part.

You really want to look at this blog post -Wolfram introduces "Tweet-A-Program" – the Wolfram language looks VERY interesting. If you don’t think so yet you will after seeing the examples there.

Microsoft launches Cyberspace 2025 Essay contest for university students navigating the future of cyber security policy:

Today, we’re kicking off this year’s contest, the  Cyberspace 2025 Essay contest.  This year, we want to hear from University students who are conducting original research on how they see the future of cyberspace.  The inspiration for this topic comes from our recently published paper, Cyberspace 2025: Today’s Decisions, Tomorrow’s Terrain, where we consider the impact that such factors as demographics, education, immigration, regulation, technology, collaboration, and even trade will have on the future landscape of cyberspace and cybersecurity.

Friday, September 19, 2014

2015 Code Hunt Challenge

Microsoft is running their big Imagine Cup imageinternational student competition again this year. While some of the events take a lot of work and teams of students some of them are individual events. The Code Hunt Challenge is one of the later.

I grabbed a bunch of information from the Imagine Cup Code Hunt Challenge web page to share. Code Hunt

ACTIVE DATES (GMT): Wed, 10 Sep 2014 00:00 - Thu, 30 Apr 2015 23:59

WHO CAN COMPETE? Students 16 and older worldwide

WHAT'S THE TEAM SIZE? Individual Challenge

WHEN? Challenge #1 Begins September 20th

WHAT CAN YOU WIN? $1,000 for first place

Check the Official Rules for all the details!

Put your coding skills to the test. In cooperation with Microsoft Research, Imagine Cup brings you the ultimate challenge: write effective and elegant code, in real-time, in competition with thousands of other student programmers.

In the Code Hunt Challenge, you'll be shown a snippet of code, and you'll have to rewrite it to produce the desired output in as few lines of code as possible. The puzzles start easy but quickly escalate in difficulty. Can you solve them all?

The winner of each month's Challenge is the student who produces the best possible answers in the shortest time. The Challenge lasts just 48 hours, and the first student to get the highest score will receive a $1000 prize! And every student who participates will be entered into our Grand Prize drawing. One student will be chosen at random to win a $5000 prize!

The first Code Hunt Challenge begins on September 20th at 12:01 AM (GMT), and ends on September 21st at 11:59 PM (GMT). Even when there's no Challenge happening, though, you can still visit and practice your skills to get ready for the big event.

To get started, please register now and sign into your Imagine Cup Dashboard.Then find the Code Hunt Challenge and sign up!

So Many Ways To Do The Same Thing

I updated my list of block programming languages and tools yesterday. Two more bringing the total list to 17. Seventeen? Yep. Also this week I learned about Gidget  (thanks to Mark Guzdial) which is a more text based programming environment for teaching programming. There are so many of these tools out there.
It seems like these sorts of tools for teaching beginning programming are appearing faster and faster all the time. A couple of years there were just a few of them with Alice and Scratch getting almost all of the attention. Next came Snap! in terms of attracting a large teacher base. Of course those were not the first around but they were the first to really jump into mainstream CS education. All of these have their fans and lots of people rave about them. Do we have research on how they work? Not much. Even less on the newer ones.
Recently I asked (Yet More Block Programming Languages) why these new languages were created and received a nice answer from one of the creators. (Thanks Jeff Gray) I suspect everyone who creates one of these tools has their own ideas about what should be done and how. I’m not going to tell anyone not to try something they feel good about.
In some cases, Spherly and App Inventor just to name two, a specific application domain is the target. Robots and phones in those two examples. In others a specific platform such as apps for iPads or Android devices. Or even different programming paradigms – TouchDevelop for small screens and a touch interface rather than a keyboard. They all touch some interest of study and some audience.
Students react to different tools differently. I have asked groups of students about several on different occasions. I’ll have some tell me they love Scratch and hate Alice. Others hate Scratch and love Alice. It seems to be a pretty personal thing.
Right now I am gathering a list of educational tools and projects that teachers are using to teach programming. Not just at the very beginner level up up to and even beyond Advanced Placement Computer Science. (Supported by I’m looking for volunteer teachers who are willing to help me review and rate them all. If you are interested and willing to help let me know. Email at Thanks

Thursday, September 18, 2014

Teach APCS–A New Shared Resource Site

A few days ago I was contacted by Christina Cacioppo whose day job is an engineer at a startup but who is also helping to teach Advanced Placement Computer Science. She is involved at a public school in San Francisco through TEALS ( which places software professionals in the classroom to help start CS programs. Christina has created her own site to share resources. I have to say it has a lot already but she is looking for others to contribute as well. The site is called Teach APCS.

According to its creator, Teach APCS currently has:

  • an interactive REPL to help students get started
  • a dictionary of common terms
  • a compiler-error-to-English translator
  • a list of exercises that have been tested in classrooms and seem successful (these look particularly interesting to me BTW)
  • a "microtext" – snippet-sized explanations of key AP CS concepts
  • a list of microlectures – solid YouTube videos that could supplement
    classroom instruction.

If you are teaching APCS or other Java course check it out. Perhaps share some resources of your own!