Skip to content

2024

Coding with AI is not all that

I am a long time software engineer and of late college professor. I’ve done a lot of programming and recently have been using AI (I will use that term generically, but for me it is Claude.ai) to assist. I have thought of it as a super-duper Stackoverflow which instead of returning a series of semi-useful posts, actually gives me working code. It is truly remarkable and I use it every single day.

As a teacher, I have encouraged students to think of AI as a power tool which they need to learn to use. Some other teachers treat the use of AI as “cheating”. For me it is no more cheating then using google to search. However…

Of late I have discerned a dark pattern which I had not identified before. And this applies to students but to myself as well. AI in coding gives a nice sugar high. Instead of thinking and understanding how my code works or how a new API works, it is so easy to get the code from AI and just try it. I recently dug into async in Python which I had not used before and that was the trap I fell into.

Now we all know that the code that AI is n to necessarily correct. But it may look almost correct, in that it is syntactically right and sort of works usually.

The problem is that while it an almost correct piece of code it is often the totally wrong solution to your problem. In other words, it often sets you on the wrong path. A dead end. The trap is that you spend your time debugging an approach that is totally wrong.

When does this happen? I find that it happens when I am tackling something I don’t really understand and want a shortcut to my sugar high. Upon reflection I have found more than once that I spent hours debugging an approach which, once working, I realized was all wrong and I had to start over.

So my lesson is: beware of using code generated by AI, not just because it may be “wrong” or “buggy” but because it sends you in a wrong direction and you end up with a cul-de-sac solution which is sub optimal and in the end you will have to rewrite.

Random Nerd Tutorials | Learn ESP32, ESP8266, Arduino, and Raspberry Pi

Link: Random Nerd Tutorials | Learn ESP32, ESP8266, Arduino, and Raspberry Pi: "Random Nerd Tutorials helps makers, hobbyists and engineers build electronics projects. We make projects with: ESP32, ESP8266, Arduino, Raspberry Pi, Home Automation and Internet of Things. If you want to learn electronics and programming, you're in the right place."

I just came across the linked catalog of free tutorials. Looks like it could be very useful! Arduinos, Raspberry Pis, and more.

A Comprehensive Guide to Python Project Management and Packaging: Concepts Illustrated with uv – Part I – Reinforced Knowledge

Link: A Comprehensive Guide to Python Project Management and Packaging: Concepts Illustrated with uv – Part I – Reinforced Knowledge: ""

Linked is a useful and comprehensive series about packaging in python. The fact that there are so many of these is evidence that, a) I am still confused about some of this, and b) the state of packaging in python is and remains a mess. I don’t know how we are going to get out of this?

1969: Can You Land on The Moon? • A Python turtle Lunar Lander

Link: 1969: Can You Land on The Moon? • A Python turtle Lunar Lander: "Revisiting one of my favourite projects: a lunar lander using, yes, the one and only turtle module"

Linked is an article about the “turtle” Python package. It’s a simple and elegant API for creating simple visual animations, simulations and/or games. I had never come across it before and it looks like a good addition to my toolkit.

Ronynn's Blog Overthinking Analytically - Game Development, Tech, Productivity & Writing

Link: Ronynn's Blog Overthinking Analytically - Game Development, Tech, Productivity & Writing: "Explore Ronynn's insights on game development, tech, productivity, and writing."

Attached is an article that is guaranteed to be clickbait for my people. Certainly for me! I use both Ruby and Python. Lately more python because the stuff I am working on uses Python. And let’s face it Python is, generally speaking, a more mainstream language. I don’t find the arguments made in the attached article especially compelling. I would say that Ruby and Python are more similar than different but in the end, for many reasons, I would use Ruby if I had a choice.