Monday, May 16, 2022

BINGO Inspired Projects

My son’s school, he’s principal of an elementary school, had a Bingo themed fundraiser yesterday. I can’t help but think about how things are done with any event like this. My first thought was about the Bingo cards themselves.

Typical Bingo cards consists of a five by five grid. The letters B I N G O label the columns and each column has a random number. The center square of the grid is a “free” square and doesn’t have a number. Obviously, generating Bingo grids is a logical project. The numbers in each column must be without a specific range and duplicates are not permitted.

The next obvious project is one to “call” the numbers. The numbers must be identified by number and column where the column is identified by the letter above the column. Drawing duplicate numbers is not permitted so keeping track of numbers drown is important. Keeping track of numbers drawn is also important for verifying Bingos. A program should have a way to do that . This becomes a user interface problem as well as a data storage problem. That may be the most interesting part of the project. At least it is for me.

Now if you really wanted to get complicated, one could design a system where Bingo cards are numbered and their contents stored. One might then be able to use that data with the data of numbers drawn to verify if a Bingo was on the card using only the number of the card. I see this as a group project where individual students would write parts of the program and have them work together. A lot of planning would have to go into this of course.

The Bingo at my son’s school used a traditional ball cag. That seems more fun somehow than drawing the numbers on a computer. That doesn’t mean that software would be a bad way to keep track of numbers drawn and used to verify a Bingo. Another project idea perhaps?

On the other hand, the whole idea opens a discussion of “just because something and be computerized does that mean is should be?” The human factor is an important one. I’d love to have student discuss the pros and cons of computerized Bingo and old fashioned ball cages and physical tracking of drawn balls. Which is more authentic? What does authentic even mean?  That discussion might be just as useful as discussion of what data structures should be used to track Bingo numbers.

Friday, May 13, 2022

Teach CS in K-12? Please Help Gather Data

The Computer Science Teachers Association (CSTA) and the Kapor Center are conducting a survey of K-12 computer science teachers in the United States. The CS education landscape continues to evolve, and we want to hear directly from teachers about your experiences, challenges, and what resources would be most useful to you at this time. Having detailed and current information allows policymakers, curriculum & PD providers, State Departments of Education, membership associations, and other organizations to better understand and meet the needs of teachers. Results will be used to make specific recommendations to improve support for CS teachers.

If you teach K-12 computer science, we need your voice!

We invite you to participate in this national survey, which will take approximately 20 minutes of your time. Responses are confidential and optional.

As thanks for your time, the first 3,000 teachers who complete the survey will receive their choice of a $10 Tremendous gift card. All participants will be entered in a raffle for one of five $200 gift cards.

Please encourage other CS teachers to also complete the survey, and if you have any questions, please contact or Many thanks again for contributing vital insights to improving K-12 computer science education!

With appreciation,

CSTA and Kapor Center


Learn more about the Computer Science Teacher Association here.

Learn more about the Kapor Center here.

Wednesday, April 13, 2022

Last Mile Education Fund–Making a Big Difference

We often underestimate the difference that small things can make. When I was in high school all I could afford was a cheap plastic slide rule (no calculators back then) and it really slowed me down with math. I sometimes wonder what a more expensive and accurate slide rule would have done for me. I had other privileges and did well in the long run. But that is not the case for everyone.

Privilege often gets conflated with potential when in fact a lot of potential gets short circuited because of obstacles that are more common for non-privileged students. Things that are non-issues for many become showstoppers for far to many others.

Picture a student with great potential in computer science who can’t afford a good laptop? Or cannot afford her textbooks or lab fees? Low income students often take longer to graduate because they don’t have adequate preparation and need some extra courses and time to catch up. That often means they run short of funds even with the finish line in sight.  Even good scholarships often leave gaps in funding that limit students from underprivileged backgrounds.

That’s where the Last Mile Education Fund is making a difference today. From the mission statement of the Last Mile Education Fund:

  “The Last Mile Education Fund takes an abundance approach, investing in a broader group of students already committed to technology and engineering fields, providing support for challenges they face beyond their control, and incubating them to be the next generation of innovators. “

Last Mile Education Fund invests in striving, low-income students pursuing degrees in the high-demand fields of technology and engineering to support them in their last mile to graduation and into a career.

A number of grant programs are available. Some of them specifically for female and non-binary students but a number of them are available to all genders.  The Microsoft Cybersecurity scholarship is for community college students of any gender for example. Full information about these opportunities is available at the Current Funding Opportunities page. I have links attached to some that have pages with more details.They include:

  2. Bridge Grants

