tag:blogger.com,1999:blog-186776872024-03-13T05:26:21.817-04:00Computer Science TeacherThis is Alfred Thompson's blog about computer science education and related topics. Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.comBlogger1588125tag:blogger.com,1999:blog-18677687.post-78107849748271035652024-02-27T11:13:00.001-05:002024-02-27T11:13:52.467-05:00Alphabet? What alphabet?<p>I used to start a talk on internationalization of code with the question “How many letters are in the alphabet?” Once I had several people say “26” I would ask “Shouldn’t you ask ‘what alphabet’ first?” I would then discuss some different alphabets and how many more or fewer letters they had. Then briefly mention that not all alphabets look the same. That’s is why ASCII is not good enough.</p><p>Today I ran across the following graphic. I wish I’d had it back in the classroom.</p><p><img src="http://www.acthompson.net/images/blog/script.jpg"></p><p>Who knew there were so many diffe3rent scripts? I suspect that are many more not on this list of course. Let’s not forget that some them are read left to right and not right to left.</p><p>Are you discussing multiple scripts and alphabets with students? It can bring up some interesting questions. And widen ones experience. If you are lucky enough to have students who are familiar with these non-Roman script languages ask them to explain how sorting of words happens. I had Chinese exchange students who were happy to explain how Chinese words are sorted. Short answer is by the strokes that make up the words.</p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com1tag:blogger.com,1999:blog-18677687.post-79843359579353592042024-02-18T12:59:00.001-05:002024-02-18T12:59:11.836-05:00AI Debuggers?<p>A meme was posted (by Doug Peterson I believe) asking why if the computer knows there is a semi colon missing that the computer doesn’t add it? It’s a good question and I think it gets asked pretty often. The answer is that the computer doesn’t always know where exactly the semi colon belongs. Or if there are other possible answers to the error.</p><p>Compiler parsers aren’t always helpful as we’d like. There are several parts to most compilers or interpreters. Parsing is the most visible of these parts. Typically, compiler developers seems to spend the most time and effort on the backend part that generates the actual executable code. There has been amazing progress in backend code generators. It is unlikely that even the best assembly language programmer can do better than compilers except in rare cases.</p><p>The front end, the code parsing that shows syntax errors has not been as big a focus. That seems to be changing and I expect that the inclusion of artificial intelligence may help improve things.</p><p>I experimented a bit this morning using Visual Studio. I entered some erroneous code and looked at the results. The code I used was a missing semi colon and a loop with no executable code.</p><p align="center">for (int i = 0; i < 10; i++) </p><p>I was given the expected “; expected” but I also received a message that “<br>
Error CS1525 Invalid expression term '}' “</p><p>This is a case of one mistake creating two different errors. This can be pretty confusing.And is less than helpful. Visual Studio did give me a couple of options to deal with this error. Or two. Some of the options didn’t make the errors go away. The one that did was not to add a semi colon but rather to add braces. Of course, either adding a semi colon or adding curly braces leaves one with a a for loop that doesn’t do anything. A warning about that would be nice and I have seen that warning from other parsers.</p><p>I would think that a good AI that understands compiler errors would be a lot more helpful. Microsoft is talking a lot about adding artificial intelligence to more products. Will that include compiler/parsers? I think that is likely at some point. </p><p>So far the attention has been focused on using AI to generate code. People seem to think that will mean no need for human programmers. People also think that AI will generate perfect code. Or at least code without syntax errors. I think those are somewhat mistaken assumptions. We have lots of great tools for generating websites for example. There are still many cases where human editing of HTML files is needed to get all the desired results. </p><p>I expect that human coding for fine tuning of AI generated program code will be necessary for many years to come. As long as AI generated code is “taught” from Internet available code I expect syntax errors to still show up. Some of those errors may not even be caught by parsers. Different versions of compilers can have different rules about what code is acceptable. We will have to see how things progress.</p><p>Syntax debugging will be the easy part relatively speaking. Logic errors will be harder still. We live in interesting times.</p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com0tag:blogger.com,1999:blog-18677687.post-33428243401504333162023-12-18T07:02:00.002-05:002023-12-19T12:21:43.212-05:00How Much Hardware Knowledge Do CS Students Need<p>Back to the basics! Get students close to the hardware! Really? Just how much hardware knowledge to students need today? This post was prompted by a post getting some attention in Facebook this weekend. <a href="https://www.magesguild.io/the-decline-of-hardware-knowledge-in-the-era-of-cloud-native-compute/">The Decline of Hardware Knowledge in the Era of Cloud Native Compute</a></p><p>Now I have been around for a while. I programmed using punch cards and paper tape. I spent some time in an operating system development group where I analyzed crash dumps, wrote code in assembly to traverse stacks and queues to understand what was going on. Great fun. In hindsight anyway. But do high school students need to get that close to the computer today? Probably not.</p><p>Would it hurt them? Also probably not. Most students don’t really need assembly language or detailed hardware knowledge. Once upon a time, for example, it was important o know exactly how data was stored on a disk with block sizes especially important. For solid state “disk” that is less important if it matters at all.</p><p>It’s a mistake to assume that the way we were taught and the things we were taught should still be taught in the same way.</p><p>Typical instruction about hardware today is about the parts of the computer – CPU, memory, maybe some talk about cache . In some schools students disassemble and reassemble computers but that is getting harder to do as parts get smaller and more tightly integrated. I don’t want to mess with my laptop at all if I can avoid it.</p><p>That is probably enough at the high school level. Now in university I would like students to have some knowledge of things like how micro code is used to code today’s CPU instructions, pipelining, caching, and yes, maybe a little assembly programming. The latter more as a unit than a full course. Let the students who want to take more advanced assembly or micro coding course work.</p><p>One big problem with expecting the sort of deep in the woods course work in high school is the lack of teachers who can really teach it. We have enough trouble finding teachers who know Java or Python. Finding teachers who can teach assembly language, explain the inner workings of an OS or the machine hardware? Good luck!</p><p>Be sure to read Mike Zamansky’ related post <a href="https://cestlaz.github.io/post/low-level/">Low Level CS in HS - C'est la Z (cestlaz.GitHub.io)</a></p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com0tag:blogger.com,1999:blog-18677687.post-67118764147274164092023-12-13T07:46:00.000-05:002023-12-13T07:46:00.245-05:00Looking Forward to Computer Science Education in 2024<p>“Prediction is very difficult, especially if it’s about the future!” --Niels Bohr</p><p>My track record at looking forward in CS education is a mixed bag. I kept expecting a big jump in internet of things courses and those never developed. Sad really. I think it would be a good idea. I keep predicting growth in cybersecurity courses and the past year seem to show a lot of growth there.</p><p>Cyber security is getting a lot of press so I see more of these courses in 2023. I hope they are real in-depth courses and not just how to stay safe online. Teacher interested in this should follow the <a href="https://www.facebook.com/groups/1435210643287094">Cybersecurity Educators group on Facebook</a>.</p><p>I predict that Artificial Intelligence will be a big deal in CS education in 2024. OK, that’s easy. How will it play out? Well, that is a different question. Certainly teachers are going to be concerned about AI tools helping student cheat. Some, the better teachers, will find ways to use AI tools. For example, having students evaluate the generated code. Does it cover all the conditions? How can prompts be better for better results? It the generated code any good? What does “good code” even mean?</p><p>There will also be a growing movement to teach about AI. How does it work? What are it’s limitations? What are the ethical and social impacts of AI? So much the teach and learn for students and for teachers. We’re only getting started.</p><p>Another easy prediction – Python will continue to grow in use.AI libraries will drive some of that for sure. A lot of teachers seem to prefer it to Java though so there is that. Will it replace Java for APCS A? I doubt it. IT will be interesting to see how the JavaScript/Python balance develops in AP CS Principles though. Keep an eye on it.</p><p>Unfortunately, I predict continued growth in the number of unprepared CS teachers. I wrote about this in my looking back post and I have no expectation of improvement anytime soon. <a href="https://blog.acthompson.net/2023/12/looking-back-on-computer-science.html">Looking Back on Computer Science Education 2023</a></p><p>One big thing I wonder about is DEI in CS education. Will the politics and demonization of DEI impact how CS it taught? Diversity, Equity, and Inclusion are pretty important if we’re going to really make progress in computer science. Having a white and Asian mal monoculture has not, in my opinion, led to a good CS ecosystem. We need diverse thought in CS. I may have another post just on that subject.</p><p>At the same time, we need to be careful in PD and conferences that we don’t only talk about DEI. I’m not seeing a lot of disagreement on the idea that we need to have diversity in the industry and our classrooms. Teaching equitable is also a no brainer. And inclusion? We’ve pretty much agreed on the need for that in education. Do teachers need to be beaten over the head to see the need? Not the ones I know. At some point too much preaching to the choir is going to result in a backlash that we can ill afford. Let’s not assume that teachers don’t understand the problems. Let’s focus on solutions.</p><p>I’m really looking forward to the annual CSTA conference this summer. It’s going to be greet. This summer we will hear what teachers have learned over the last year or two. Being in-person means a lot more interaction. I may have to make a mid-year post about the 20224/2025 school year after the conference.</p><p>So what to you see happening in CS Education in 2024?</p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com0tag:blogger.com,1999:blog-18677687.post-67198483288550280112023-12-10T12:37:00.001-05:002023-12-10T12:37:37.487-05:00Looking Back on Computer Science Education 2023<p>I’m posting this early this year. My thinking is clear so why wait?</p><p>For many, 2023 was the year that Artificial Intelligence, ChatGPT and other tools, really toss a stick in the wheel of CS education. Suddenly students could use an AI to write code for their programming assignments. People were in a tizzy. The CollegeBoard made last minute changes to AP CS Principles and teachers online could talk about little else for a while.</p><p>Things have calmed down some since earlier in the year but educators are still grappling with what it all means for how there teach. This is true not just in CS of course. I am skeptical of those who claim to be experts in AIs impact on education. No one has the depth of experience with AI in the actual classroom yet.</p><p>While not really CS, Steve Dembo has been using ChatGPT in interesting ways. He chats with Vicki Davis about it at <a href="https://www.coolcatteacher.com/ai-writing-student-papers-steve-dembo/">The Great Student AI Writing Experiment with Steve Dembo (coolcatteacher.com)</a></p><p>That is not to say that teachers haven’t learned a lot. A lot of so called experts are saying things like “just change how you teaching ways that make ChatGPT not useful”. As if! There is not a lot of discussion about what sort of change they mean. </p><p>The other big thing I have noticed this year may be even more concerning to me. There seems to be a rapid growth in unqualified teachers teaching Computer Science. Now this has always been something on a problem but the rapid growth of requiring CS education in more schools has exacerbated the problem. We are seeing teacher, who are probably great teachers in other areas, being asked to take on CS classes without adequate preparation. I am seeing teachers ask questions online that I would expect their students, after taking their class, to be able to answer.</p><p>Frankly, it scares me. For years university faculty complained about incoming students being poorly served by poor CS teaching in the high school level. I can only see those complaints increasing with more validity than in the past. Fixing this is going to take a lot of work.</p><p>I don’t blame the teachers. I blame administrators. I also blame legislators who fail to provide the funds and programs for training teachers in this rather technical subject.</p><p>OK, those are my two big takeaways from 2023. What have you seen?</p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com1tag:blogger.com,1999:blog-18677687.post-32151808329269474022023-10-29T11:03:00.001-04:002023-10-29T16:40:24.398-04:00Spelling Bee Solver Project<p>My wife loves word puzzles. She is amazing at them. Me? Not so much. On the other hand I love programs and programming projects that involved string manipulation. So when my wife started playing a new (to her) word puzzle – the New York Times Spelling Bee – my thoughts went to solving it programmatically.</p><p>If you are not familiar with the game, it involves seven letters for the player to make words from. Anny of the letters may be used but only letters from the list can be used. Oh, and there is one letter, shown in the center of the letters, that must be used in every word. Words much be four letters long or longer BTW.</p><p><img width="222" height="254" alt="NY Times Spelling Bee image" src="http://www.acthompson.net/images/blog/spellingbee.png"></p><p>I thought this would be a fun project to code up so I took a pass at it. I think it would be a fun project for use with students as well. It involves a number of interesting and important concepts.</p><p>For one thing, you’ll want to open and read through a text file. There are many word lists available on the interne BTW. So that part is easy. You want want to check through a list for any words that are not school appropriate (that suggests other interesting projects now that I think about it). </p><p>Looping is obvious of course. As is parsing strings to find if a given letter is or is not included in a word. One method I wrote for my solution was to build a string of letters that were not included in the list of allowed letters. I searched any possible word to make sure that no unallowed letters were part of it. </p><p>Have you tried this or a similar project? Would you use this one? If you do, let me know.</p><p>Edit: Should of known it had been done before. Useful information at <a href="http://nifty.stanford.edu/2022/eroberts-spelling-bee-wordle/?fbclid=IwAR334mcN_SjGih4rl8jq-Wc3nhyla_h-RYzy5OIKiADZ_GqhkAZjsq_nn-M">Nifty Assignments.</a></p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com2tag:blogger.com,1999:blog-18677687.post-37638635864078309382023-10-24T08:56:00.001-04:002023-10-24T08:57:37.814-04:00Last Call for CSTA Conference Proposals<p>The <a href="https://www.cvent.com/c/abstracts/8821c228-6223-49a8-849c-5608b443c052">CSTA Call for Proposals</a> is coming to an end October 30, 2023 11:59 PM PT.</p><p><img width="288" height="162" src="http://www.acthompson.net/images/blog/cstacall.jpg"></p><p>Presentations are what makes the CSTA Conference is what makes CSTA the best conference for K-12 Computer Science educators. It’s also a wonderful; audience for CS educators to present their good ideas. If you have a good idea that you have been using successfully in your classes you should think seriously about presenting to CSTA.</p><p>So think about what you have had success with and think about submitting a proposal. But act fast!</p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com0tag:blogger.com,1999:blog-18677687.post-87827378833070823782023-10-17T19:39:00.001-04:002023-10-17T19:39:48.093-04:00The More You Know The More You Expect<p>One thing that happens when you know who to write computer code is that you know how hard or easy some things are. If you’re even the least OCD some things that are minor, and even unnoticed to many, may bother you a little. Take this image for example.</p><p><img width="353" height="123" src="http://www.acthompson.net/images/blog/format.png"></p>I expect that money amounts will have two digits to the right of the decimal point. You'll notice that the second and third limes have two digits to the right of the decimal point. It turns out that those values will have two digits even if there is only a value for the tenth of a dollar and not the hundredths. So 5.10 for example. The first line will have no digits to the right if there is no value. So 0 without even the decimal point.<p>Now this is not really a big deal. One would think (if they were me) that since the second and third lines have the formatting I (most people?) they would do the same for the first.<p>Getting the formatting "right" is easy. I know that (or at least assume that) because I have coded that sort of thing often. If I didn't know how to code it might not bother me at all. One might even assume it was hard to do. <p>I wonder if a lot of people assume that things are difficult and that they put up with bad user interfaces for that reason. Maybe they think things are harder than they are. Maybe if more people understood coding they would be less likely to put up with hard to use programs.Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com0tag:blogger.com,1999:blog-18677687.post-82001643834101530342023-09-11T18:22:00.001-04:002023-09-11T18:22:16.877-04:00Reimagining CS Pathways: High School and Beyond<p>This looks like a great opportunity to make a difference in CS education.</p><hl><p>We are seeking community involvement in a new project called Reimagining CS Pathways: High School and Beyond, led by CSTA, CSEdResearch.org, ACM, Code.org, College Board, CSforAll, and the ECEP Alliance. Please consider applying to join us. We particularly need diverse voices from post-secondary as well as industry representation.<p>This project will convene representatives from K-12 ed, higher ed, and industry three times across this school year to <b>develop community definitions of (1) what CS content is essential for all high school graduates and (2) pathways for continued CS learning</b>. We aim to:<ul><li><p><b>Make recommendations for revisions</b> to CSTA K-12 Standards and AP CS courses</p><li><p><b>Clarify alignment of and develop model pathways for CS courses</b>, including content that fulfills a high school graduation requirement, <u>introductory post-secondary CS courses</u>, and AP CS courses<b></b></p></li></ul><p>We have a limited number of spaces for participants in a series of in-person convenings (Nov. 13-14, 2023, Jan. 25-26, 2024, and Mar. 19-20, 2024) and a series of virtual focus groups (offered at multiple days/times). Additionally, we welcome reviewers to asynchronously provide feedback on reports.<p><b><a href="https://forms.gle/552DgobbPhN6RQeQ9?fbclid=IwAR3uPRYHoQc5NX_Wv0WbPMKlHUHoU4nFKbZZiocJs98tRwFZ11CHmeJg1Ag">Please apply to join us</a>.</b> We expect the application will take 5-10 minutes. <b>Our priority deadline is Sept. 15. </b>The steering committee will select participants to create a balanced group, and CSTA will follow up with more details for those selected near the end of September.<p>Please note that there is no compensation for participation, though CSTA will cover travel expenses to the three convenings. This project is supported by the National Science Foundation under <a href="https://www.nsf.gov/awardsearch/showAward?AWD_ID=2311746&HistoricalAwards=false&fbclid=IwAR3ZLBOPpY6jYXhRp53xeSr1v--lTkXqikNH6YubuP_OEqbHaKkUMQnwsI0">Award No. 2311746</a>. For questions or more information, contact Bryan Twarek at <a>bt@csteachers.org</a>.<p>Thank you!<p>Bryan Twarek, CSTA, PI<p>Monica McGill, Co-PI</p></hl>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com0tag:blogger.com,1999:blog-18677687.post-80699640045497304392023-08-11T09:27:00.001-04:002023-08-11T09:27:02.496-04:00Do You Remember Struggling to Learn?<p>Dave Largent, a CS professor at Ball State University, had an important reminder on his blog -<a href="https://davidlargent.blogspot.com/2023/08/teachers-need-to-struggle-to-learn.html">Dave's not here, or is he?: Teachers need to struggle to learn (davidlargent.blogspot.com)</a> Our students often (usually?) struggle to learn new things. I think this is especially true in computer science. We as teachers with lots of content knowledge sometimes struggle to be empathetic. We forget our own struggles.</p><p>One if the things Dave struggled with on his trip through Europe was different languages and customs. It’s a reminder to me that many of our students come from different cultures, customs, and languages. It’s a good reminder that examples in American culture and English can add to the struggle. Being aware of where our students come from is important.</p><p>I often shared my own story of my first computer class. Greatly did I struggle in that first class. The first couple of projects were only completed with a lot of help from peers and TAs. Things came easier eventually and with a solid and broad base (I have been programming for 51 years now) most new topics are easier. But not always. Having those struggles is character building. And helps develop empathy.</p><p>I think that having new experiences that involve struggle to learn is a valuable experience for teachers (anyone really). It also helps us model life long learning for extra value. I encourage everyone to seek out learning experiences that do not come easy. </p><p>And above all, remember that our students struggle and we need to be patient with them and support them. Have a great school year!</p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com0tag:blogger.com,1999:blog-18677687.post-68244402032071652952023-07-12T12:32:00.001-04:002023-07-12T12:32:01.930-04:00Thoughts on CSTA Conferences Past and Present<p align="left">I am at<img width="169" height="329" align="right" style="float: right; display: inline;" src="http://www.acthompson.net/images/blog/CSTA%202023%20Conference%20Badge.jpg">tending the 2023 CSTA Conference online. I’m not writing blog posts about it the way I normally do. Lots of reasons for that but I will post some learnings from it later. I am downloading lots of presentation slides as notetaking. </p><p align="left">But I wanted to take a few minutes to ramble about what has been going through my mind as I watch. One question I get a lot is: Why are your as a retired person still attending CSTA conferences and events. It’s a fair question. It's not as if I have a classroom in the fall to apply what I learn.</p><p align="left">The truth is that the computer science education community has been a big part of my life for a long time It started online in listservs even before I was blogging and a while before there was a CSTA. It’s a part of my life t<img width="178" height="178" align="right" style="float: right; display: inline;" src="http://www.acthompson.net/images/blog/csit2005.jpg">hat has spanned jobs – teaching and otherwise. I’d like to think I still have things to contribute. And personal value to gain. The conference bag on the right, from the CS & IT symposium in 2005, was not my first conference BTW. But I found it today and thought I’d add it.</p><p align="left">The community started small. By the second or third conference it seemed like everyone knew everyone. That was good in some ways but for CS to grow the teacher community had to grow. Now I go to conferences and there are many people I don’t know. And others from the past have retired and chosen not to be active anymore. I don’t blame them BTW. We all make the choices for how to spend our time and energy.</p><p align="left">The growth has been good. Many on the current CSTA board have been members for only a few short years. They bring energy and ideas and innovation that is necessary for the future of the organization. They still listen to us old timers though. I am on the conference committee for next summer’s CSTA conference. I am excited about that work. So many new things in our field. So many new and diverse voices that we need to hear from.</p><p align="left">Speaking of next year, the <a href="https://www.cvent.com/c/abstracts/8821c228-6223-49a8-849c-5608b443c052" target="_blank">call for proposals for the 2024 CSTA conference</a> is now open. I encourage anyone with interesting ideas to submit a proposal. The CSTA audience is the best and most responsive audience ever. It’s going to be in-person next year. Start hitting your school/district up for funding to attend. It can be life and career changing.</p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com0tag:blogger.com,1999:blog-18677687.post-22673384560622334722023-06-06T08:17:00.000-04:002023-06-06T08:17:00.135-04:00Conversations on AI in Education<p>Pat Yongpradit from Code.Org tweeted an image of what they are seeing in conversations about AI and Education. (The link on the image below goes to that tweet)</p><p><a href="https://twitter.com/MrYongpradit/status/1663574012729884676" target="_blank"><img width="350" height="262" style="margin-right: auto; margin-left: auto; float: none; display: block;" src="http://www.acthompson.net/images/blog/AIineducation.jpg"></a></p><p>Now I am not having the detailed conversations with policy makers that Pat is but these boxes pretty much match what I am seeing in my social media these days. That bottom right hand box is where I’d like to see myself and others but it feels like people in power are more on the left hand column. <p>The usual tech bros are touting the AI can replace teachers line. We’re a long way from that and I am not sure we’ll ever be at a point where that is a good thing.<p>Lots of teachers are afraid of cheating. That’s not an unreasonable fear. There are pundits, some of whom are teachers, saying “just change the way you teach and all will be well,” I see a shortage of detailed information about just how to teach differently to avoid AI cheating. I think some of those people are fooling themselves if they think they have all the answers. Students are very good at finding new ways to cheat no matter what the assignments are.<p>The right hand column is where I think we need to be but there are more questions than answers there. Frankly, I think the technology is still to new and experience with it is to little to answer these questions with any strong level of confidence. We really need teachers to experiment with these tools in actual classrooms. That takes some freedom that doesn’t exist in as many places as we would like. Government and administrators in too much of the US are more interested in constraining what teachers do in the classroom than giving teachers freedom to develop new ways to teach.<p>The question is, are schools going to still look the way they did 100 years ago, as they do today, or are we going to see real change that uses technology to the fullest?Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com2tag:blogger.com,1999:blog-18677687.post-87255082662411806762023-06-05T19:36:00.001-04:002023-06-05T19:36:21.259-04:00Let’s Try it and Find Out<p>Facebook memories reminded me of a frequent conversation I had with students. They would ask me what would happen if they tried something and I would answer “I don’t know. Let’s try it and see.” Students often expect teachers to know everything. Well, if they believe their teacher is a real content knowledge expert. Of course there is more to be known than can ever be known. This is especially true in a subject like computer science.</p><p>Too many students expect teachers to find answers to questions they have. That’s not the best way for them to learn. Trying things for themselves is a lot better. That’s why I loved to suggest that students try things for themselves. Encouraging students to try things for themselves and to experiment helps them grow more independent as learners. It also helps them develop their creativity.</p><p>This is similar to another exchange I used to have with students. I might say “One of us should look that up. You’re the student so I think it should be you.” Again, students who look things up for themselves remember information better,</p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com1tag:blogger.com,1999:blog-18677687.post-45953111834855862982023-05-25T12:44:00.001-04:002023-05-25T12:44:11.536-04:00Coding With AIs Prompts Are Important<p>Last night, when I could not sleep, I got up and wrote some code. I added some features and data checking to my Wordle solver helper program. When I finished I felt good about my work and myself. I think that made it easier to get to sleep and I slept well.</p><p>It got me thinking this morning. When I was in university and still learning how to code I would occasionally get frustrated and feel less confident. So I would write some simple program to help me feel like I could actually code. I must have written code to display the multiplication table from 1 times 1 to 12 times 12 at least once a semester. It worked for me.</p><p>Now that is a trivial program but it involves nested loops (for me anyway) and I am not sure I would assign it to students today. It’s really a meaningless program in today’s world when everyone has a calculator app on the phone they don’t leave the house without.</p><p>I did wonder how an AI would write the code. So I opened the chat option in Bing and asked it “Write some C# code to display multiplication tables in a list box” It gave me some code that displayed this:</p><p><img width="137" height="160" align="left" style="float: left; display: inline;" src="http://www.acthompson.net/images/blog/BingX1.png"></p><p><br></p><p><br></p><p><br></p><p><br></p><p><br></p><p>Not what I wanted at all. The problem is ambiguity! So I tried again with “Write some C# code to display the multiplication table from 1 times one to 12 times 12” and got this:</p><p><img width="93" height="197" src="http://www.acthompson.net/images/blog/BingX2.png"></p><p>Not what I wanted either. So I specified at grid format “Write some C# code to display the multiplication table from 1 times one to 12 times 12 in a grid format”</p><p>This reply required a dataGridView object and the program did not work. Looks like I need to set up the dataGridView object in ways the AI did not explain. Now there is a problem worth thinking about. I asked Bing what settings I needed for the dataGridView and it gave me several. Program still did not work. At this point I gave up on the dataGridView option. It sort of feels like overkill anyway.</p><p>So I tried another prompt “Write some C# code to display the multiplication table from 1 times one to 12 times 12 in a grid format in a list box”</p><p>Finally I got what I wanted even though I am not thrilled with the formatting.</p><p><img width="208" height="142" src="http://www.acthompson.net/images/blog/BingX3.png"></p><p>I’ve got a number of takeaways from this. Yes, students could use these AI tools to get code for typical school assignments. On the other hand, I think it would be fairly easy to tell when they do. The use of features that are not typically covered in class lectures or demos would be one clue.</p><p>It’s not always easy to provide the right prompts to the AI. Sometimes it takes some iteration. I think though, that teacher have to reduce ambiguity in assignment descriptions in many cases. Arguably some amount of ambiguity is helpful to allow for creativity. It can be a fine line, </p><p>As noted, I didn’t like to formatting so I did modify the code to get closer to what I wanted. I think programmers are going to be needed in a lot of cases to finish off what AIs generate. Both providing the right prompt and finishing off will be important skills for some time to come. Finishing off is going to require some serious skills in many cases BTW. Programming is not dead yet.</p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com0tag:blogger.com,1999:blog-18677687.post-66695663334597603712023-03-18T13:59:00.001-04:002023-03-19T12:04:55.309-04:00Finding Words With All The Letters Programming project<p>Does anyone else lay in bed in the morning thinking about coding projects or is it just me? I’ve been playing around with a Wordle solver helper for a while now. It helps me find words based on what I know after each guess. One of the things I like to do is see how many possibilities there are based on different hints. Yesterday I had most of the letters but not in the right place. So this morning I was wondering about words that had the same letters but in different orders. Seemed like something I needed to write some code about. </p><p>A key method is to compare all the letters in one string with the letters in a second string. At least the way I was thinking of handling it. It struck me that that is a great assignment for students. I don’t have any students handy so I asked ChatGPT to write that function. This is the prompt I gave it:</p><blockquote><p>Write a C# function that accepts two strings and returns true if all of the letters in the first string are included, in any order, in the second string. Return false if any of the letters in the first string are not included in the second string.</p></blockquote><p>That is a lot like what I would assign a student. ChatGPT gave me some very nice code. It wasn’t exactly like what I was writing in my head. It used<em> foreach</em> and ToCharArray which is probably the best and easiest way to do this. I was coding before either of those became common so my mind goes to <em><u>f</u>or </em>and<em> while</em> loops and the string <em>SubString</em> method. This was a good reminder for me.<p>I left the rest of the program, which wasn’t a lot of code, to myself. <p>Once written I had some fun with it. For example, the letters in Alfred also makeups the word flared. The letters in face are also used in café. Some groups of letters do not make up any words of course, This seems like it could be a fun project to give students. It was fun enough for me.</p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com2tag:blogger.com,1999:blog-18677687.post-82134663704545168242023-03-14T12:00:00.001-04:002023-03-14T12:00:12.777-04:00Book Recommendations for CS People<p><strong>tl;dr</strong> Book recommendations: <br><ul><li><a href="https://www.amazon.com/Overnight-Code-Montague-Revolutionized-Engineering-ebook/dp/B085175PYS/?fbclid=IwAR3ctzDdLaosuWQhMuLWOVIj4-jTiOsDDa5LEzvt0GIvsDC1Q6Rs5oh6UHI">Overnight Code: The Life of Raye Montague, the Woman Who Revolutionized Naval Engineering</a><li><a href="https://www.amazon.com/Code-Girls-Untold-American-Breakers-ebook/dp/B01N193KET/">Code Girls: The Untold Story of the American Women Code Breakers of World War II </a></li></ul><p><em>Overnight Code</em> was recommended to me after I recommended <em>Code Girls</em> on Facebook. <em>Overnight Code</em> is a truly inspiring story of a woman with two strikes against her (female and Black) whose hard work, determination, and talents helped her do some revolutionary work in naval engineering and integrating hardware/software systems.<p>Debugging code is arguably a lot harder than writing new code. Raye Montague was amazing at debugging code and integrating disparate systems. But also a good person who helped mentor and advance others. She was given tasks that others had said were impossible to complete. Talent and hard work (Raye had a lot of both) allowed her to accomplish beyond expectations.<p><a></a>There is a lot of good career and life advice woven into this story as well. Advice for everyone. I could have benefited from this book early in my career.<p> "<em>Code Girls: The Untold Story of the American Women Code Breakers of World War II</em>" was recommended by several people in a Facebook group dealing with a Kindle Challenge that Amazon is running. The idea about code breaking sparked my interest right away. This book was more than just that though.<p>There were plenty of insights into code breaking but the look into the lives of these amazing women was the highlight. It was a different time and women would not as respected as they should have been. Yet, these women put their considerable talents into working for the war effort and their country.<p>Code breaking is a fascinating subject in itself of course. I enjoyed reading about the “bombe” machines, how they were created and used. I also found the difference that code breaking made in the conduct of the war (World War II) to be interesting. This is not the sort of thing many history courses cover.<p>It’s easy to label these books as books for Women’s History Month or the Raye Montague book as being for Black History Month but that would be a mistake. These are books for all year long. I recommend them to anyone interested in the progression of computing in society. <em>Code Girls</em> is a great read for cybersecurity or cryptography students. <em>Overnight Code</em> is a powerful read for anyone not just computer science people. It is just that inspiring.Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com0tag:blogger.com,1999:blog-18677687.post-31689729140026434312023-02-23T16:39:00.001-05:002023-02-23T18:26:28.307-05:00Does It Run in the IDE?<p>I was reading a tweet from a person saying they lost points a program written with pen and paper because the teacher thought the code would not run. When the student asked the teacher to write the code on the computer it ran.</p><p>The Twitter discussion was on the wrongness of code assignments on paper but I am not sure that paper coding assignments are necessarily wrong. I suspect that the problem in the Twitter user's case may have been a teacher who is experienced. I could be wrong of course.</p><p>The real problem is a teacher putting too much faith in their own mental execution of the code on the paper. I have found it a good practice to enter code I was the least unsure of into an IDE and run it on the computer. I’d almost always check code I thought did not work. Students can be very clever and write code that doesn’t look like it will work but does work. Or code that does look like it works but doesn’t.</p><p>This all points to problems with testing computer programming in general. Writing code for evaluations is problematic in a number of ways. Yes, I know the AP exams do it that way. I’ve only graded the AP A exam once but I can tell you it’s not that easy. Handwriting can be hard to read for starters. I’ve already mentioned how clever students can be. I loved the 10 line code answer for a guestion that was looking for a one line return statement. I could have saved myself a lot of time if I could have verified it by running it.</p><p>Asking students to write code in an IDE offers logistical issues for starters. There is also the issue of students being able to look at each other’s screens and sharing files. Some object to students using autocorrect, error checking, and help files. All the sorts of things professional developers use. Some teaches do prefer code turned in electronically because it allows for auto graders. I’ve discussed them here several times. Basically, mixed feelings.</p><p>Evaluating student knowledge is one of the more difficult tasks programming teachers. It’s a problem with no easy answers. For now, I think, the best policy is to use a variety of assessments.</p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com2tag:blogger.com,1999:blog-18677687.post-8107275744380241692023-02-14T17:44:00.001-05:002023-02-14T17:44:35.023-05:00People Are Bad At Giving Instructions<p>One of the things that make me sure that programming will be around for awhile even with better and better artificial intelligences is that people are bad at giving instructions. Well, that may be unfair. They are reasonably good at giving instruction to other people but that is not the same as being good at giving instruction to the literal minded.</p><p>The most famous instruction, I first heard it from Grace Hopper almost 50 years ago is the instruction for using shampoo “Lather, Rince, Repeat.” There is a lot left out there. Most obviously, repeat how many times? It also doesn’t say if one should wet their hair first. In computer terms, an infinite loop without setting initial conditions.</p><p>I recently bought a new cover for a light switch. The first instruction was to turn off the circuit breaker for the switch. Good advice. On the other hand, the instructions did not say to reset the circuit breaker when finished installing the cover. A literal minded installer would never have a working switch.</p><p>Of course, people figure these things out. We are aware of the larger context and are good at filling in missing pieces. Computers are not that good at any of this.</p><p>Part of what we teaching when teaching programming is how to give instructions. Not just how to translate those instructions into code but to fully understand and describe the steps needed to complete at task. I believe these are necessary skills. I think they will translate to other fields. Not that I have proof but it seems logical. In any case, we’re going to have to get good at giving instructions if we are going to tell AIs what code to write.</p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com0tag:blogger.com,1999:blog-18677687.post-82339295733743067922023-02-12T16:30:00.001-05:002023-02-12T16:30:32.936-05:00CS Students–Learn Your IDE<p>Eugene Wallingford had a great post on WHAT <a href="https://www.cs.uni.edu/~wallingf/blog/archives/monthly/2023-02.html" target="_blank">WHAT DOES IT TAKE TO SUCCEED AS A CS STUDENT?</a> It’s got a lot of good advice and I recommend it to students in high school or university. For now I want to focus on one or two pieces of his advice. Specifically, “Get to know your programming environment”</p><p>For the most part, in class, teachers have time to do an introduction to the development environment but not much more. We run through “Hello World” or similar to walk students though creating a project entering code, and running their first program. That;s all we have (or perhaps all we make time) for.</p><p>Typically there is a lot more to a development environment than what we show students. Even a simple IDE like IDLE for Python or Visual Studio Code has a lot or options and functions we don’t go over in class.</p><p>Students who spend some of their own time exploring their development environment are going to have an easier time though out their course. Indeed, throughout their CS career.</p><p>Related to learning your development, Prof Wallingford suggests keeping your IDE open while reading through textbooks or other resources. That lets one more easily try out code examples while studying. That goes a long way towards understanding what one is reading. When I review textbooks or other teaching resources I always run the code examples for myself. In part , to see if they are correct of course but also to see for myself what students will see and learn from the example.</p><p>Writing code that is not specifically assigned for a course is always a help for learning. If a student takes the time to experiment with a project of their own interest they will do far better in the course they are taking.</p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com0tag:blogger.com,1999:blog-18677687.post-9741061131636806742023-01-27T11:50:00.001-05:002023-01-27T11:50:47.968-05:00Rhode Island Computer Museum<p>I spent some time looking at the <a href="https://www.ricomputermuseum.org/Home" target="_blank">Rhode Island Computer Museum</a> web page today. A lot of interesting stuff. Some great information under the Education and Activities page. If you teach the history of computers this is a great resource with text and pictures.<p>The Collections gallery has a huge collection of images and descriptions of items they have as well. Check it out at <a href="https://www.ricomputermuseum.org/Home">Home (ricomputermuseum.org)</a></p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com0tag:blogger.com,1999:blog-18677687.post-3104116003490063342023-01-23T09:52:00.001-05:002023-01-23T09:52:53.859-05:00What Jobs Are Safe From Automation?<h3>“It's tough to make predictions, especially about the future.” – Yogi Berra</h3><p>That doesn't mean people don't try. Recent advances in Artificial Intelligence have a lot of people predicting what jobs are an are not likely to be replaced by computers. Technology is challenging the ideas about what jobs can and cannot be replaced by technology. Doug Peterson, who shares a lot of interesting articles, recently share this one predicting that leaders will not be replace. It's an optimistic article. <a href="https://www.inc.com/hillel-fuld/5-reasons-leaders-shouldnt-worry-that-generative-ai-will-take-their-jobs.html">5 Reasons Leaders Shouldn't Worry That Generative A.I. Will Take Their Jobs | Inc.com</a><p> A lot of jobs we once thought were completely safe are being seen in a new way lately. AIs are creating what looks to many like art for example. This is forcing us to take a hard look at how we define art. Some recent visits to museums had me already asking “what is art?” </p><p>Today we joke about AI attempts to write short stories, poetry, and other narratives. A lot of our stories in movies an even books are formulaic. How long before AIs can write Hallmark Christmas movies I wonder? What used to be a joke may be a prediction of the future. </p><p>A lot of people are speculating on the future end of the programmer profession. People have been predicting that would decades but we are closer to that than ever before. Software developers today think they are safe though because they (we) know that end users are terrible about describing what they want a program to do. Will the future bring courses and training on how to talk to AIs? Possibly. I can sure see the need for it.</p><p>People who are not teachers are suggesting that AIs will take over for human teachers. As someone who spent 15 years teaching I am not so sure about that. I think the human touch will remain important for the future. Teaching is a lot about reading people and establishing relationships. Wil AI be able to do that? I am not sure anyone knows.</p><p>One area I think people have an advantage over AI is that we are bad with risk analysis. What may seem like a flaw leads people with some luck, some imagination, and some hard work to beat the odds. We see potential needs when a pure look at the data would not see anything. And we are often willing to defy the odds for things we believe in. I am not sure AI will get there.</p><p>Thinking about the possibilities of AI and what it means for the future of work is a critical topic. It’s something we need everyone, but especially students, to be thinking about. </p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com0tag:blogger.com,1999:blog-18677687.post-76078654630793221002022-12-31T18:18:00.003-05:002023-01-01T18:38:49.061-05:00Looking Back and Looking Forward in CS Education 2023<p>Traditionally I write a year end look back on thee previous yest in CS education. (Last year at Looking<a href="https://blog.acthompson.net/2021/12/looking-back-on-computer-science.html" target="_blank"> Back on Computer Science Education in 2021</a>) Honestly, that post would largely work for 2022 as well. I attended SIGCSE, CSTA, and the New England Regional CSTA conference. They were all great. There was good learning at all of them. But new stuff? Not a whole lot. A few new tools. Some new robots. Some new AI and cyber security curriculum. But really not a whole lot.</p><p>I think we’re in for some disruption in 2023 though. Tools like ChatGPT and GitHub CoPilot are probably only the first of tools that are going to shake things up in teaching programming. Are we even going to still teach programming in computer science? If not, what will computer science courses look like? If we are still teaching programming how will we do it? What will it be all about?</p><p>We’re still going to see a need for teaching about cybersecurity for sure. Artificial Intelligence is also going to be more important. We’re seriously going to have to think about how we teach about it. We have to include not just how it works but how it should be used. Ethics in computer science has never been more important.</p><p>The discussion about ChatGPT and what it means for education in general and CS education in particular is going to be ongoing. We have to reink how and what we teach. It’s going to be an interesting year. Have you been thinking about it? What are your thoughts so far?</p><p>Note: I highly recommend Mike Zamansky's blog post at <a href="https://cestlaz.github.io/post/2023/">Kicking off 2023</a></p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com2tag:blogger.com,1999:blog-18677687.post-83221538407739293162022-12-19T11:54:00.001-05:002022-12-19T11:54:36.543-05:00Thoughts on Optimization of Code<p>Donald E. Knuth famously said "Premature optimization is the root of all evil." The important word there is “premature.” Optimization is not a bad thing. It isn’t always required though. The joke is that a programmer will spend hours coding a solution to a problem that can be solved in minutes manually. Is that a bad thing? It really depends on the circumstances. If one is getting paid by the hour one could easily argue that it is wrong. On the other hand if time is not really the issue and writing the code is fun – why not?</p><p>There have been times in my career when optimization has been very important. I helped spec a computer for high speed/bandwidth data collection. It was critical that the computer be able to take the data and place it in memory without losing data. We actually analyzed the speed of various machine language instructions for optimization purposes. That’s pretty exceptional of course.</p><p>I also remember writing a program of my own that took what seemed like a long time to process some data. I thought about trying to optimize it but as often as the program was to run it would not have been a good use of my time. Before I ran it again I got a new computer which made a bigger difference in execution time than I would probably have been able to get though “fixing” the code.</p><p>Old habits from the days of slower computers stick with me though and I tend to think a lot about code execution. Recently I had ChatGPT write some code for me (<a href="https://blog.acthompson.net/2022/12/coding-with-chatgptarmstrong-numbers.html" target="_blank">Coding with ChatGPT–Armstrong Numbers</a>) I looked at the code very closely since I was trying to come to some conclusions about how good the code was. I noticed that the C# version it gave me was highly dependent on modulus and division which are somewhat time consuming compared to addition and multiplication. The program I write didn’t use any modulus or division but a lot of multiplication and addition. Both used the same number of raising to a power of 3 so it doesn’t play an important role in performance differences.</p><p>Having some time on my hands, I added some timing code to see if there was a difference. My program turns on to be much faster. Yea me. Of course both execution times are very small fractions of a second. Does it make sense to optimize this code? Probably not in this case. In fact, I would argue that the most understandable code may be a better goal for this project. That is a very subjective goal. Different people might come to honest but different conclusions.</p><p>Another goal might be scalability – the ease of adapting the program for other Narcissistic numbers. The ChatGPT probably wins there.</p><p>SO much depends on what we want to optimize:</p><ul><li>Speed of execution</li><li>Ease of understanding</li><li>Ease of enhancement/modification</li><li>Possible other considerations(?)</li></ul><p>Getting all three may not always be possible. It’s an interesting question though and one developers do need to ask.</p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com2tag:blogger.com,1999:blog-18677687.post-29700925692450179412022-12-17T12:55:00.001-05:002022-12-17T12:56:22.306-05:00Coding with ChatGPT–Armstrong Numbers<p>Trying out ChatGPT seems to be all the rage these days in certain geek circles. I may even be late to the game but I tried a few things over the last couple of days.</p><p>I started with one of my favorite little projects. Armstrong numbers are a form of <a href="https://en.wikipedia.org/wiki/Narcissistic_number" target="_blank">narcissistic number</a> which is a number that is the sum of its own digits each raised to the power of the number of digits. I first wrote a program to calculated these as an undergraduate when I wrote programs for it in about a half dozen different languages. </p><p>I fed in the following prompt using C#, Visual Basic, and Python as the programming language.</p><blockquote><p>Write a [programming language] program to calculate three digit numbers were the sum of the cube of each digit equals the original number.</p></blockquote><p>The results for C# and VB were the same algorithm written in the specific syntax. The Python code was slightly different.
You’ll probably not be surprised that the code ChatGPT showed me is very similar, if not identical, to code examples you can find with Google or Bing.<p>The C#/VB plan depends highly on integer division and the modulus operator to break down the number into its digits. <p>for (int I = 100; I < 1000; I++)<br>
{<br> int sum = 0;<br> int temp = I;</p>
<p> while (temp > 0)<br> {<br> int digit = temp % 10;<br> sum += digit * digit * digit;<br> temp /= 10;<br> }</p>
<p> if (sum == I)<br> {<br> Console.WriteLine(I);<br> }<br>
}</p><p>The Python sample changes the integer into a string and used that to address the individual digits.</p><p><br>
for num in range(100, 1000):<br> # Convert the number to a string so we can access each digit<br> num_str = str(num)<br> # Initialize a sum to store the sum of the cubes of the digits<br> sum_of_cubes = 0<br> # Iterate through each digit in the number<br> for digit in num_str:<br> # Convert the digit back to an integer and add the cube of it to the sum<br> sum_of_cubes += int(digit) ** 3<br> # If the sum of the cubes is equal to the original number, print it<br> if sum_of_cubes == num:<br> print(num)</p><p>Note that the Python example nicely includes comments. A dead giveaway that a student didn’t write it. All samples come with simple explanations of how the code works. The explanations tend not to be very deep so oral questioning of a student would probably still show if the student understood the code or not.</p><p>It looks like, for some simple, student exercises can be solved by ChatGPT. It is not much different from doing any other online search for the most part. How worried should teachers be about ChatGPT especially? I’m not sure. Cheating goes on all the time and there is a lot of sample code already out there for many common assignments. It’s going to be a bigger problem for educators who have very large numbers of students who can’t be familiar with the code their students write. Or who can’t ask them questions to make sure they understand what they turn in.</p><p>I think I would ask ChatGPT to solve some of my assignments before I assign them just so I know what sort of answers I might see.</p><p>Side note: Neither of the ways ChatGPT suggested is the way I solve this program. There are more than one ways to skin this cat.</p>Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com1tag:blogger.com,1999:blog-18677687.post-34182280095501044372022-12-04T17:54:00.001-05:002022-12-04T17:54:26.784-05:00When Computers Write Code<p>For most of my career I hive been hearing that some day computers will write all the code and human programmers will no longer be needed. Or at least, not as needed as today. Are we getting close to that time – finally? And if we are what does it mean for teaching computer science? </p><p>Recently, the CS education world has been discussing <a href="https://github.com/features/copilot" target="_blank">GitHub Copilot</a>.<blockquote><p>
GitHub Copilot uses the OpenAI Codex to suggest code and entire functions in real-time, right from your editor.</p></blockquote><p>While some of the discussion has been about the suit against Copilot (<a href="https://githubcopilotlitigation.com/">GitHub Copilot litigation</a>) much of the discussion has centered around what it means as a tool for cheating by students. More recently there has been some visibility to the use of <a href="https://openai.com/blog/chatgpt/" target="_blank">ChatGPT</a> to write answers to programming questions. <p>For example, this year’s <a href="https://adventofcode.com/" target="_blank">Advent of Code</a> seems to have been “invaded” by ChatGPT climbing the leaderboard by answering the problems is seconds. (<a href="https://tab.al/posts/adventures-with-chatgpt/">Adventures With ChatGPT: Advent of Code Edition | Tabs, Not Spaces</a>) Of, perhaps, even more concern to teachers, ChatGPT seems to be somewhat satisfying as a solution to Advanced Placement Computer Science A questions. (<a href="https://gist.github.com/Gaelan/cf5ae4a1e9d8d64cb0b732cf3a38e04a?fbclid=IwAR3udf070aoL72XoPnWmmvYoffPCJWS3LEGPDhJ2JaWnZC8ij9xryzDrsjg">ChatGPT passes the 2022 APCSA free response section</a>)<p>I’d be very surprised if students are not already using these tools. This brings up several questions. One is - how do teachers keep this from happening? We probably can’t. So how do we detect when it does happen? Do we use these tools ourselves to see what sort of code is generated for our assignments? Seems like yet more work for people who don’t have enough time as it is.<p>Another question, which students are sure to ask, is what is the purpose of students writing code that artificial intelligence can write easier and faster? If you read the article above about putting the APCS A questions through ChatGPT you’ll see that the results are not prefect. So for the time being it looks like good programmers can still write better code than the AI. How long that will last is anyone’s guess. If history is any guide, it will not last long.<p>I remember when optimizing compilers started generating more efficient than the world’s best assembly language programmers could write. It was painful for some and a real boon for others. It didn’t completely do away with the need for assembly language programmers but it did reduce the need.<p>What do we tell students who ask “what’s the point of learning to code?” My thought is that we talk about the need for human oversight of AI generated code. We need to verify that it works as we want it to work and that means we need to understand code. We’re also going to need to fine tune generated code for some time to come. Understanding code will also help write good instructions for the AI that generates code. Again, understanding how code works is important for that.<p>Of course, there is a lot more to computer science than just writing code. Programming languages are the language of that study. Learning assembly language still helps people understand how computers and computing works. So will learning higher level languages.<p>The AIs will get better. Our conversations with students will get harder. Cheating is always going to be a challenge. We live in interesting times.Alfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.com3