Tuesday, October 28, 2014

Leave School Now While You Still Know It All

Interesting questions appear on Twitter all the time. Sometimes addressed to individuals and sometimes addressed to the Twitterverse as a whole. One earlier today has me thinking a lot. And chatting with people on Twitter and Facebook.

This is a tough question if only because it raises many more. What does it mean to be “programming at a high level?” What is the value of a degree? How does one invest their time and money to make the most of their talents?

People regularly ask about moving into a career in software development right from high school. I never hear anyone asking about moving into a professional career in architecture, engineering, medicine, biology, chemistry or the like. If computer science is one of the hardest HS courses students can take (based on how many are afraid to take it) why is is seen as so easy to turn pro at?

In part this is because of the stories we tell. Bill Gates, Mark Zuckerberg and more made billions without finishing their degrees.  But wait, LeBron James makes millions of dollars and he jumped to the NBA right from high school. Being Bill Gates is probably about as much a long shot as being the next LeBron James. but While a lot of high school seniors think they are ready for the NBA and are wrong they at least know they have to be found before they can turn pro. Young software developers have the ability to “turn pro” at very little cost or risk these days. The temptation is great to try because the risk appears so low.

There are many people with very successful careers in software development who don’t have degrees so there is that. Why don’t we see that in other fields? Is it because we don’t do well teaching people professional level skills in high school in those fields or is it because there are artificial barriers to entry in those other fields or is there just too much more to learn? Possibly a bit of all three.

There is also a real anti-degree feeling among some software developers one could point to as well.

This is far from new. In the late 1970s I had a hiring manager tell me he was initially against bringing me in for an interview because I had a university education in computing. It’s hard to imagine another professional field were there are practitioners who see a university education in the field as detrimental.

One thing that makes computing, or perhaps more specifically software development, different from other fields is that it is easier to learn a lot without a formal education. Between MOOCs, freely available software, shared resources, online forums, and more there seems to be a virtual smorgasbord of resources for autodidacts.

One can quickly learn, on their own, enough to start making apps and applications and even make money. Once in the field one can bootstrap their learning though hard work and online resources to keep improving and growing. This is not really possible in many other fields. Not these days. There was a time when doctors and lawyers and other professionals learned on the job though internships and apprenticeships but those days are long gone. They have been replaced by professional degrees.

So to get back to the question that started this epic long post – degree or not? I’m a big fan of the degree. I think that people benefit from a guided learning experience. It forces one to broaden their knowledge and helps them to learn some things they don’t know that they need to know. There are some who can succeed without it but not as many as think they can.

If you are going to skip the degree you need some way of demonstrating that you really know your stuff though. You need significant projects that have been completed that you can show off as samples of your ability. That can be a profitable app for phones or tablets. I suspect that the students who created YikYak for example will have little trouble showing that they understand phone apps and cloud computing. People looking to get into game development need (and I’ve been told this time and again by hiring managers) to have a significant game project under their belts.

A degree, for good or for ill, is validation that you “know something” and if you don’t have that degree you need to be able to convince people you know as much.

One last thought, if a student says he doesn’t need a degree because Bill Gates doesn’t have one remind them that Bill Gates completed two years at Harvard. Then ask them if they can get into Harvard. It may get them to think a bit.

A late thought from someone on Facebook. A good degree includes a lot of courses that are not part of the major but which make for a more well-rounded and complete person. There is some real value in that.

Two States–the Highs and the Lows

I found this image on Facebook last week and it really rang true for me.

Two States

I experienced both sides of this recently. On one hand I wrote a program on the spur of the moment and pushed it out in 20 minutes with no struggle at all. On the other I started a program I thought should have been just as easy and spend a couple of frustrating hours as nothing I did seemed to work. I put part of it aside to come back later when I was calm again. Why does this happen?

The same is true with teaching as one of my friends on Facebook pointed out. One day you thrill to the sight of students “getting it’ and executing projects smoothly and with great pleasure. The next day you hear a lot of “I don’t know where to begin” and “I’m confused.” And you ask yourself, if I explained things so well one day why was my talk a complete failure the next?

Well I expect that some teachers will blame the student for not paying attention or not having what it takes. And of course there are students who don’t pay attention or who are lazy. But I feel some responsibility to be interesting enough for them to want to pay attention as well. Probably we, students and teachers, share some of the responsibility in most cases.

