Sunday, December 01, 2024

December Adventure–Write some Code Everyday

Eugene Wallingford let me in on A December Adventure  From the website “The December Adventure is low key. The goal is to write a little bit of code every day in December.”

It’s sort of like an Advent of Code but not as intense or competitive. I love the idea of the Advent of Code but it’s more work than I want to put into something. On the other hand, I like to idea of spending a bit of time on a new project every day.

Of course now I have to come up with and good project idea. I have been working on my Hexapawn game and it is tempting to just work on that a bit more. It still needs work.

It may be time to try something new for the month though. Maybe something Christmas related. Any ideas?

Tuesday, November 26, 2024

Hour of Code and Corporate Involvement in CS Education

An interesting article was shared on Facebook recently -Is the 'Hour of Code' the New 30-Minute Saturday Morning Cartoon Commercial? Take a look at it. It may make you think.

One statement there is that "corporate-sponsored Hour of Code tutorials for the nation's schoolchildren have blurred the lines between coding lessons and product infomercials." Well, that is something to think about. Blurred or crossed?

Those who know me know that for over nine years I worked for a big tech company supporting computer science educators. So clearly, I think that a lot of "big tech" involvement is a good thing. Is it now manipulating children? Well, that gets interesting.

BTW I am also friendly with people at Code.Org and have done work for them in the past. While I don’t/haven’t agreed with them on everything I think they are good people with good motivations. Just being clear on my biases here.

First off, I think there is a big a difference between Hour of Code and Saturday morning cartoons. Prime among those differences is teacher involvement. Teachers are the gateway to Hour of Code. And in fact, they are the gateway to just about all tech influence in CS education. While there may be some students finding and participating in Hour of Code, most students use Hour of Code in the context of the classroom, computer lab, or library under adult supervision.

My understanding is that many of these product placement modules in Hour of Code are solicited to attract/interest students in learning computer science. Put another way, computer science is the product and Minecraft or Disney characters are the show bringing the audience. In a sense, Computer Science is the advertisement and the corporate tool/characters are the show.

Does doing a Minecraft Hour of Code encourage students to play more Minecraft? Perhaps. Though my ten year old grandson hardly needs more encouragement as it is.

This can be a slippery slope or course. Where is the line between promoting computer science and promoting a commercial product? That’s hardly unique to Hour of Code. My grandson has a Chromebook because that is what his school uses. I doubt that is the only product that children want because they see it or use it at school. I trust teachers to be a good influence on their students. I don’t see they becoming salespeople for the companies helping support Hour of Code. I think they know when to encourage and when to point in other directions.

Companies know that Hour of Code is a gateway towards learning computer science. They see that as a good thing. If that leads to more students interested in their products as well I am sure they are happy about that. But they are still selling computer science first. Blurry lines are not the same as crossed. We should keep an eye on that though.

Monday, November 25, 2024

Artificial Intelligence Machine Learning and Hexapawn

A presenter at the recent New England CSTA New England Conference mentioned the game Hexapawn.  Hexapawn is hardly new. It was first introduced in 1962. I first ran into it in the early 1970s and found it to be an interesting challenge. One I was to intimidated to try at the the time Be that as it may, the paper introducing Hexapawn used it as something that was open to what we call today machine learning. That is to say, the more one plays it the better the computer gets at playing. The term my professor uses was heuristic programming.. Machine learning is a more accurate term for programs that learn though.

When I think about it, we were learning about artificial intelligence 50 years ago. Progress has been slow. It seems like “true AI” has been ten years away for all of that time. I am skeptical that we are there yet though clearly we are getting closer.

Returning to Hexapawn. There are several ways one can build code to play against a person. One way, the way involving machine learning is for the program to save every move and evaluate if it leads two a win or a loss. Each game leads to moves that are clearly not going to win and others that are more likely to win. This information influences each new game.

An other way is to hard code in moves based on a set of rules. I confess to playing with this strategy a bit. For example, a rule might be as simple as “if there is a move that places a piece in the wining row – take it.” Or perhaps, “if a move prevents the human from moving – take it.”

