Wednesday, September 28, 2022

How Far We Have Come With Programming Languages

Last night I had a dream during which someone suggested that COBOL would make a good first programming language. They tried to promote the data division and English language syntax as plusses. When I shared this on social media it got a lot of laughs. Few would take this as a serious idea and with good reason.

We used to joke that the hardest part of programming in COBOL was learning how to spell environment. (You had to be there) But really that data division was a bear to get right. The cognitive load was a lot for beginners. Today they are some who think that static variable declarations are enough cognitive load to hold students back and COBOL was a lot of effort.

COBOL is still around and I understand that it has changed somewhat. I thought that “Structured Programming in COBOL” (there was such a book) was a stretch but object oriented  COBOL just boggles my mind.

Most of the people in my age group in the industry have some experience with COBOL. For more than a few it was the first or second or, as in my case, third programming language. Learning multiple programming languages was a big thing early in my career. FORTRAN, COBOL, BASIC, and C (before C++)  were all a part of many people’s tool box. I worked on one project that had code in all four of those languages plus PASCAL.

Today we have a lot of new languages. C++. C#, Java, JavaScript, Rust, and I could go on and on. Today’s languages have more and more powerful decision structures, looping structures and libraries that do things for us that we used to have to program ourselves. We have improved error handling, the ability to use classes and objects, and many other cool features. That doesn’t even touch on powerful IDEs and the ability to compile and get results in seconds rather than hours and days.

With power often comes complexity. Complexity means cognitive load and potential for confusion and errors. We walk a fine line determining what to teach and how to prevent students from getting overloaded. It’s an exciting time to be teaching for sure.

Thursday, September 22, 2022

Dealing With Student Misconceptions

I was reading through The Big Book of Computing Pedagogy, as one does, the other night. Specifically, the section on student misconceptions. Misconceptions are one of my favorite topics in teaching computer science. The articles in this book are very helpful in understanding what student misbelieve and why they do so.

I’ve seen students with all of the common misconceptions and, of course, I try my best to help them overcome them before they get students into trouble.I tried to remember if I experienced any of them myself but memory of 50 years ago is very selective. What I do remember is that I had some experiences of getting very close to the hardware early on. While my first course was learning FORTRAN the computer we used required some extra (compared to today) to run. Specifically, it requires that one toggle in some instruction in binary using toggle switches to get it to read in a couple of punch cards that did the next phase of the boot up.

Not long after I learned the first two of what would be 7 or 8 assembly languages over my career. There is something about toggling a memory address so that one could read (in binary lights) or enter information in binary with those same switches to program a computer that give one a good understanding of what memory actually is.t

Those days are long gone of course and while assembly language still gets one close to the computer and gives an understanding of how things like memory work it can also be a gate or barrier to students. It’s actually not the ideal way to understand concepts that one might think. It’s not the sort of visual experience that today’s students are used to learning from.

What we really need is some better visualization tools for introducing concepts. My first thought was using debugging tools such as those built into tools like Visual Studio. One can single step though instructions and view the contents of memory (variable) locations. It works but it is slow and tedious. That may be fine for debugging but for learning it has a high cognitive load that gets in the way of what we’re trying to do in teaching.

So I have been thinking about how to create visualizations that are simple to use and that might help clear up misconceptions. Two things my thinking is focusing on are how variables and memory work and how loops and loop control variables work. Eventually I have to narrow it down to one of them to start. I should probably look at what might already be available first. I thought I would start by asking you, my readers, for suggestions. So, any ideas? How do you help students visualize these concepts? Any suggestions on tools for creating visualizations?

Tuesday, September 20, 2022

Coding It Yourself Can Be Fun

Every couple of weeks I bake a couple of loaves of bread. The bread mostly gets used for breakfast sandwiches. Now my bread does not look as perfect as what I could get in a bakery. And the bagels? Once in a while I try my hand at bagels, don’t look anything close to what I get at my favorite bagel place. But they all taste good and I find it very satisfying to make it myself.

Coding can be a bit the same. Not everyone writes professional looking (or performing) code but sometimes there is some satisfaction in having a program that works just they way you want it to and does just what you need. Maybe it is not “release to the public” neat and tidy. It may be what we used to call a “programmers program.” In other words, a program that only the programmer who write it could (or would) use. My Wordle solver helper program is one such. It works great – for me. It doesn’t have the error checking a released program should have. And maybe it should start at one and not zero. But it works great for me.

Programming is basically stating a process or method using computer code. My Wordle solver represents my thinking of how I think Wordle could be solved. It was fun to write and is fun to use. It’s not ready for prime time though. Does that make it a bad program? No more than my imperfect bread or bagels are bad. They both meet my needs and that, for me, for these, is all that matters.