In the case of my frustrating program what I realized is that I was rushing things. I was not thinking things out enough before writing code. This is something I warn students about all the time. I need to sit down and work out the algorithm on paper before I revisit the code. Likewise with my teaching I need to sit back and honestly evaluate how I taught a lesson (or three).

Did I try to cover too much too quickly? Were my examples not as helpful as I’d like? Did I really plan the lesson well or did I rush it out assuming it would be easy or just the same as some other topic that went well? Was I insensitive to the state of the students? Were they paying attention or did I push them to where their eyes glazed over and they stopped listening? Most of all, how can I help them learn what I am trying to teach? I’m never going to become the teacher I want to be if I assume that a failure to learn is all on the students shoulders.

You know, teaching coding makes actually writing code seem REALLY easy some days.

Monday, October 27, 2014

Interesting Links 27 October 2014

What a week. I teach at a private school and one of the things we do is have open houses for prospective students and parents. Last week we had two which meant some extra time at school. Honestly though I really enjoy talking about the school and especially the computer science program. For students who are interested in CS there are not a lot of great options in high schools. I heard last week that New York state is going to let computer science meet a graduation credit. I hope that helps there.

And let’s not forget the lower grades either. Why Teach Computer Science in K-8? I Want Every Kid to Code by @mraspinall

Only a few more days to vote for my lesson on Binary numbers so I can get some computers for my school. http://aka.ms/omvote You can vote once a day so as they say “vote early and often.” I thank you for your support. BTW I have blogged about using the Office Mix tool a couple of times. Well worth checking out.

A couple of competitions for students are wrapping up soon. Check the deadlines and encourage students to enter.

Introducing teens to open source software development with the Google Code-in contest

Know high school girls who love computing? Award for Aspirations in Computing applications are open until Nov. 2nd.

Have your students entered the 2014 We Are the Faces of Computing Contest for students?

A little topical humor to end with. Perhaps the single most terrifying Halloween pumpkin ever carved.

Embedded image permalink

Thursday, October 23, 2014

Instructions and Removing Ambiguity

Recently I found the following image on Facebook. I plan to use it with my students this semester as a starting off point for conversation.


This is a perfect description of someone dealing with ambiguous instructions. Context and assumptions come into play as does words that mean different things to different people. To some people “put some spaghetti on the stove” implies a multi-step process that results in cooked spaghetti. Or failing that at least spaghetti that is cooking when the wife gets home. To someone not used to cooking the obvious request is the literal one shown in this picture.

This brings to mind the old programming joke about the need for a “do what I mean” instruction that many of us have wished for from time to time.

When we ask people to do things we have a certain level of expectation that ambiguity and missing steps will be handled by the person we are talking to. Things like shared experience, known training, and common vocabulary and idiom are a big help here. Computers don’t (yet?) have much of this. We have to be very clear about what we want them to do.

BTW one of my friends, I have some geeky friends, suggested on my Facebook posting “Depends on if those were primitive operations or if it was a method call with anticipated output of cooked spaghetti.” A good point which also suggests that the method call could be better named to more clearly indicate what was happening in the method. Smile

All in all I am hoping for an interesting classroom discussion around this image.

Tuesday, October 21, 2014

Picking Good Variable Names

Actually picking any sort of name is important in programming but we can focus on variable names for a bit. The CS Teaching Tips team tweets and posts a lot of great suggestions. Today they send out a tip about variable names.

Avoid using x and y as variable names to prevent students from confusing variable assignments with mathematical expressions.

CS Teaching Tips Logo

I’ve been working on my variable naming for demos and sample code this semester. The x and y confusion is part of it. It’s tough because I learned in an era where short, even one character, names were the rule not the exception. Memory was expensive and long identifiers took up room in memory. Plus there was a certain amount of laziness on many people’s part. Well at least on mine. None of this is true anymore. Well that part about needing to save room with short variable names is no longer true.

Loop control variables in FORTRAN were almost always I, J, K, L, M, and N back in the 1970s. Variable names that started in those letters were automatically integers and so this was easy. Old habits die hard and I still tend to use those variables for FOR loops. I’m trying to get away from that in class.

