Tuesday, July 15, 2025

Building Up Anytime and Always Studios - Studio Journal - Issue #3

Lego Coding

A Simple Way to Learn How to Code Using AI

 By A.A. Lopez

Introduction

                  I am not a huge fan of the use of AI in various forms, especially those in the creative realm. Does that mean I think AI is the devil and should be tossed out? Not entirely, I do believe that there is some use out of this tool, but I do believe that it needs to become more refined and set up in a way that it is not damaging to the environment or be used as a substitute for actual knowledge. As I said, this is a tool, and like any other should be limited in what it does and how useful it is. After all, while you can use a screwdriver to hammer a nail in, a hammer will do a much better job.

                  So why then am I writing this post about using it to learn how to code? Doesn’t that take away from actual coding teachers, professors, writers? I’m not going to lie to you: Yes, it does. But it is my hope that those who see this might be able to take what I’ve found helpful from AI might be able to take it back and make something even more useful with that “oh-so-human-touch.” Cause while I may be learning to code via AI, there’s always a limit to what a machine knows verses a human.

Why Did I Start Using AI?

                  In my current role we have been asked to take up AI and find spots where it can be helpful to us. A lot of the major things that have been suggested was note-taking. However, as someone who mumbles and speaks at a rate that makes hummingbirds dizzy, I doubt that what I said would match the words written. So, I opted to find other issues that I could use AI for that might be beneficial to me and my team. One of these items had to deal with organizing files into their own CSV file.

                  There are several books that take several coding languages and tell you how to build out a code that can parse files and export CSVs. The main issue there is that it focuses too much on the general, and not what I needed specifically. Due to how my mind works if I can’t fit the puzzle pieces of my issue into the solution then I don’t understand. So, I decided that, if my employers want me to us AI then I’ll use it to do this.

                  Inputting the request, I asked, “Can you help me create a script or program that can parse a large amount of files and output one CSV file?” It responded in the affirmative and asked which language type I would like to use. Not knowing much about programming languages, I asked which would be the best option, with its suggestion being Python.

                  From there it generated the script, and because I was curious about it, rather than copy/pasting the script into a script editor, I decided to type out the code it generated. Getting a feel for each definition, function, letter, indentation. Even learning how to run it on Visual Studio Code and in my computer’s terminal. And when the first instance did not do well, I informed it of the error and asked it to tell me to check where to troubleshoot.

                  After about an hour and half of back and forth I was able to parse 1500 files in about 40 seconds with the script created. But now, I wanted to learn more about Python, more about coding. I had always wanted to learn more about these things, but after finishing a functional script that was for something I wanted to do, not just part of a classroom curriculum, it felt more tangible than ever.

                  I gathered books, watched YouTube tutorials, video essays, everything I could, but the itch of AI crept back. Wanting to get that feeling of getting something I wanted it done without having to worry about substitutions or needing to have to go through the start of every “hello_world” lesson there is. But I couldn’t just ask for it to generate the script… or at least not fully.

Lego Coding

                  This is what I’ve come to find has been helpful in me understanding and getting more in tune with programming languages, a system I’m calling, “Lego Coding.” Instead of having the AI generate the script in a whole form, I’ve asked it to break it down to snippets of itself, out of order, with no knowledge of what to import, or sometimes with misguiding function names and even red herring snippets that are there for no reason. Just like a kid with a Lego set, but with no true instructions.

                  I then interlock the pieces, find what’s working, what isn’t, run the code and keep going until I get it right. Unlike with the most standard ways of teaching programming this gives me a sense of accomplishment and lets me understand how the language interacts with other pieces of itself. I’ve come to understand Object Oriented Programming form this method, I’ve come to understand how to set up creating new version names for output files.

                  Just like a child with that colorful box of Legos, I first started making simple brick houses, then square castles, to landscapes, people, and other fantastical things others can only dream of.

Closing

                  With all that said, do I think AI should be a way to learn how to code? No, definitely not. Does it work for me right now? Yes, but doesn’t mean it always will, especially like a lot of folks I’m prone to shortcuts, and eventually I’ll go ahead and say to the AI, “Just do it for me.” That is something I don’t want to happen.

                  But do I think that something like Lego Coding would be helpful to people? Yes. I think there are people out there who relish the puzzle, the challenge, and the satisfaction of putting all this together. I think it should be a method that people teach to the next generation of programmers. I may be wrong, I’ll fully admit, but I do think it’s something that has a possibility of bringing in folks to something they might feel is out of their reach.

 

No comments:

Post a Comment

End of Week Update - 008

End of Week Update - 008 By A.A.Lopez     You know, I tend to start each of these EoW updates with "Oh, I'm so tired," or ...