If you know of students who could take advantage of these grants please spread the word.  And let teams/people at universities and colleges who support low-income students know about these programs as well. They can help a lot of high potential students with some hurtles that could but shouldn’t hold them back.

Monday, March 21, 2022

Word Games and Cryptography

My latest discovery, thanks to Doug Peterson, is Crazy Phrase. Crazy Phrase is something of a variation of Wordle except that in Crazy Phrase the player is a phrase to discover. Clues are similar to Wordle with visual clues like green being a letter in the right place, yellow being in the wrong place but in the right word and blue being a good letter for the phrase but placed in the wrong word.

I was a bit intimidated when I first visited this new puzzle. I soon realized that some things involved in decoding cryptograms can be helpful. As with Wordle, looking for common letters is particularly helpful. With phrases we have the added option of looking for common words. This is especially true with two and three letter words. Words like “to”, “on”, “of” and the like can be very helpful in spotting the direction a phrase of going.

There is a proliferation of games on the internet inspired by Wordle these days. They offer a lot of possibilities for teaching problem solving. Creating new versions of games is an obvious programming project. Discussing these as cryptography related is an other possible topic. The use of computers to analyze strings is widely used for many applications so getting students to think about the process as used in games can be very helpful. And fun.

Tuesday, March 08, 2022

APCS A–Java or Python?

There is a lot of discussion about moving the Advanced Placement CS A exam to Python from Java. The Collegeboard is reluctant to do so. They see APCSA as the equivalent to CS1 or the first course for CS majors in university. They cite research that indicates that APCSA students for very well in CS2 (usually data structures) and that CS2 is almost always taught in Java or C++. On the other hand, at many universities the purpose of CS 1 is growing and the audience is widening to include students from many different majors. I wrote about that yesterday (What Should APCS A Really Be About?) Mike Zamansky took it on on his blog as well (SIGCSE 2022 - What language APCS-A part 1 - the intent)

It seems like we have to first agree on the intent or purpose of APCSA (and CS1) before we discuss language. Given that agreement is never going to happen – CS people can’t agree on anything. So I will start my discussion from the standpoint of APCS A should increase diversity in computer science and prepare students for using computing in CS as well as other disciplines.

This is a concepts first decision not a language first decision. I feel that non-CS majors need the same concepts as CS majors. SO what are those concepts? Not a lot changes except that in computing widely APOs are bringing far more critical than they used to. They enable programmers to easily do things that used to be hard. They also more things we used to do early to later in a CS major.

Sorting is one example. With so many libraries to do sorting why should we spend a lot of time in a first course having students write sorts? We know they sorts they will write are not going to be up to the standards and power of sorts they can call that exist already. Algorithms? Surely there are other algorithms we can focus on to help students learn to study problems and developing algorithms?

So if we want to increase the number of students who study computer science beyond the limited scope of would be computer science majors preparing students for CS2 loses some power in the argument. And Python gains some because of all the APIs that are available and all the other disciplines that are already using it.

At SIGCSE, the panel members arguing for Python talked about much of what I write above. They also talked about Python avoiding some of the “cruft” of Java. How much easier “Hello world” is in Python for example. The “other side” focused mostly on the costs of changing and not specific criticisms of Python. There are things about Python that people do raise. It’s dynamic typing rather than Java’s strict typing. I’m a strict typing person myself but I can be open minded. Also the use of white space. Now it is not clear to me that either white space or curly braces have advantages over the other so I see that as a wash as well.

The post panel poll, FWIW, had 57% saying to switch to Python and 28% saying “keep Java” with the rest being answers all over the map.

I have no dog in this fight since I no longer teach AP CS but I am leaning toward that it is time for a change. I like the idea of a high school course, even on modeled on a university course, preparing a wider range of students for a wider range of majors.

The Collegboard is going to do what they want and the costs of changing may be as big a factor as anything. They are also driven by what universities do and as universities revisit the purpose of CS1 that will have more impact on anything anyone in high school has to say.

Mike Zamansky has a different take on this at SIGCSE 2022 - APCS-A Language strengths and weaknesses

Monday, March 07, 2022

What Should APCS A Really Be About?

Perhaps my favorite panel of SIGCSE 2022 was debating the question of should the APCS A course switch its language from Java to Python? During the discussion it occurred to me that there was a bigger question that had to be answered first That is “what is the purpose of APCS A?” Now the normal and obvious answer is that it should be equivalent to university CS1 courses – the first course CS majors take in university. That's too easy and also not helpful.