I find that using “index” as a loop control variable, especially when the loop is iterating through a string or an array, makes things a bit more clear to students. It also helps reinforce the idea that variable names should have meaning. It’s hard to tell students, “yes I am using x, y, and I but you should all use meaningful names.” and be taken seriously. Using meaningful variable names in demos may take a little bit of extra effort but in the long run I think everyone is better off when teachers model the practice they try to teach.

CS Teaching TipsThere are lots more teaching tips at http://csteachingtips.org/ and you can also see tips from there on the side bar of this blog if you read it in a web browser. Follow @CSTeachingTips on Twitter too!

Monday, October 20, 2014

Decision Trees–Possible Interesting Coding Project

I found this interesting flowchart for determining where one should eat Thanksgiving. It’s pretty complete which also means it’s complicated. I guess if you know the answers it is not too bad to follow. If you just want to see the paths it is complicated. As I was wondering though it I thought “I’d rather have a computer program ask me the questions and spit out an answer.” Naturally the next thought was that I should ask students to write such a program.

And maybe I will. Probably not this particular flowchart but if I can think of something more relevant to teens I may just do it. Anyone have any ideas?


Interesting Links 19 October 2014

You know those school weeks with lots of interruptions, strange schedules and little normal routine? Yep, had one last week. I also managed to record a good number of Office Mixes on various programming topics. I’ll post a list of them as soon as I have a few more under my belt. One of my earlier Mixes is a finalist for a contest Microsoft is running. The winners are chosen by community voting, so if you are willing to help me get some computers for my school, please vote for my mix at https://mix.office.com/Gallery/Category/vote 

Now for a few links I collected last week. Lets start with a couple of good articles addressing the question of why CS should be in schools.

I backed Notable Women in Computing Card Deck on @Kickstarter I signed up to get a deck of cards and a matching poster showing all 52 cards with information about women in computing. It will go up on the wall in my computer lab when it comes in.

The Null Professor a post by Crista Lopes   via @cristalopes  in which she shares some thoughts on CS education prompted by Mark @guzdial's recent posts.

Creating Surveys using OneDrive is a post by Rob Miles about a tool I’ve also been using a good bit in my classes.

I ran across this Ultimate List of UK Education Blogs last week. A lot of education blogs there that will probably be useful for educators in the United Kingdom and else where.

Thursday, October 16, 2014

Help Me Win Surface Pro 3s for My School

OK so the good news is that I am one of 15 finalists to win 15 Surface Pro's for my favorite school. The winners are chosen by community voting, so please vote for my mix at https://mix.office.com/Gallery/Category/vote Mine is the one on Binary Numbers.
Each person can vote for one mix per day, now through October 30th. You have to sign in (only one vote per person per day) using a Facebook, Google, Microsoft or Office 360 organization account. You can vote once every 24 hours. Note that the sign in is at the top of the web page not the button under each entry.
Please vote and ask your friends to vote.Thank you for your support.

Wednesday, October 15, 2014

Idea vs Implementation–Using What We Learn

You’re at a great conference and you are hearing all sorts of great ideas. It’s exciting! You hear about tools and techniques that are working wonders in the presenter’s school or in the schools the researcher or vendor repeats stories from. You love it. It could make a world of difference in your class. And you get home and never use it. Has that ever happened to you? It has to me though I am embarrassed to admit it.

What happens to us? Lots of different things. Sometimes the tech is too expensive. Even when it is free perhaps we don’t have hardware capable of running it. Most likely though we start our planning for the year and it looks hard to find a place to use the tools. We may not have gotten a good idea of how the presenter uses it. It’s cool but what does it really teach? Perhaps we get push back from other teachers who are more resistant to change than we are. Or perhaps we just don’t have as much time as we’d like. Taking the idea/tool we heard in a conference and translating it into our own curriculum and style can be hard, at least in part, because we don’t know enough about who to teach with the tool. What does it teach? How well does it teach? When/where in the curriculum does it belong?

So much of what we hear at conferences is presented as how to use a tool with implementation in the curriculum left up to the teacher. Scott McLeod has a great post on Wasting opportunities at ed tech conferences that puts a lot of the blame (largely correctly) on the sessions presented at conferences. There are 78 comments there as I write this BTW. .

