And now, a real life example


One of the things about being a computer science teacher is that you’re always looking for program ideas that will engage students. I never had a decent textbook so just about everything that we did was from my mind.

A lot of times, I’d take problems from university and modify them to be appropriate but, for the most part, they were ideas that I came up with. I wasn’t alone and a few others in the board would share ideas when we got together for PD days. You know what they say about necessity…

One of the really enjoyable problems that we did was taking a message and encoding it so that it wasn’t readable by others. Of course, going along with that was another program that would take an encoded message and decode it. The students found them fun to write and fun to send messages to each other that I couldn’t read!

Photo by Markus Spiske on Unsplash

It met one of the requirements in the Grade 11 course and that was to understand ASCII codes. You know, the letter A is character 65, B is character 66, etc.

The algorithm was fairly straightforward (in my mind)…

  • read the string to be encoded
  • extract the first letter and add a number to its ASCII code
    • if that number went past Z (ASCII 90), then wrap around and start at the beginning of the ASCII codes again
  • convert the resulting number into its ASCII code
  • concatenate that letter to the secret message
  • repeat until the message is complete encoded

Then, you’d send the encoded message to a friend and the number used to decode it in a separate message. (that led to an interesting discussion about security)

For most of the students, that wasn’t enough. They wanted more security and so added expressions for the encoding/decoding and a couple even wrote a program to try and “hack” one of their classmate’s messages. If I didn’t have a due date set, I’m sure we could have milked that one for an entire year.

Now, the whole idea for the program was probably given by me and I’m not egotistical enough to think I made it up originally; I would have got the idea from somewhere else and that’s OK.

One of the things that I never got was “Sir, when are we ever going to use this?” They could see it being of value.

The other day, I read an article that absolutely put this into perspective.

How to Validate Credit Card Numbers Using Regular Expressions

I think we all know that those numbers on our credit cards aren’t just random. This is a fascinating read that shows how the algorithms are created and it provides the Regex and Python code to do the deed. Even if you don’t develop a program to do this, it’s a great read for students.

Problems like this highlight another challenge of teaching computer science. Especially with computers, it’s easy to send your code to someone else. Or, in this case, just copy it from the article.

The answer to this is why it’s important to have a teacher in the classroom and not just mail the answer in. A teacher will sit next to a student and ask for an explanation of the solution to the problem. Or, go ahead and modify the problem requirements just even so slightly and see if they know enough of the algorithm to make the changes.

This could just be the start of something good. Like maybe talking more about encryption and checksums. In a world where hard cash money is used less and less and replaced with plastic, it most certainly is a relevant activity that will pay off.

Advertisement

A coding resource


Apple CEO Tim Cook says coding should be taught as early as elementary school: ‘It’s the most important language you can learn’

Why elementary and high school students should learn computer programming

I included this in last week’s This Week in Ontario Edublogs post but felt I needed to make it stand alone as so many people look for resources and inspiration. There are resources, good and bad, all over the internet. They might apply in other classrooms but not yours.

It’s from TVOntario –


So many educators throughout the province are cutting their teeth with “Coding” in the Classroom this year. Some may have never thought it would ever happen but it has.

This resource, on the TVO Outreach site with resources for people looking for a nice, Ontario way to get started. They address our curriculum and talk about strategies that should be part of everyone’s teaching toolkit already.

All you need to do is pick a place to start.

CODING IN K-12 EDUCATION

PRIMARY (GRADES 1-3)

JUNIOR (GRADES 4-6)

INTERMEDIATE (GRADES 7-8, 9)


This Week in Ontario Edublogs


I’ve been resisting turning on the furnace this week. I will confess to wearing my Bring IT, Together jacket, a toque, and gloves while walking the dog in the morning. The promise is that this weekend is going to be great weather. I hope so as we have an outdoor wedding to attend.

Happy End of September.


More Than an Educator

As I mentioned on the voicEd Radio show, this is a concept that isn’t taught in depth at the Faculty of Education but really should be.

Every teacher wants to be the best that they can be. That goes without saying when you enter the profession.

However, Amanda’s post reminds us that you are more than that as a person. Your job is only one part of you and there’s so much more that you have going on. Teaching is a profession that will entirely eat you alive if you let it.

Amanda tells us that mindfulness is something that helped her. You’ve got to believe that it makes her that better person she wants to be and I can’t help but believe that it makes her a better teacher as well.


it can wait

I really enjoyed this post from Will. It should serve us all as a reminder that, as we rush to return to normal, what’s the rush? Is there a rush for returning too quickly?

Thank you for resisting those urges to get down to business so quickly.
It can wait.

As the teacher in the room, you’re not the only one who has been off your game for the past few years. Those kids are too. I’m reading all over the place that concentrating on work and getting the job done is so hard for students, particularly from teachers who want “normal”.

Will includes a pretty interesting list of things that would be second nature four or five years ago and now seem strangely useless in the context of this whole post.

It’s time to stop and reflect on what’s really important. Giving up a little of the hard-core academics and focusing on relationships will undoubtedly pay off in the long run.


Food for Thought

There have been a lot of reviews (thinking Michelin here) about restaurants in Toronto. Oddly, none of them have a drive-through…

Diana gives us a lovely collection of thoughts and wonders about a number of things restauranty.

  • Famous Food
  • Surprise Food (including kitchen duties)
  • Connecting over Food
  • Photographic Food

It’s a great discussion about food but there’s a deeper message here.

  • this is a terrific example of writing and then pausing to wonder about each of the writings – could you use this technique in class?
  • something that isn’t talked much about anymore is copyright infringement of images – read the post and you’ll see how she deals with that personally