What should CS1 be all about? Traditionally, CS 1 was a course taken by CS majors and was preparation for the rest of the CS curriculum. Today it is not that simple. Increasingly, other departments in other disciplines are wanting their students to take CS1 or something much like it. Engineering, astronomy, physics, and business are just some of the areas where programming is growing as a tool. The CS department is the best department to teach this first course.

What does that mean? Well, for one thing it opens the door to more programming languages. While Java and C++ are the big languages for a next course for CS majors the same is not true for other departments. Without getting into the language discussion (until my next post) we need to look at what concepts are needed and ask if they are similar enough for everyone.

Owen Astrachan suggested at SIGCSE that the “A” in “APCSA” has traditionally stood for “Algorithm” but should now stand for “API.” Not that we ignore algorithms of course but that APIs were the way computing was increasingly being done. If we look at how non-CS programs are using programming we see that this is very much the case. This probably means that for CS to remain and improve as a teaching, learning, research tool it has to focus on APIs as well.

That is probably only one example of things we should look at changing (in APCSA and CS1) I  get the impression that many university departments are already changing and looking at changes as they see their CS1 course serving more than just CS majors.

Circling back to APCSA in particular, are all of our APCSA students going to major (or minor) in CS? Probably not. Many? Perhaps. But a majority are probably going to move into other areas of study. To we ignore their needs to focus only on future CS majors? That seems a recipe for turning students off from computing completely. High school courses should never be weed out course. One can have a rigorous impactful course without scaring people away from the field.

There is a lot of thinking about what CS1/APSCA should be about and I want to learn more about how university departments are adjusting to today’s  needs for students. Keeping things the way they are today just because we have always done it that way seems a lot less than ideal.

What is your thinking? What should CS1/APCSA be focusing on?

Sunday, March 06, 2022

Final Thoughts on SIGCSE 2022

I had a great time at SIGCSE 2022. As an introvert I probably suffered less from not being with people than many but after two years I really needed to be with people. I was able to connect in-person with friends I had not seen in years. Some a decade or more. That was truly awesome. The community building of an in-person conference should not be understated.

I had some great “hallway track” conversations. This is not nearly as easy in a remote conference and it contributed to what I was learning. Besides being with people I really did want to learn. So my hallway conversations were not all catching up with friends. I was able to ask a lot of questions about the work various people were doing. Things often outside the scope of a specific talk or panel that I attended.

I visited with Ruthe Farmer of the Last Mile Fund. The Last Mile fund is “investing in a broader group of students already committed to technology and engineering fields, providing support for challenges they face beyond their control, and incubating them to be the next generation of innovators.” It’s an amazing program that helps students who are missed by a lot of programs giving them the help they need to complete their educations. They are particularly focused on women but have some money for men in community  colleges. Check them out if you know someone who needs a little help making it through.

It seemed like there were multiple interesting sessions in every time slot. Where I had to choose I picked panel or supporter sessions over paper sessions. Mainly that was because with paper sessions I could at least read the paper. Not the same thing but it was that or miss out on a panel completely.

The elephant in the room may have been COVID and masks. COVID times was a topic of conversation but masks? Not that I heard. The conference organized stated that even though CDC guidelines had changed the attendees had signed up expecting everyone would be masked so they were going to stick with that. I think it was the right decision. While masks are not always comfortable and they make it a little harder to recognize people it added to comfort levels for many attendees. Including me.

Sessions were split between the Rhode Island Convention center and the Omni hotel. The two are connected and traveling between them was pretty easy. I have a bias to all being in the same building but honestly I have walked further between sessions in some convention centers so there is that. The rooms themselves were large, accommodating people sitting apart if that made them more comfortable. I suspect that is what required using both facilities when one might have divided large rooms under normal circumstances.

Hybrid sessions where some or all of the presenters were remote were interesting. It worked pretty well overall. I hear there were some that were played recordings with no interaction but I didn’t “attend” any of them. The real bonus of a paper session is being able to ask the author questions so that is important. Mike Zamansky has more on this on his post at SIGCSE 2022 - Conference format.

I left Providence with a lot to think about and some great memories of visiting with people face to face – even with masks. Now to renew my passport so I can attend next year in Toronto!

Saturday, March 05, 2022

SIGCSE 2022 Day 3