In some ways, that is the message we may want to pass on to students. Many, perhaps most, of our students will not become professional software developers. They may still write code for their own tasks or interests though. We need to help them enjoy that experience. One way to do this is to assign projects that are interesting to the student. Open ended projects are good for this but even better is letting students select their own projects.

For semester ending projects, I used to allow students to select from a list of suggested projects and also to have the option to design their own projects (after discussion with the teacher) that solved a problem that they were interested in solving.  Helping students find the fun and satisfaction in solving an assignment promotes their learning. And, I hope, helps them think of computer science as worth doing for themselves.

Saturday, September 03, 2022

Names Have Power – Names and Programming

"A rose by any other name would smell as sweet" William Shakespeare.

There are cultures where people have a sort of public name and a secret or true name that is rarely shared because knowing ones true name gives people power over them.  In fact, knowing a name is powerful in all cultures. Consider the difference between calling “hey you” versus calling a child by their actual name. Which way draws them up sharp?

Naming is important in computer programming as well. It’s not always as easy or as simple as beginners assume it is. Mike Zamansky’s post Subtle Errors gives a good example.  Having more than one item with the same name causes the sort of ambiguity that computers do not handle well. Some names (identifiers as we often call them in programming) have special meanings. Getting names slightly wrong can cause other problems.

A name can provide a great deal of information to a programmer. To the compiler names are pointers to more information. A variable name identifies a location to the computer. Other information about the data stored in that location is specified in other ways. The computer doesn’t care what characters make up the name. That it is unique is important but not the characters involved. In many programming languages the case of the letters makes two names completely different. People tend to see them as identical.

Beginners often think that “the computer” pays attention to everything in a program the same way people do. That’s not the case though. I’ve had students write comments in their code believing that the computer will read the comment and perform the action. They may also assume that naming conventions, starting all integer valuable names with “int” for example, will influence the computer. Again, not usually the case.

[Note: back in the day, any variable starting with one of the letters “I” through “n” was automatically an integer.]

Names/identifiers can communicate a lot of information to programmers. They are pretty important for sure.It is easy to gloss over them and minimize their importance. Getting them right though is something worth spending time on.

Wednesday, August 17, 2022

A Spoon Full of Computer Science

I was thinking about data science lately. The problem is that I don’t know much about data science. I learned about data bases in school and worked with them some in industry but that was mostly about how they work internally. I used to give talks on how B* Trees worked and I could (back then) give serious talks on how databases do journaling. But I never did much of anything with real work data applications. Not professionally at lease. But I do like playing around with data and Excel is my friend.

So my first thought was to look at Bootstrap’s data Science curriculum. I did find their definition:

data science the science of collecting, organizing, and drawing general conclusions from data, with the help of computers.

Sounds good to me. I guess I have been doing some data science after all.

Looking though the curriculum had me thinking about Mark Guzdial's work with teaspoon languages. It feels like there are some things Bootstrap and Teaspoon languages have in common. The idea of teaspoon languages is to add some computer science to other subjects to broaden participation in CS. Bootstrap is using data sets from other subjects in their curriculum. So both are using CS and programming to help students learn about a lot more than just computer science or the subject they are taking. Note that Bootstrap also has Bootstrap Physics! and Bootstrap Algebra.

While I was doing all this thinking Mike Zamansky posted this post - Teaching CS - How early and how often? Mike askes a lot of practical questions about fitting CS into grades k through 8. It’s easy for us zealots to say that CS should be in every grade and expect K8 teachers to make magic but that is not really fair to anyone. Maybe the answer is to have some teaspoons of CS in existing subjects. It doesn’t make a lot of sense unless adding this CS makes learning the subject it is imbedded into better though.

We’ve seen for years in higher education that computer science and [some other area of study] can be a big win. Can we move some of that down to lower grades? Probably though it is going to take some time and some innovation. It’s worth doing, in my not so humble opinion. We use math in other subjects. We use reading and writing in every subject. Might not CS help teach/lean a lot more subjects than just programming? I think so.

Tuesday, August 16, 2022

Artificial Intelligence and CS Education

It;s seems like artificial intelligence has been “10 years away” for the last 40 years. Back in the mini computer days every computer was custom and configurations were designed by people. I worked for a company that believed that configuring computers was beyond the ability of computer software. From there I went to a different company that was developing rules based artificial intelligence. Using a special language called OPS5 they wrote software that configured computers faster and more accurately than people. Rules based AI was dependent on people to know the rules and properly prognathism. Limitations became apparent.