This problem isn’t limited to conferences though. How often do we teach tools to students where the focus is more about how to use the tool (this is how to format in Word, this is how you create a graph in Excel) without teaching them how to use the tool to solve problems or do useful things or learn other things?

One of the things we’re focused on in my school in our first course in the CS department is teaching with context. That is to say solving problems with the tools and learning more than the mechanics. We’re trying to make it more about the concepts and the ways you can learn things than about the tools themselves. I feel good about that but we still have a ways to go.

Two of the tools I learned about over the last year (Code Hunt and Office Mix) are relatively new. Teachers, especially including me, are still figuring out how to use them to teach better. I’m off to a slow start. I planned on creating a whole bunch of Office Mixes over the summer – I made two. I introduced Code Hunt late when I should probably have introduced it early. Currently I am working on a couple of Office Mixes that incorporate Code Hunt. I’m excited about seeing them in action but they’re not ready.

I bring this up in part because over the weekend I was thinking that I’d wished I’d submitted a proposal to the CSTA Conference to present on these tools. After all I think they are really cool. But then I read Scott’s post and realized that I am really not ready to present them. I don’t know yet how well they work with students or how I am going to fit them into my curriculum. Oh I have ideas and I have excitement. but how will they work in reality? That I don’t know yet.

While I hope (assume) they will be good and have some tentative plans I will not have real (or even good anecdotal) evidence until the spring. So while I might have a great talk for the summer it is not a sure thing. I may be missing an opportunity to present or have saved myself embarrassment. Fortunately I have a blog and I will be able to share what works and doesn’t work that way. Not the same perhaps but I think the important thing is that sharing goes on and that it is more about how to teach than how to use the tool for its own sake. That’s my goal anyway.

Related posts:

Monday, October 13, 2014

Interesting Links 13 October 2014

It was Spirit Week at my school last week. It’s always interesting what students wear when they have really wide latitude – they wear uniforms most days. I also tried out Code Hunt with my students. I blogged about that yesterday in case you missed it - Experiments with Code Hunt. Next I need to tell them about the Imagine Cup Code Hunt Challenge.

Mike Zamansky has another great post on Using easy assignments to introduce deep concepts.

How good is school IT? by Garth Flint   About the big problems schools have doing IT support on the cheap. I wonder how many people understand how under resourced school IT support is in most schools.

Please check out the 2014 We Are the Faces of Computing Contest Information I posted last week. And have your students enter!

GitHub has a free Student Developer Pack with some developer tools in it. I don’t know why Microsoft’s DreamSpark isn’t included? My tweets to Microsoft went unanswered and most of the people I would have asked about this two years ago have moved on to other roles or even companies. In any case Dreamspark is worth checking out independently.

Google CS Engagement Small Awards Program that may be of interest to my friends in higher ed teaching CS 1 or CS 2

Another contest. Microsoft wants to hear from students navigating the future of cybersecurity. College/University students only apparently.  Student Essay Contest: Cyberspace 2025

Embedded image permalink

Sunday, October 12, 2014

Experiments with Code Hunt

splash-logo-lowresI tried something new last week with my Honors Programming students. I feel like they need more practice problem solving and writing short bits of code so I sent them to Code Hunt and had them go at it. Their interest perked up a bit more when they found out I like to do those puzzles for fun. At least one student told me he was going to do more when he got home. Long term we’ll see how it goes.
I’m pretty sure at least one student found some  answers on the Internet though. Not ideal but as long as most of them try most of the puzzles on their own it could work. On the other hand creating my own puzzles to match the curriculum and for which they likely could not find answers on the Internet might be even better. And it looks like that can be done.
I found the Code Hunt Designer manual and will give trying to create my own levels this week. I also want to try out Code Hunt with Office Mix. There are a couple of samples (if statement lesson or this substring lesson) that look good.
I see a lot of “flipped classroom” possibilities here but I also see these tools are making it easer to make accommodations to different learning styles and paces. For me it is not about technology for the sake of technology but using technology to teach differently and better. We’ll see how things work.
Oh and Microsoft is running a Code Hunt based contest as part of this year’s Imagine Cup. I need to tell my students about this. Read more at the Imagine Cup Code Hunt page.
  • WHO CAN COMPETE? Students 16 and older worldwide
  • WHAT'S THE TEAM SIZE? Individual Challenge
  • WHEN? Challenge #2 Begins October 18th
  • WHAT CAN YOU WIN? $1,000 for first place