Saturday at SIGCSE was a short day but there was still plenty to learn. Shaundra Daily. Her talk, based on her own history, was about how their are barriers making it hard for women, especially women of color and women who are also mothers, and who generally don’t fit a specific mold. This fit in with other conversations I had this conference about getting students to start CS at the university level don’t have the support they need once they get there. Filling the pipeline is not enough if the exit is blocked.

After the keynote I grabbed a quick bite to eat and ran into Mike Zamansky. Mike has a great blog post about the things he plans to write longer posts about. SIGCSE2022 - Things I plan to blog about We spent a lot of time discussing those topics. We agree on much and disagree (in a friendly way) on some. Look for future posts from both of us on these topics. Mike Zamansky blog

My first paper session was CSF2: Formative Feedback in Autograding. I'm of mixed feelings about autograders but more on that another time. This particular tool moves away from the binary pass/fail of autograders to provide feedback and hints. The tool also helps educators see where students are getting stuck. I want to look into this one some more.BTW, hinting is hard.

After the morning break, Nifty Assignments. I just could not resist as I love new assignments. This year’s assignments as well as previous year’s assignments are available at Nifty Assignments ( So I’m taking the easy way out and not saying much more about them.

For lunch time, SIGCSE set up a K-12 meetup lunch time in a conference room. I really enjoyed chatting with other K-12 people. Next year I hope they can come up with a way for us to connect earlier though. The k-12 ribbons were nice but ribbons get visually lost at times.

Friday, March 04, 2022

SIGCSE 2022 Day 2

The morning keynote was by Barbara Ericson. She talked about a lot of her early work including some of her online books CSAwesome and her work with the free online CS textbooks at Runestone Academy. I need to look at these some more She also talked a lot about Parsons Problems - a subject I am really interested in. One project is Sisters Rise Up which provides mentorship for women taking AP courses. She’s got a lot going now as well. She is an inspiration.

First Paper Session:Trends in CS Teacher Professional Development: A Report from the CSTA PD Committee. A lot of CS teachers are experienced teachers but not experienced in CS. Teachers want PD but it can be hard to find. The PD committee is evaluating and accrediting CS Ed professional development. You can see their efforts at the CSTA web site

Next up was Detecting Struggling Students from Interactive eBooks Data: A Case Study Using CSAwesome This talk was by Barbara Ericson and was about data from ebooks on Runestone and CSAwesome. Barb was able to collect a lot of data.  Students don’t watch videos to completion a lot which doesn’t surprise me that much. A lot of information in this talk. I recommend reading the actual paper. (Available for free for a limited time) I really need to look at these ebooks and see if they are something I can/want to try and create myself.

Last of my morning papers was Who Belongs in Computer Science? This study looked at middle school students to see what their perception was of computer scientists and how that impacted their feeling of belonging. In brief, boys and girls had the same perceptions but girls didn’t see themselves in what they perceived as being a computer scientist.

I took advantage of the “hallway track” to talk to Aman Yadav (author of the paper above) about the importance of CS teachers talking about race and computing. We need students to understand how bias works its way, usually unintentionally, into software. Both white and non-white students need to know about this. We clearly need a diversity of involvement in computing if we are going to have a chance as software that is fair to all.

After lunch, a GitHub Supporter Session: Scale your classroom with GitHub Classroom and Codespaces. A tough decision as there was also a panel I was interested in attending. I was curious about GitHub though so … The features of GitHub classroom including connections to LMSs, automated assignment distributing, auto grading and more seem pretty exciting. I also like the idea that students will create GitHub repositories that can act as a portfolio. The demo was great. I have set up a GitHub Classroom but I need to play around and try some things before I feel like I can use it. I think I need to create a “student account” as well. We’ll see how much time I can put to it.

Next up was a Microsoft Supporter Session: Core developer tools for your computer science classroom because I wanted to  see what Microsoft was promoting for educators to use for teaching CS. That was once my job.

They started with talking about VS Code and VS Code Coding packs are a tool to make it easy for students to set up a development environment. They are available to set up VS Code for Java, Python, and .NET. The packs for .NET and Java are available for both Windows and MacOS.

Next up was Development Containers and which is a web past development environment so no installation is needed. This combination makes it easy to ensure that all students have the same development environment. This looks pretty cool for bring your own devices schools. There was a lot presented in a short period of time. I need to dig into some of these things on my own.

Over all a great day for me. I have some things to look through tonight.

Thursday, March 03, 2022

SIGCSE 2022 Day 1

SIGCSE 2022 is my first in-person conference in over 2.5 years. It’s my first SIGCSE in a lot longer than that. It looks to be a great conference . There are 1518 people registered in total with 780 attending in person. I HAD to come in person. Honestly, I missed people and a lot of people I know in CS Education and CS Ed research are here. There is a lot to learn here as well.

The opening keynote was Barbara Liskov. This was a fascinating talk that covered a lot of the history of her work. She started publishing and researching what became object oriented programming while I was in the early stages of my career. Several papers she studied and referenced were published the year I got my undergraduate degree. I remember clearly many of the issues she discussed and problems she was looking to solve back then. I hope we can get access to her talk and show it to students.

My first session of the day was a panel discussion of should AP CS A switch to Python from Java. Needless to say, the room was full. The stick with Java people had two main issues. One was the work involved in changing – new resources, teaching aids, test questions, and the like. The second was that while there is a slight edge in universities using Python over Java for CS1, Java and C++ are FAR more widely used in CS2 courses. The current course results in students who do very well in CS2 and that is important.

The argument for Python is multiple. One is that it opens the door wider for using APIs for making more interesting projects. Another is that there is less syntactic “cruft” in Python which reduces cognitive load. A third is that Python is increasingly used in disciplines that are not computer science. For example the Physics and Chemistry departments are Stanford want their students to take a Python based CS1 course. FWIW, the school I retired from added Python in part because the Physics teachers encouraged it. I am finding the arguments for Python more convincing than I expected.

After lunch, It Seemed Like a Good Idea At The Time (COVID-19 Edition). The session opened with examples from the past: see if you can hack the department mail server; open book exams without a time limit; exponential time examples are actually cubic. Victoria Hong shared a study she did where she asked one section to write questions for the final exam. The cohort that wrote questions did worse on the final than the cohort that didn’t write questions. The opposite of what was expected. Ellen Spertus talked about a course without deadlines. This set off a lot of discussion about deadlines and the different ways to allow or not extensions. Some have tokens that students can use for an extension. I hope this was recorded because I can’t do the discussion justice here.

Next up for me was another panel: Advancing Opportunities for CS Teachers: How To Best Support Professional Development for Experienced Teachers in K-12 CS Education This session was hybrid which means that most of the panel was remote and not physically at the conference. More on that later perhaps.

Most professional development for CS teachers is focused on new and early career CS educators. We have a good number of experienced teachers (10+ years of teaching CS) and their needs and backgrounds tend to be different from new  CS teachers. A lot of the initial presentations was stating the problem.

Don’t tell anyone but I jumped out early and dropped in on a Special Session: K-12 Computing Education and Education Research Resources. Colleen Lewis talked about Computer Science Teaching Tips ( and a Teaching Practices Game. This can help teach about microaggressions. Briana Morrison introduced Engage CSEDU: which has a searchable database of CS Ed resources. Davina Pruitt-Mentle introduced NATIONAL INITIATIVE FOR CYBERSECURITY EDUCATION (NICE) which has a lot of resources for teaching and learning about cybersecurity. More information can be found at Cyberseek.

Got some dinner skipping the Birds of a Feather but I’ll go back for the reception. Overall, a very good day for me. Learned some things and connected with a bunch of great people. More tomorrow I expect. If you are reading this and at SIGCSE please look me up and say “hello.”

Thursday, February 24, 2022

Fun With Rounding Errors

I love xkcd cartoons. I came across this one thing morning that shows the benefits(?) or rounding up.

My immediate idea was “what a great programming project!”  One of the first “hello world” type of exercises I often assign is simple conversations. Fahrenheit to centigrade, miles to kilometers, etc. This is a step beyond that but with a difference. The difference is rounding up and its effect on accuracy.

This is a good program to use to introduce rounding in general but to also talk about how rounding errors can have a large impact when they occur over and over again.

This example uses velocity but I can imaging there are interesting results with weights, simple distances, and almost anything else that normally requires better than integer accuracy. Currency anyone? I’m thinking about trying that one because it involves money.

It might be interesting and educational to try the difference between rounding normally, always rounding up, and always rounding down.

What do you think? Anyone doing something like this? Would it be useful?

Wednesday, February 16, 2022

Troubles with Error Messages

Error messages, in theory, are there to help programmers. Of course there are problems with then in practice. With students, the biggest problem is that  they don’t read the messages. I’ve long ago lost count of the times a student told me they had an error but can’t tell me what it is (or was) because they closed it without reading it.  Getting students to read the message and to try to work out the problem themselves can be a struggle but one we have to attempt.

Even if they do read the message, messages are not always clear. Have you seen this poem?

Roses are red
Violets are blue
Missing {
at Line 32

Seems simple enough but that can be deceiving. Often the message doesn’t actually give the right line. The reasons for this can be complicated for a beginner, or even an experienced programmer, to understand. It is a constant source of frustration.  At least one knows that a missing curly brace is (probably) the problem even if we are not really sure where it is missing from.

Other messages are less helpful because the programmer lacks knowledge to understand the words being used.  Or the message just does a poor job of explaining the problem.

Why are error messages less than helpful? Many reasons. One is that error messages are not fun and interesting to write. There are also strict limitations on the number of characters allowed. Still another is that the person writing the message is often so familiar with the software and the error that they write something that, while meaningful to them, is somewhat opaque to people newer to the software.

Reading error messages is not just a problem for students of course. When I was doing technical support for professional developers I would regularly get calls asking to explain an error message. A little secret here – a good explanation could often be found in the documentation! More than once I just looked up a message and read from the documentation. Even the explanation in the documentation needs a little help sometimes but it is a great place to start.

When teaching beginners we don’t often spend a lot of time on error handling which means we don’t spend much time talking about writing good error messages.  We do ask students to write messages in programs about games over and winning and losing. Occasionally we have to suggest rather strongly that an error message that calls the user “an idiot” is perhaps not appropriate.

Perhaps we should spend a bit more time on error handling and as part of that talk about good error messages. Maybe if we had beginners talking about the error messages they see from their systems and how they could do better we;d get better error messages later when (if) they turn professional?

Regardless, I think error messages should be a bigger part of the conversation. Reading them, researching what they mean, and thinking about how they could be done better.

Thursday, January 27, 2022

What Do Computer Science Teachers Need For Professional Development

Mike Zamansky had a great post called Trends In Professional Development in CS - it's not all good. We’re still at a very interesting place in the development of computer science education.  The shortage of qualified CS teachers is becoming more acute and more and more schools and school systems attempt to expand CS education. Professional development is also growing as well As Mike reports a lot of it is from content providers who have a vested interest in promoting their content.

What do CS teachers really need for professional development? Learning about tools and established curriculum is helpful for sure. Increasingly though, we are seeing teachers without a strong CS background being asked to teach CS classes. Few would ask teachers who could not speak Spanish to teach AP Spanish but that doesn’t mean that teachers who don’t know a lot of CS aren’t asked to teach AP CS courses. Weird isn’t it?

So clearly a lot of teachers need content knowledge. Learning along with students using canned curriculum sort of works I suppose but to be that feels like everyone is going to get shortchanged.  We are starting to see more pre-service programs for CS teachers. The program Mike Zamansky is helping to build at Hunter College for example. And there is usually the option, time consuming and possibly expensive, of taking regular university CS courses. The key thing is that school systems have to be supportive (with time and money) for teachers to get this training. A week or two in the summer is not going to cut it for CS content anymore than a week or two is enough to prepare is Physics or Chemistry teacher.

The other thing CS teachers need to know is how to teach CS. Content alone isn’t enough. As someone who entered teaching with lots of CS knowledge but nothing more than having been a student in terms of how to teach. That’s not as much as some might think! Teaching CS is different from a lot of other subjects. Similar in some ways for sure but also different. Learning how to use specific curriculum is helpful and I have learned a lot from content providers over the years. We could do more. While pre-service programs are starting to come online and include this sort of thing there is still a shortage of such education for in-service teachers.

We’re starting to see more “how to teach” sessions in conferences like CSTA. The one I lead in 2020 was very well attended which suggests that there is demand. Books are starting to come out as well. Computer Science in K-12: An A-to-Z Handbook on Teaching Programming edited by Shuchi Grover is my favorite and one I recommend highly.

We still need a lot of research on how to teach computer science. That looks like it is increasing as well. That’s great especially if researchers share their results in ways that are accusable to teachers. Not all K-12 teachers have access to papers that are behind paywalls. I’m sure hoping to see more research based teaching techniques at CSTA this summer.

What do you want to see in CS teacher professional development? Who is doing it well? Any other books to recommend? Feel free to add in the comments.

Tuesday, January 25, 2022

Writing The Wordle Clone

Kelly Powers posted a Wordle project document on the AP CS A Teachers Facebook page. It’s solid as one would expect from Kelly who is just awesome. It inspired me to write my own Wordle clone to better understand what is involved from a student project perspective. Of course I did it my way.

A Wordle project must consist of several parts:

  • Pick a word
  • Accept a guess from the player
  • Analyze the player’s guess
    • Look for letters in the right place in the work
    • Look for letters in the word but not in the right place
    • Look for letters not in the target word
  • Give the player feedback
  • Repeat accept and analyze until player finds the work or had 6 tries
  • Report on end of game

Most of this is platform and language independent. The exception is giving the player feedback. I’ll get back to that.

Picking a word can be easy (a hard coded selection – great for debugging) or a little more involved (picking randomly from a list). The list can be a small array or a large one that involved reading from a file. Which you select depends mostly on where students are with regards to reading from files and filling arrays or array lists. I have links to two large lists of 5 letter words at the end of the post. The first is one that I use and is on my web page. The other is a larger list on GitHub.

Accepting the player guess can be as easy as reading a work from a line. Analyzing the word is the first place where students have to think things our. String methods like SubString for looking at individual letters, IndexOf for locating specific letters in a string, and others are very handy here. Once can create new arrays of a) letters that are in the right place b) letters in the word but not the right place, and c) letters not in the word at all can be useful. I’ve sure there are lots of other ways as well. Much will depend on how you display the results to the player.