I can’t help but think that her experience mirrors many elementary school throughout the province.


Creating a Sensory Wall for Children

This secondary school computer science teacher was completely out of his element here when Deanna talks about the process that she uses to create a sensory wall as the focal point in her classroom.

I enjoyed reading about how she gathered, measured, and crafted this.

Thanks, Deanna McLennan

Why?

Because it’s the right thing to do. She has students that need it.

Read the post and celebrate the success that she enjoyed and then perhaps think about the things that you’ve personally done to make things better at your own expense and efforts. Deanna and I had the same employer and I don’t recall any of this being on the bulk order list.


Wordlers rejoice! This one’s for you!

Trust Doug to write something completely off the wall.

In this case, it’s an article for/about Wordle fanatics (of which, I guess I’m one) and there’s a little editorial content from Doug here.

At least I think so.

He’s taken what’s probably a good blog post and replaced all the five-letter words with Wordle-like puzzles to solve.

I spend far too much time reading and trying to “solve” this blog. He didn’t say that all my guesses were wrong; just the one that I used six letters for.


Coding in the Classroom

I’ll confess and admit that I started typing “Derek” and probably only a Floyd or an RCAC member would understand…

So many educators throughout the province are cutting their teeth with “Coding” in the Classroom this year. Some may have never thought it would ever happen but it has.

The Floyds have created this resource on the TVO Outreach site with resources for people looking for a nice, Ontario way to get started. They address our curriculum and talk about strategies that should be part of everyone’s teaching toolkit already.

All you need to do is pick a place to start.

Coding in K-12 Education

Primary (Grades 1-3)

Junior (Grades 4-6)

Intermediate (Grades 7-8, 9)


September Leaves

Diane’s post wonderfully describes the experience that many second or more language learners have once dropped in a classroom where other languages are spoken.

I loved the reference to how important our first language is and how it helps define an identity. Through the eyes of “Farah”, she describes some classroom experiences and responses that could have happened in any classroom. When the eyes “widen”, your teacher heart has to warm up.

There’s a wonderful description of the process of moving from an “English-only school environment to a framework of multilingualism”.

The blank leaves are a powerful point in this whole post.

Click through, read, and enjoy.


I hope that you can find some time this weekend to click through and enjoy all these terrific posts. Drop them a comment and then follow them on Twitter. Also, follow their blogs in your blog reader.

  • Amanda Hardy
  • Will Gourley – @WillGourley
  • Diana Maliszewski – @MzMollyTL
  • Deanna McLennan – @McLennan1977
  • Doug McDowall – @dougzone2_1
  • Lisa Anne Floyd – @lisaannefloyd
  • Steven Floyd – @stevenpfloyd
  • Diane Kim

This Week in Ontario Edublogs
Wednesday mornings on voicEd Radio

Style


I was going to title this “What would Kernighan and Plauger say?” but thought that the reference might be a little obtuse.

There’s an old saying that goes back to my early days “If a computer program was hard to write, it should be hard to read” or something like that. I still remember a professor leading into the topic of documentation with that and then convinced us that programming should be anything but that. You should be able to pick up anyone else’s work, look at the documentation and the code, and understand or modify to your own needs.

The book “The Elements of Programming Style” by Kernighan and Plauger was a required book for the course. I’ve read and discarded more textbooks than I should but I still have that one on my bookshelf. It was required reading for the course.

Throughout, there is a really deep discussion about how the appropriate style makes a program more desirable and readable. They inject bits of advice into the Fortran and PL/1 code. (yeah, I know…)

  • 10.0 times 0.1 is hardly ever 1.0.
  • 7/8 is zero while 7.0/8.0 is not zero.

And, of course, there’s lots more.

On Saturdays, I have a “Zoom Beer” with my friend Philip who teaches Computer Science at the university level. We had a chat about the style or lack of it that so many new students have when they’re writing code. His concern was the use of drag and drop programming languages which, while they can do amazing things, don’t necessarily force you to develop a style.

Some students take time to organize and kind of document their work.

Others come from the mindset that as long as it works, it’s good. Or, close enough is good enough.

I think that it’s worth consideration for all those who are going to incorporate coding into their classroom. It’s easy to sit in a presentation or a workshop and make something do some cool things. But, should students and teachers be satisfied with that? Does this develop enough skill to move on to bigger and better things?

We talk about design and style in all subject areas. There are expectations about what it should look like and how to assess things.

How do you assess “close enough is good enough”?

Proud


Unless I make a mistake and forget to schedule this post for tomorrow, I just gave away today’s Canuckle’s puzzle answer!

Playing the game has been a part of my morning gaming routine since I discovered the game (actually prompted by a Twitter message). For a while, I shared my success but then stopped because I figured I was noisy enough on social media in the mornings anyway. I don’t think I missed a day.

I really enjoy these types of word games but Canuckle was just a bit more special because the solutions had something to do with being Canadian and there was always a message explaining the answer! Dare I say you could learn something by playing the game.

Recently, I noticed that there was a countdown notice to the game and the message today revealed that this was the final round of the game. Kudos for the success.

In addition to the notice that things are now done, there’s something you won’t find in any other game. There’s a list of all the words used during its run here.

And the “fun fact” that went with each of the words is there as well. If you’d like to replay, there is an archive of all the games as well so you can go back to game 1.

It’s a great ending to a great game. Maybe. If you read the blog, we’re teased that there might be something else coming. After all, good code is too precious to let go to waste.

Stay tuned!