Over the last year i have gotten more invested in programming and building my own projects. Naturally this coinciding with the rise of LLM's, i found myself heavily relying on them and their power. Although i started notice my learning and skills fading, so i felt it necessary to come up with some solutions to combat this, while not having to give up AI entirely.
Table of Contents
AI, Our Lord and Saviour
It seems over the last year every company under the sun is trying to adopt AI in some way. Toting it as the saviour of the tech industry, how it can slash spending, raise profits and boost productivity. I can't confidently say i agree with the last few statements whole heartedly, but there still may some truth to them.
At my day job i work as a cyber security analyst, so generally programming isn't a huge part of the role, although from time to time it does help. Over the years i have always dabbled in Python and started learning Python before LLM's where ever on the scene, never formally trained i learnt from youtube videos, articles and stack overflow. I would be lying if i didn't say at times this could be a frustrating experience.
Even when you find "the answer" on stack overflow, as a beginner you struggle to fully understand it because its not being used in the exact context you are trying to use it in. This results in some copy and pasting and from time to time more frustration because it's still not working as intended.
So what's the problem here? Well it comes down to not understanding the core concepts of the language. So i endeavoured to go back to basics and learn the fundamentals of the language. I also began to try Django as my web framework as i was getting an interest in web dev as a hobby. Well at this point i started to feel out of my depth again, there was so much to learn about how Django operated. I followed online tutorials to build basic cookie cutter things, but eventually i want to build something of my own and thats where the LLM Came in.
It was at this point the AI felt like a lord and saviour, just like many others i was thinking how incredible is this? I can just tell it what functionality i want and its able to build it for me instantly and it works! No more struggling with stack overflow answers that aren't specific to my context, i could just get what i wanted instantly. I felt invigorated, i was building things faster and without much struggle, i was feeling insanely productive. Although at some point i was starting to realise that i was actually having my time wasted without realising it.
AI, The Time Waster
Like many people i have heard talk about LLM's, there is a general consensus we are starting to rely on them more and more even for basic stuff we can do ourselves. I started falling into this trap. I was getting the dopamine hit of fast development and actually seeing features appear on the screen. I started getting to the point of pretty much getting it to do everything without realising.
I think this was particularly dangerous for me, as i was still learning a lot about Django. My unfamiliarity and uncertainty on how to do things made me rely more and more on the LLM and less on myself. Although overtime i started to run into road blocks. Certain more complex code wasn't working for me and i didn't really understand why, i was stuck in prompting hell trying to get the LLM to give me code that works. Often i would spend hours down this rabbit hole and still not get what i was looking for out of it, to me this is the definition of time wasted. Specifically because i didn't learn anything.
It's okay to fail along the journey but generally if you are failing on your own accord you learn a lot through that process, although having an LLM failing me for hours doesn't really teach you much. Mainly because you aren't trying to solve the problem yourself, you are getting someone else to.
I recently ran into an issue with the LLM that summed up particularly well this issue. I was using HTMX to fetch data from my backend, i needed to grab the same data and render it in two seperate ways depending on the user interaction inside a popup window. I asked the LLM to get me a head start and because it knows i'm using HTMX it lead me down that path to solve this problem.
Well to put it simply it didn't solve the problem, even to the point it started hallucinating slightly, although at the time i didn't know it was. An hour or so later i said fuck it and just tried a different approach using vanilla JS and a tiny bit of HTMX and amazingly it worked first time. As i've gotten more competent within my stack i'm noticing more and more if i just take the time, i can often solve the problem quicker and simpler myself.
Using AI frequently takes away your confidence as a programmer, you start to doubt yourself because you having been relying on someone else. I think this is incredibly dangerous, this was starting to disturb me more and more and i decided to make some changes.
AI, The Mentor
The first change i made to my mentality, was treating it more like a mentor. Now i have to say if you have the opportunity to have a real mentor either in your work place or life, that should always be your first option, but if you dont like me, AI can help you in some pretty cool ways.
Now what does a mentor do? Well usually they wont straight up write code for you and probably be pretty annoyed if you come to them to do something without even trying it yourself. A good mentor or teacher will never just give you the answer, they'll try and point you in the right direction and maybe point at some things you are doing wrong. Although if you really cant figure it out after trying they can show you the way to do it. This is the approach i'm now taking and to break it down even more it looks something like this:
- Try to add the feature or solve the problem myself
- If i cant figure it out, ask the LLM to point me in the right direction (with no code snippets)
- Still cant figure it out? Show the LLM your code and ask what you are doing wrong (still no code snippets)
The important thing here is that you have at least 3 steps before getting the answer given to you. I also thinks its important to get the LLM to explain the code it has given, line by line and you take the time to really understand it. I also started not copy and pasting, even if i was given a solution i would glance at it and then try and write it myself, because if i truly understand the solution i should now be able to write it without a copy and paste. I also think writing code yourself is important for muscle memory and retaining the knowledge.
I would also start using it in a way to not necessarily give me the solution but to give me the thought process of the steps i need to do and then figure out certain choices for myself. Asking it things like:
"Should i store this data in a single model or in two seperate models"
"Should i do this client side or server side?"
It would then give me the pro and cons of both approaches and i could then make a decision on what i think is best for me. Which is really valuable for someone with no formal training or experience. Really its about focusing more on asking it questions that don't have direct code snippet solutions, but questions that make you think.
I think its important to also remember when you are still learning you simply dont know what you dont know. For example i had a for loop in my Django template where i was outputting a bunch of individual data, i needed to find a way to group this data into the years they were created, i honestly didn't really know how to approach this in a way that would work easily with my front end styling.
The LLM informed me of Django template groups, which i didn't know existed. It explained it to me a gave me a few code examples, i think stuff like this is extremely valuable and isn't taking anything away from your skills or learning. In this case we are using it as a tool to point us in the right direction, not outright solve the problem for us.
AI, The Employee
Okay so there are certain things, especially when developing something solo that just aren't worth spending hours on to either learn or fix. For me this is CSS. I would say i have a decent understanding of CSS but sometimes you need to do some complicated things and it can get confusing and daunting.
I know my skills lie more in backend programming and javascript on the frotend, but being stuck in the weeds over CSS isn't something i care for. It's one of those things that if i could hire a proper frontend dev to solve these issues and take the pain away i would. But financially for me that really isn't feasible. This is one of those instances where i treat the AI as an employee. Im not too fussed if i'm not understanding everything it's doing with my CSS, as long as i can control the overall design i'm happy. It would be like telling an employee what you want and trusting them to get it done.
Now of course ideally i would love to have an actual dev do this for me, with their insight and design experience and the ease that would bring, but i don't. My point being is if its something you aren't particularly interested in and probably wouldn't be doing if you could hire someone, AI can be a nice alternative to this. You can treat it like an employee and get it to do some tasks you yourself dont want to focus on.
Closing Thoughts
To try to put this all succinctly, i think its important to not get sucked in to the dopamine rush that AI can bring from fast development and the struggle it can alleviate from fixing bugs. Of course it's contextual depending on your experience level, but a warning to beginner to immediate programmers is to make sure you aren't using it as a replacement for actually understanding and learning your code.
Try to find the joy in writing lines of code yourself and ownership that comes with that. Use AI in a way that aids your learning and experience and boost productivity in areas you aren't so focused on. Ask it more for guidance not solutions and find the fulfilment in making something that is truly yours. Not with just Command + C and Command + V, but with everyone of your fingertips.