Feedback! One can reprint the player’s guess with letters that are in the correct place in UPPERCASE, letters in the word but the wrong place in lowercase, and empty spaces for letters that are not in the word at all. That’s probably a great way if you are totally text based. If you are graphically minded, you can try to duplicate how the web based game displays results.

There are lost of graphic libraries that will let programmers display things graphically. Swing in Java, Processing (for Java or Python), as well as many online drag and drop tools will all do this. I worry that for most of them students spend more time on the graphics than on the nuts and bolts of the rest of the program.

I’ve gotten a bit, ok maybe more than a bit, spoiled using Visual Studio and Windows Form projects in Visual Basic or C#. That is what I used to program my solution (image right). I have 6 arrays of label boxes. Yes, I should have used a two dimensional array. That would have made some things easier but I was not trying to make the best version ever. A lot of beginning programming classes skip multi-dimension arrays as well so I wanted to see how it would be done without them.

As each letter of a guess was entered on the keyboard it was entered in a label box. After all 5 letters for a guess was entered I checked all the letters against the Wordle word and the back color of the box was changed appropriately. The result was pleasing.

Checking for a winner was a matter of checking the state of all 5 label boxes in the row array. This would be similar in a text based display as well.

All in all a very doable project for many programming classes. And it is current which I see as a plus. Additionally students will probably be very happy to play help debug their peer’s programs.