I have a couple of Office Mixes that use Code Hunt now. 

Thursday, October 09, 2014

How to Run a Computing Summer Camp - Logistics Workshop

I saw this announcement on the SIGCSE mailing list. If you’ve thought about running a computer science summer camp this may be the training you need to get it going. If you are from some states (Alabama, California, Georgia, Indiana, Mass, Puerto Rico, and South Carolina) that are part of the NSF funded project that has created this workshop there may be the possibility of getting some funding grant money. There will also be an option for online participation if you can’t get to California for it in person.

Georgia Tech has been running computing summer camps for 4th - 12th graders for years.  Our camps get statistically significant improvements in attitudes toward computing and gains in content knowledge.  The camps are also financially self-sustaining in that they bring in more money than they cost to run.  

As part of our current Expanding Computing Education Pathways NSF grant we are holding a workshop on How to Run a Computing Summer Camp - Logistics on Saturday Dec 13th from 9:00am to 3:30pm at Santa Clara University in California.  Attendees from our partner and associate states (Alabama, California, Georgia, Indiana, Mass, Puerto Rico, and South Carolina) can apply for up to $4999.99 in "seed" funds for equipment.  

People can also participate remotely.  All they will need is a browser and internet connection.  We will be using Blackboard Collaborate.  

See http://expandingcomputing.cs.umass.edu/how-run-summer-camp for more information and you can register at https://www.surveymonkey.com/s/HTRASC121314image

Barbara Ericson
Director, Computing Outreach
College of Computing
Georgia Tech

Wednesday, October 08, 2014

2014 We Are the Faces of Computing Contest Information


The Equity Committee of the Computer Science Teachers Association is sponsoring a contest to celebrate the many different kinds of faces that we see in the computing world.  For the past two years, students have created posters to celebrate diversity in computing.  This year, we're going to shake things up a little, and we are asking for a commercial-length (1-3 minutes) video that features students participating in computing in interesting ways.  The exact style and format is up to your students.  They might make a short-short film, a public service announcement, or a commercial for your class, your robotics club, or Computer Science in general.  Let your students be creative!