Rule based AI had a period of popularity especially in the 1980s. OPS5 was a rules based programming language that was used to create an “expert system” to configure computers. Configuring computers back in the mini computer era was a complex process. I worked for one company that believed that configuring computers was to difficult a task for computers. Configuring computers was an important part of my job there. When I left there and went to work for Digital Equipment Corporation I found that they had solved that question.

Which method is better for a game like Hexapawn? Programming rules based seems a little easier. It probably works for a limited game like Hexapawn but I doubt it scales. A machine learning program probably takes more initial work. In the long run it probably results in a more reliable winning game.

Hexapawn is a small enough project that it probably makes a project for helping students write actual artificial intelligence code. Are you using it?

FWIW I blogged about Hexapawn several years ago at Hexapawn–An Interesting Programming Project

Thursday, November 21, 2024

Interested in Industry Visitors to Your CS Class?

I get interesting messages from all sorts of places. Recently, I received this message on LinkedIn. I love the idea of bringing industry professionals in to talk to students. If you’re interested, check out their web  page and use their contact form.

  • I’m a software engineer at Microsoft and a volunteer computer science teacher at Kansas State School for the Blind

  • Outside of work, I’m starting a free initiative to bring guest speakers from the tech industry into high school, community college, or university classrooms or clubs to share their experience and do a q&a.

  • It’s called Insight Crew:https://insightcrew.org/

Tuesday, November 19, 2024

Online Programming Environments are Poor Preparation

Got your attention didn’t I? More and more teachers are using online coding environments to teach computer science. I used one myself to teach Advanced Placement Computer Scie3nce Principles. I’m not sure I did the right thing. Let me explain.

Recently I attended a panel talk at the CSTA New England conference on what high school teachers could do to better prepare students for university level computer science. Yes, I know that not all of our students will take CS in university but a great many of them will. So what did university people suggest?

As with most things, it’s complicated. Apparently, university professors are finding that students do not know how to do some simple things like deal with file directories or install software or use installed IDEs. Phones and apps are responsible for a lot of this. Students do not know where there work is stored or how to move files to a download location.  Some universities have actually added class modules to help here. Yes, remedial computer usage! Do your students need that?

They are also struggling with the tools that university professors expect them to use. Like installed IDEs. In university, students are expected to use IDEs like Eclipse, Visual Studio, Visual Studio Code or others. They are also expected to know where the files are being placed. They do not learn any of that with online IDEs.

Now I understand that for teachers working with incompetent IT departments, of which there seem to be far to many, are limited to online IDEs. It seems like IT departments are often the biggest obstacle to teaching computer science. But teachers need to fight back more. Teachers who can use installed IDEs should do so.

Online IDEs really do to much. Or perhaps I should say that they hide to much from students.  I am not advocating going back to the punch card days, fun as that might be, but we need students to get closer to what universities and industry are doing if preparation for later CS is our goal. And it should be a goal.

Installed IDEs do a lot for students. That’s true. They also force students to do a lot for themselves. That’s good. It helps them later on.

Monday, November 18, 2024

Does AI Mean The End Of Teaching Programming

The tl;dr of it is no. At least not yet. As more and more people use artificial intelligent agents to help write code we’re learning that AI is not quite all there yet. Take this article from CIO magazine Devs gaining little (if anything) from AI coding assistants

It appears that there is still a lot of need for people who know how to code to do debugging and tuning or AI generated code.

My former students who are developers tell me that they are using AI quite a bit. And they say it helps them. No one has said they have been replaced by AI yet. Frankly, I don’t see that coming anytime soon.

A professor from a major university told me about a study where students were asked to write secure code. Half were told to do it on their own while half were told they could use AI. The students without AI wrote more secure and less buggy code.

More research needs to be done and we can argue over research methods as well. But I think that the jury is still out on AI. Will it get better? Probably. Will AI reduce the need for human programmers? I don’t think we have that answer yet. For the time being though we’re going to need actual people involved in the software development arena.

Sunday, November 17, 2024

Changes in Social Media Where to Find Me

It appears that a lot of people are leaving X (formerly Twitter) I confess to being one of them. Frankly, X isn’t the same for me. A lot of people seem to be moving to BlueSky and I have created an account there. You can find me at @alfredtwo.bsky.social I am trying to get the #CSed hashtag as a popular way to connect with other computer science educators. If you are on BlueSky, I hope you will join me.

I am on Threads and Instagram as well.