Monday, January 17, 2022

Computer Science for the sake of ?

My grandson in kindergarten has a class in reading. It makes sense as he is just learning how to read. Over time, school spends less time teaching how to read and a lot more time using using reading to support learning. For many years, I have been saying that computer science and its tools should be the same.

Early on I thought of things like using spreadsheets to look at data. More and more I see programming as a learning tool as well. But coming back to data. I recently watched a TEDx talk by Emmanuel Schanzer titled Four Ingredients for K-12 Data Science. Watch it. It’s cool. In any case, it is clear that Bootstrap Data Science takes things I used to think about to a whole new level.  I saw a presentation on this by students at a conference in the before times and was impressed with what students had learned.

Now Bootstrap is probably best known for their mix of computer science and algebra but they are moving into more areas of the curriculum and I think that is a great thing.

I’ve also mentioned Mark Guzdial’s work in teaspoon languages. (task-specific programming => TSP => Teaspoon) Mark’s work involves “adding a teaspoon of computing into other subjects.” It’s still some early days on this effort but it looks very promising.

Last spring, while I was teaching at a new (to me) school I spend some time with a teacher of astronomy. He was having his students write Python programs to solve astrophysics problems. Faster and more accurate than the slide rule stuff back in my day.

In many ways, I think the CS 4 All movement has been a bit too focused on stand alone computer science classes. Those have a role for sure and some great value. But ultimately, computer science is used in just about every discipline we have today. Teaching it in those various contexts and using CS to help learn those other areas of knowledge is were CS education can have its greatest impact. And greatest relevance. Finding more ways to do that should be a priority. Not just for CS bot for all areas of teaching and learning.