Winners will receive Sphero, Ollie (http://www.gosphero.com/), or Finch robots (http://www.finchrobot.com/) for their classrooms (note: value of prize package per classroom is approximately $500).  If you need inspiration, please see the winners of the last two years' poster contests on the CSTA Web Site (http://csta.acm.org/Advocacy_Outreach/sub/CSEdWeek.html). 

The contest deadline is November 20, 2014.  Rules, guidelines and release forms can be found on the CSTA Web site at http://csta.acm.org/Advocacy_Outreach/Other/FOC.html​.  If you have questions about the contest, please email Laura Blankenship at lblanken@gmail.com.

Yours truly,
The CSTA Equity Committee
Laura Blankenship
Alfred Thompson
Mina Theofilatou

Tuesday, October 07, 2014

Programming and Math and Computer Science

During my first few years I worked at Microsoft the focus of my job was higher education computer science. In that role I visited many computer science departments at different universities. I found that computer science programs developed out of different areas in different universities. In some CS came out of mathematics. In others computer science came out of engineering. In a few the departments grew out of the school of business. The latter probably comes as a surprise to some people. But of course a lot of business it mathematical and computational. In any case I found that the computing focus was different depending on where the computer science (by that or other name) grew from.

Last week Mark Guzdial pointed readers to a blog post titled Programming is Not Math. I linked to it in my interesting links post but I’ve felt the need to say more on the subject. Especially after some of the comments on Mark’s post. I don’t think there is any real doubt that programming, math and computer science are related to each other. There is some overlap but they are also not synonymous.

We don’t say things like business is not math or engineering is not math. I think that is because we, generally, understand what engineering and business are. While we know that math is involved and is important we don’t conflate math with engineering or business even though it is important to both topics. And yet the lines between math and computer science seem to easily get blurred.

A lot of that contributes to the idea that one has to be good at math to be good at programming or computer science (two things with overlap but which are also not synonyms.) In comments in Mark’s post you can read people saying that a lot depends on how you define programming or math. And that is true.

Programming, to focus on that for a bit, definitely depends on logic which does have a basis in mathematical thinking. Or philosophical thinking – logic is a key part of philosophy. Some of the best programmers I know have their formal academic training in philosophy. So is programming philosophy? Seems like a funny question but arguably the logic aspects of philosophy and programming have a lot in common.

Programming is related to many things but that doesn’t make programming the same as any of those things. Assuming that one of those things (math for example) is required to get to programming or that being good at mathematics means one will be good at programming is not a sure thing. It probably can’t hurt though.

Monday, October 06, 2014

Interesting Links 6 October 2014

Well it’s October already. Things are really starting to roll in my classes. Projects are getting more interesting in my honors programming class which is a good thing. And my Twitter, Facebook and RSS feeds are showing me all sorts of interesting things which I share here and via my Twitter (@AlfredTwo) feed. I’m also experimenting with Ello a little. Anyone else on Ello? I am there @AlfredTwo. Feels empty so far. But enough chit chat. Check out the links below.

The state of computing education in the world: Report on the 2014 ACM Education Council Meeting by Mark Guzdial on the blog@CACM Well worth the read.

Microsoft Sway Aims to Automate Beautiful, Responsive Web Design You can see an example about a trip to Mt. Rainier in a Sway: https://sway.com/rainier To me it looks a like a tool to create pretty interesting stories on a web page that combines images and text. I’m hoping to get a beta invitation.

According to the Electronic Freedom Foundation (EFF) a popular product that claims to be Security software distributed by cops is actually spyware in disguise

Computer Science Principles: Getting Started is the latest post by  Myra Deister (twitter @shhsMath) on the Computer Science Teacher Association blog.

Programming Is Not Math  by Sarah Mei @sarahmei This will make you think.

Laptop education for all should be Common Core  by Garth Flint addresses some of the tech limitations that both students and teachers have that makes one to one computers difficult.

This post on the Microsoft New England blog struck me as interesting .Kinems Personalized Kinect-based Learning Games for Children with Learning Disabilities Anyone know someone using these games?

Scott Hanselman @shanselman has created a very nice Windows 10 tour video on YouTube Looks to me like some of the best of Windows 7 and Windows 8 will be there.

Embedded image permalink

Friday, October 03, 2014

Doing It My Way

I suspect that there are a lot of programs and websites available that let teachers enter a class roster and randomly pick out a student name. I know several teachers who like to use such tools to make sure they call on students fairly. This week I decided I wanted to start doing the same thing. I had a bunch of options. The other computer science teacher had a program he wrote and was using with some success and I could have asked him for a copy. There are teachers in the building who are using other tools and I could have asked them for a copy or pointer. Or I could have done an Internet search for something available online. Those are all easy. So of course I did none of those things. I wrote my own.


Obviously to some extent I was reinventing the wheel as they say. On the other hand I write code for fun when I have the time and so I saw this as justified. Sort of.

I wrote a basic program and it worked. But of course I was not satisfied.image I wanted to make my life as easy as possible. Well at least I wanted to make using the program as easy as possible. So I wanted to track the class roster files and add them to the menu. After all real programs, like the Windows Live Writer I am using to create this post, do that sort of thing – include recently opened files in the menu.

This I did not already know how to do. I’d never needed to know it before. So I started looking things up. After a little bit of searching and reading through some documentation and sample code I was able to do what I wanted.

I consider any project that teaches me something new to be a success so now I feel doubly justified in writing this program.

From time to time students ask me if they can work on their own projects in their free time. This always surprises me as the answer is an obvious YES! So I am not sure why they ask first.

Other students just start working on projects and tell me about it later. Well actually I most often find out about it when they are having trouble figuring out how to do something they need for the project. Others like to report back on success at creating a program that solves a problem or need specific to them. In all of these cases students learn things. I think most people learn best when they struggle to learn what they need to know for a project of their own interest.

While some students find these sorts of projects on their own others need help. I wonder if this is because students are too used to being consumers of what others make available and so don’t think of themselves as empowered to create their own solutions/tools. That is something we as educators need to work on.

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.