Today we have machine learning which basically means the computer is developing the rules. Rules is probably not the best definition though. We’re starting to see AI grow into many more areas than ever before. Think self driving cars for example. It’s becoming clear that understanding the world today means understanding something about artificial intelligence. What does that mean for K-12 computer science education?

The AI3K12 project is working on answering questions about teaching AI in K12. They have a lot of resources now and under development.

For now, most of the education is about AI. What it is. How it worse conceptually. What is  it being used for. And, perhaps most importantly, what does AI mean for society and the future. The math and science of creating AI platforms s a bit too much for most high school students let alone younger students. That can wait. Although there are tools that exist that students can use for their own projects which is pretty cool.

I am very concerned about bias in artificial intelligence (Bias in Artificial Intelligence. Inequality, racism and discrimination is just one article you will find from an internet search for “Bias in artificial intelligence) Systems that do not recognize that people of color are actually people is only one example Bias against women or various other groups of people can be baked into AI systems if developers are not VERY careful.

Also, how is AI being used? Facial recognition and privacy have become areas of concern in many areas and applications. 

These are more than just ethical issues, though ethics has got to be a core part of what we teach, as many other problems are unconscious bias or the result of innocent but false assumptions made by people who mean well but lack understanding of their own environment. Its a reason we need a lot more diversity is AI and CS as a whole. We have to teach students to think about these issues and to think beyond their own identities and beyond “the way we have always done it.”

Companies in industry are taking new looks at AI as well. One useful resource is Microsoft's framework for building AI systems responsibly - Microsoft On the Issues. The blog post talks about some issues Microsoft has faced and how they are addressing them. Companies are asking the “should me” question as well as the “can we” question. We need students to think about those questions from the start. The document itself is at Microsoft-Responsible-AI-Standard-v2-General-Requirements-3.pdf and makes interesting reading. It could start some class discussions as well.

Saturday, August 13, 2022

Cyber Security and CS Education

Way back in time, cybersecurity was all about controlling access to the computer in the locked room with the raised floor. Well, you had to trust the people you did let in of course. I will not say much about the students I went t university with who competed to create the best, most realistic login emulator to steal passwords because, you know, that was all in fun. Later in life I actually had supporting the real login software as part of my job responsibility.

We were more aware of security by then. It was the real world. We spent a lot of design time on our various OS subsystems to make sure that access was verified and that people could only access what they were authorized to access. Dial in lines and then networks made things a bit more risky. I remember one system that required a second password of 16 random characters that changed every 5 or ten minutes (I forget which). Someone broke in anyway. Social engineering not technical engineering. People were and are still the weak link in computer security.

In the early days few people had access to a computer. Fewer still had technical knowledge enough to crack into systems And most of them were (it seems) fairly trust worthy. As more people got access to both computers and knowledge breaking into systems became more common.

Today there is a lot of talk about cybersecurity and the need for more people to be trained in the field. What does that mean for high schools? For one thing, it means a lot of people are saying that high schools should teach it. What teaching cybersecurity means is a question with still developing answers.

Should schools offer a whole course in it or can they cover enough in an existing course? If a full course, a semester? A year? Some part of a year? You’ll get a lot of answers but little in the way of a consensus. A lot of discussion about this on Facebook group for  Cybersecurity Educators. Resources at CYBER.ORG are helpful as well.

For now, individual schools are making their own decisions. These decisions are based on things like teacher knowledge to teach such information, room in the schedule, and resources available. Some school IT departments are not willing to let students experiment on networks in a school. Or even, in some cases, to have students learn about network vulnerabilities! I suspect that career technical schools are going to be the main source of high school courses in cybersecurity. There is less focus on AP exams and more focus on preparing students for the work force sooner rather than later. Oh yeah, colleges and universities but they are not my focus.

Comprehensive high schools are more likely to add some cyber security information into existing courses. AP CS Principles for example. A few will have longer courses but I suspect most of those will be independent high schools and charters as they have fewer restrictions and their politics is different. (Different does not always mean better or worse to be clear.)

Maybe when (if?) we get to a place where the learning of coding is done well enough and deep enough in middle school we can move away from HS courses that “just” teaching programming and start using that programming to learn about other things in computer science. Like cybersecurity. Like data science (although we are seeing some of that in middle school already (Bootstrap:Data Science ) which is pretty exciting. And like more artificial intelligence.

Programming is cool (to me) and important (to everyone!) but there is more to computer science than programming. Security is an important part of that and high school CS educators have to have it on their radar and give serious thought to bringing it into their curriculum.