Wednesday, January 12, 2022

Planning Before Coding

After all these years one would think I would know better. But it turns out that when coding for fun I don’t always do the planning that I should. It always comes back to hurt me. If you have been reading this blog lately you know that I have been playing with a Wordle solver. It’s going well. But ..

I started well. I identified several thins my solver should look for:

  • Words that include letters I know are in the word
  • Words that don’t include letters I know are not in the word.
  • Words where a letter (or letters) are in specific positions
  • Words that include required letters that are not in positions I know they don't  belong

I coded up the first two options first and a partial implementation of the third option. So far so good. The problem came when I wanted to add an implementation of the fourth option and a more complete implementation of the third. The problem is that I had neglected to plan for where in the code I would do those checks. I tried tossing them in to the existing method but it was a mess. I had to change a good bit of the code around filtering words to make it both work and be more understandable.

In hindsight, I think I would have been better off creating stub methods for all the options and filling them in one by one. It’s a technique I recommend to students all the time so I should have thought of it myself. This would have given me a stronger framework from the beginning and made my life easier.

In any case, this exercise was a reminder not to start coding before enough of the planning has been done. I know the mod these days is to write fast and break things with a lot of rewriting. I find that to be less than ideal for me though.

Tuesday, January 11, 2022

How Do You Define a Computer Scientist

