[ thisoldcabin.net ]

you are here: thisoldcabin.net » chatgpt

ChatGPT - the brilliant tutor for us mediocre nerds

Early summer 2024

I hear you. Yes - ChatGPT is overhyped, environmentally unfriendly, prone to hallucination, stupid, violating copyright, unethical and a ton of other negative things. I know and I agree. But now that we're clear on that, it's quite a few useful things as well. I've been quite an active user of the service more or less since launch. In all probability there are other similar services that might even be better, but I never bothered enough to investigate since it served enough of my purposes.

One thing that I have realized is how great a tool it is to learn stuff that in one way or another relates to programming or scripting. I have been a computer nerd since early childhood and have absolutely been dabbling in mostly everything that can be done on a screen. One of those things have been programming in various languages ranging from Basic to 68000-assembler. BUT, first of all I suck at coding. I always sucked at coding. Also I haven't done more than a handful of code between roughly 1999-2022. And I am most certainly more of a "jack of all trades" rather than a specialist. I will never be a skilled coder, because I simply haven't got the time, focus or mindset to be one, and I'll happily admit that.

Enter ChatGPT (or any other LLM capable of general coding in various languages) - your own personal 24/7 mentor that will never grow bored of your stupidity. Hail the devil, I'll abide by the horns and be happy about it.

A few examples

Building this site. I used to make homepages. In the mid nineties... When tables and frames were the talk of the town and playing MIDI-files as background music to your site seemed like a reasonable idea. I miss those days, but this small thing called CSS wasn't all that bad when everything comes around. I've used CSS to some extent during the last 20+ years, but always a few years apart and never to an extent where I learn it by heart. And that will most probably be the case forever.

I used to pester my web developer friends with my stupid CSS-questions and send code back and forth, always feeling like an idiot and also aware that I'm taking up their valuable time explaining to me why I had done something stupid on line 12, 47 and 116 and that my idea of a good structure wasn't in fact a structure at all. Now I have someone that won't mind, will look at my code and carefully explain what's wrong and suggest how I fix it (or not, depending on my own choice) and also answer questions like "I'd like to have a class that looks like a hanging stack of index card from the top of this container" (which, as it turned out, was a horrible idea). Simply put, using ChatGPT most certainly enabled me to find the time to actually get this site done at all.

Learning to code C on MorphOS. Oh yes - finally something useful to the majority of mankind, I hear you thinking. But nonetheless, let's first start with the fact that I've almost never done any C coding even though I would consider that to be almost expected common knowledge to at least work around the basics. Especially because of the major influence C has had on a lot of other languages. But why on MorphOS? Well, why not? The reason I want to code at all is mainly related to vintage computers (mainly the Amiga), and my MorphOS PowerBook G4 is the closest thing to a portable Amiga that I can think of. And I am not really into emulation if I can avoid it. So because of convenience and enough similarities to "the real deal" I found it to be the perfect couch-programming device.

You wouldn't have to look far on Youtube, blogs, forums or whatever to find examples where ChatGPT will give you erronous or stupid/dangerous code. Or fail when you tell it to do X, Y or Z. But I believe the strength isn't in that field, it's once again using it as a mentor. If you are skilled enough to be fluent in programming I suppose there are tons of ways an LLM will help you, but there's definately tons of ways it won't as well. For me being a truly mediocre coder at best, I need someone to give me "homework", look through my code and comment it, explain syntax and make walkthroughs of example code. And that's something ChatGPT does great.

A typical conversation has usually been something like "Explain the basics of structs and show an example on how it's used", "Great, give me a homework assignment where I need to use the things I just learned" and "Tell me what's wrong with my code but let me figure out how to solve it myself". I was surprised at how useful this approach to learning is, and will without doubt use it a lot more in the future.

Making and understanding scripts. This has become an unexpected highlight. To be honest, I haven't done much scripting at all since the Amiga days in the late nineties. I've come to look at .sh files with scepticism due to the simple fact that I haven't really understood them.

The most common conversation with ChatGPT regarding scripts has actually been "Explain every part of this script for me". Great tool to dig out what's actually happening and learning a lot in the process. But this field is also where prompts are most likely to succeed. "Give me a bash script that goes through all files in this folder recursively and changes every instance of 'http' to 'https'. End the script with a summary on what files that are affected" will give you a fully working piece of code that you'll probably want to edit a bit yourself in the end. But the amount of time saved from building it myself with close to zero knowledge to start with will make it highly worthwile. I've also used the same approach for building ARexx-stuff on Amiga, which makes me happy that it's a useful tool also for vintage computing.

Conclusion

Using LLM's might not be your cup of tea. Especially if you already are highly skilled in the topic you're investigating or are looking for a tool that will give you finished applications from simple prompts. But for a mediocre nerd as myself it is extremely useful and also a lot of fun.

As an unintentional feature, I wouldn't be overly concernet about the ethical aspects of what codebases are used either when working with learning the basics and then correcting your own productions. There will be enough public domain out there to supply any LLM with sufficient info on that. However, I fully understand why ChatGPT-generated code is being banished from contributing to many open source projects and respect that, but that's not where I aim at this point anyway.

And as a last touch, don't be that person only complaining that ChatGPT is stupid because it gave you a wrong answer to a question. Learn what kind of tool it is and how it can be useful instead. If you want to bash ChatGPT or other current AI applications there are no shortcomings in other arguments to be found.