AI & Coding: 7 Tips to Tame the Beast and Code Like a Pro
- Linford
- Apr 20
- 4 min read

If you’ve dipped your toes (or jumped straight) into the world of coding with AI, you’ll know it’s like working with an enthusiastic intern. One that sometimes gets it brilliantly right… and sometimes rewrites your whole codebase because you sneezed too loudly. Used well, AI can be your superpower. Used wrong, and it’s a full-on “that’ll do, donkey” moment. So whether you’re a seasoned dev or just figuring out what a semicolon does, here’s your crash course in making AI your co-pilot, not your chaos agent.
1. Context is Everything. Seriously Everything.
Want AI to write a script? Awesome. But first, set the stage like you’re briefing a film crew. What language are we writing in? What version of the program are you using? Any libraries, frameworks, plugins, or other scripts in the mix? Is this meant to integrate with something else? The more you give, the better it performs. Give all that context to AI before asking it to write/fix your code. Think of AI like a junior coder on their first day, it can do great things, but only if you hand it the whole manual, not just the headline.
💡 Top Tip: Get it to analyse your environment, provide screenshots of the object the script will affect, any components and settings on parent/child objects? Before writing the code. You'll thank yourself later.
2. “Do Not Truncate” – The AI Safety Phrase That Kinda Works.
Ever asked AI to tweak one part of your script only to find it’s rewritten half your project and helpfully deleted essential logic “because it wasn’t relevant”? Yeah. Classic move. Try adding “Do not truncate the rest of the code” to your prompt. It won’t always listen (AI's a bit rebellious like that), but it can help keep your original work stay intact. Even better? Just paste the snippet you want changed. Keep it small, tight, and surgical. AI thrives on precision. Otherwise it’s like using a sledgehammer to fix a watch.
3. Know When to Break It Up – Big Scripts, Small Bites
AI isn’t great with long scripts. Once you’re over 100 lines, it might just… trail off. You’ll get a “rest of code goes here” and a sheepish shrug in code form. Split your code request into manageable chunks: “Can you generate Part 1?”- “Great, now continue from Line 101…”This keeps things flowing and makes debugging way easier later on.
4. Read the Room (a.k.a. Read the Notes Below the Code)
You see shiny code get written before your eyes. You copy. You paste. You break your entire project. We’ve all done it. Here’s the deal: the explanation AI gives below the code often includes critical bits. Maybe it’s referencing another script. Maybe it misunderstood your request. Maybe it needs you to tweak a setting elsewhere. Either way, read it. Don't get hypnotised by the code alone, treat the commentary like tooltips for your future sanity.
5. More Context. Always More. Double It. Triple It.
Yes, we already talked about context. But it’s that important it deserves another round. Keep everything in the same chat thread. Reference other scripts. Mention what's gone wrong and what's gone right. If you tell AI what has worked it, it wont tweak that part any further. Tell it what you’re building and what not to break. Treat it like a long-term coding partner because the more it knows about your ecosystem, the better it plays with it. However, sometimes giving it a fresh start, a new chat and a reminder of what latest code your working on it needed as AI can be confused by exactly what you want with older requests.
6. AI Gets You 95% There. You Still Need to Finish the Race
If you’re not a confident coder, AI is a dream. It can write the code for you saving hours of manually inputting "If else" coding language. Simulate a working prototype, even fix your syntax. But it’s not perfect. Always, check what it spits out. Run and test thoroughly. Understand the why behind what it did. You’ll grow faster, spot future bugs sooner. Sometimes the simple solution is overlooked by AI and that's usual its missing a class. (If you know, you know).
7. No, AI. No Emojis in the Code. Stop That.
Here’s a weird one: sometimes, especially with ChatGPT, AI will sprinkle in an emoji or two while writing code. Fun for co-worker group chats, messages with friends and birthday cards. Fatal for Unity, Python, or pretty much any programming language that isn’t expecting to interpret a winking face as part of a function. In my experience with Unity, it's not here for your cute smiley faces it’ll throw errors faster than you can say “syntax invalid”. I like to think it's internally screaming "What does this mean?". So, what to do? - Say “please do not include emojis in the code you create” in your prompt. Then, check the code output manually. If it’s a repeat offender, remind it every few prompts. Think of emojis in code like glitter at a wedding. Looks fun at first. Haunts you forever. Thankfully the programs that use the script will make it pretty clear, the script isn't going to work. Its not that the code is wrong it could just be a sneaky "Tick box" emoji playing hide and seek.
Final Thoughts: Code with AI, Not Through It
AI isn’t your coding overlord. It’s your sidekick. A genius, slightly chaotic sidekick. It can accelerate your workflow, teach you new tricks, and dig you out of messy bugs, but only if you guide it well. So give it the tools. Keep it focused. Always double-check its work. And maybe… just maybe… you’ll finish your project with fewer emotional breakdowns.
What’s Been Your Funniest (or Most Frustrating) AI Coding Moment?
Did ChatGPT rewrite your entire game menu when you just wanted a sound effect added? Got a rogue emoji that broke your compiler? Let’s hear your best AI coding stories in the comments 👇
Comments