The last few days have seem some social media discussion about requirements for a computer scientist. Is Calculus a requirement? Is Assembly/machine language a requirement? Among the “yes” and “no” answers there are requests for a definition of a computer scientist. I doubt we could get agreement on a single definition. The mental image people have of a computer scientist is closely related to what knowledge they think a computer scientist should have.

In K-12 education I think we should be very careful and drawing too narrow a definition of a computer scientist. If truth there are many kinds of computer scientist and each kind has its own requirements.

Someone exploring the science of compiler design and code optimization probably does need a solid understanding of machine language. Someone whose focus is on machine learning probably doesn’t as their tools will be at a higher level than the machine. Computer cryptography could probably use a good dose of Calculus. As could some other focuses. Does someone studying user interface? Maybe not.

Should students focus on a special area while in (or before) high school? I don’t think so. They'll have more opportunity to find a focus later. Is Calculus useful? Sure, and for more than just computer science. But there isn’t much that students will do in your average HS CS course that requires it.

The same is true of assembly language. Assembly language clearly gives students greater understanding of the machine below. Some exposure to it is good for programmers and computer scientists. Should it be required? Again, probably not at any depth unless there is a specific need to it.

Back when I was learning CS we had a computer without the memory for an operating system. Programming in assembly language was required. I had to learn how to program subtraction, division, and multiplication on a machine that lacked built-in instructions for those operations. A great learning experience but not one I found much use for later in my (almost 50 year) career. I did work on some projects that required a firm knowledge of the execution speed of different instructions. And knowledge of assembly language helped there. But we don’t see that sort of need except in rare cases these days.

What was required knowledge 50 years ago may not be the same as required knowledge today.  We have to avoid the blind assumption that what we learned and the way we learned “back in the day” is the way things have to be today.

Friday, January 07, 2022

Wordle Solving For Fun and Coding

After my post the other day (Is Wordle A Project To Assign Students to Program?) I got thinking about solver help for Wordle. I happen to have a huge word list I got some somewhere some time ago. For various reasons I had written a program to make sub list files of words of a specific length. So of course I have a list of 5 letter words – something over 8,000 of them. So that is a start.

Phase one of my program was to find all the words that had a specific letter in a specific location. That narrows things down a bit was not near enough. Phase two was to ignore words that had specific letters which I knew were not in the correct answer. That was very helpful.

If I don’t know where any letters were I was not getting close enough. So I added a method to include all words that had specific letters in any position while ignoring words with specific other letters.

You would be surprised at how many 5 letter words have the same five letters but in different position by the way. On the other hand if you get enough information about what letters to exclude, what letters to include, and one or more letters with a specific location than finding the answer is pretty easy.

This was a fun (for me anyway) coding exercise. Will it be fun for students? I have no idea. Let me know if you have an opinion or try it with students.

Tuesday, January 04, 2022

Is Wordle A Project To Assign Students to Program?

Seems like a lot of people are playing Wordle on social media these days. Have you tried it? It’s a word/letter version of old Mastermind game The idea is that you enter a five letter word and the game tells you if you have a letter from the word in the correct place (green highlight), a letter from the word in the wrong place (gold highlight), or a letter that isn’t in the word (grey highlight). You have 6 attempts to get it right.

You can read more about the game many places but I read about it here.

It’s a fun game to play especially if word puzzles are your thing. I’ve had students program Mastermind in the past. It goes pretty well. This might be a fun variation for students as well. The current tie in with social media may be a plus as well.

Oh, wait, can we program the computer to solve Wordles?