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 go 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?