{"slug": "code-like-a-pirate-with-ai", "title": "Code Like a Pirate with AI", "summary": "John Arundel, writing for an unspecified publication, presents a six-step workflow called 'Code like a PIRATE' for using JetBrains' AI coding agent Junie, emphasizing planning, iterating, reviewing, and assessing AI-generated code. The guide applies to other AI tools like Claude Code, ChatGPT, and Codex, and aims to help developers effectively collaborate with AI agents.", "body_md": "Aug \n 4\n\nAug  4 \nCode like a pirate with AI\n\nJohn Arundel\n \n\nSource image by Reiterlied, licensed under \nCreative Commons\n\nAhoy, maties! Cap’n Long John Arundel here with more tips on sailing\nthe good ship Go. This time, we’ll lay aloft to the crow’s nest and turn\nour spyglass on AI tools. Arrr ye ready to vibe-code like a pirate?\nLet’s weigh anchor and see what booty we can find on the AI seas.\n\nFor this tutorial, I be using Junie, the JetBrains AI coding agent,\nbut the same workflows and prompts apply to Claude Code, ChatGPT, Codex,\nor any other scurvy tool ye fancy. Technically, it’s not necessary to\nprompt them using pirate speak (but it’s a lot more fun, and works just\nfine).\n\nFlying the black flag\n\nYour first voyage with AI development tools can be a perilous one,\nveering from calm seas of code to storms of syntax errors and test\nfailures. So, will your AI agent be a trusty first mate, or just an\nunpredictable \nstochastic\nparrot\n squawking nonsense from your shoulder?\n\nJunie is pretty smart, and she can tackle any task you choose, but\nshe needs the guidance of a good cap’n. To help you stay on course, I’ve\nput together a handy six-step workflow I like to call “Code like a\nPIRATE”. Aye, ‘tis another o’ my \nmade-up\nacronyms\n—but ye’ll find it easy to remember, me hearties [\nAre we\ndoing the pirate thing for the whole article?—Ed.\n]\n\n“P” is for Plan\n\nEvery good voyage begins with a map. When you set Junie a task, tell\nher where the ship’s headed, so she’ll know which direction to steer.\n(I’m sure Junie won’t mind me calling her “she”; fun fact, lots of\npirates were women—including \nquite a few of the\nmen\n).\n\nAsk Junie to draw up a quick chart for the voyage, but not to set\nsail until you’ve approved it:\n\nIt’s important to get this stuff right before you even leave the\ndock, so don’t be afeared to spend a bit of time refining the plan.\n[\nI’m “afeared” we might be wearing out the salty sea-dog bit\nalready—Ed.\n]\n\n“I” is for Iterate\n\nEven the boldest captains don’t try to cross an ocean in a single\nleap. It’s more effective to island-hop, sailing a short distance at a\ntime and checking you’re still on course. Give Junie one small task at a\ntime, starting with the simplest possible program that could be\nuseful:\n\nWith too vague a heading, Junie can end up going a bit adrift, like\nany of us: don’t hesitate to cry “Avast heaving there!” and interrupt\nher if that happens. Rowing back when the project has gone too far in\nthe wrong direction will cost you a lot of time and doubloons\n[\nSeriously, clap a stopper on the pirate speak for now—Ed.\n].\nSorry, I meant to say “tokens”.\n\n“R” is for Review\n\nOnce Junie has completed each iteration, go through the code line by\nline to check and review her work. She’s pretty good at delivering\n\nwhat\n you asked for, but she doesn’t necessarily know\n\nhow\n you want it. For example:\n\nWhen giving feedback, bundle all your comments together in one\nmessage. This lets Junie generate the new version of the program in a\nsingle step, saving tokens. If you keep making small comments and asking\nher to rebuild the whole program each time, you’ll find your pieces of\neight—I mean, credits—dwindling rapidly.\n\nGood programs have a harmonious architecture that makes overall\nsense: everything works the same way everywhere and it all seems to fit\ntogether neatly. Junie can’t achieve this without your guidance, so keep\na hand on the tiller and help her ensure things slot neatly into a\nunified structure.\n\n“A” is for Assess\n\nOnce Junie has finished the step you asked for, don’t just glance at\nthe code and move on—take a moment to assess whether it actually does\nwhat it should. Does the program run cleanly? Do the functions behave as\nexpected? Are there strange side effects lurking in the bilges, waiting\nto sink your ship later? [\nWhat did I \njust\n\nsay?—Ed.\n]\n\nNow that you can see the program in action, you might realise it’s\nnot quite what you want. If so, now’s the time to adjust course, either\nwith Junie’s help or by making little steering inputs yourself.\n\nIf you’re happy with the assessment, though, you can move on to the\nnext iterative step towards the final program:\n\n“T” is for Test\n\nNo old salt trusts a ship that hasn’t been through its sea-trials,\nand nor should you. As you and Junie build the program, check each new\nplank is watertight by adding tests to accompany each function. That\nway, you’ll know as soon as something springs a leak.\n\nJunie can be a helpful shipmate when it comes to drafting tests, but\ndon’t just accept her handiwork blindly. Ask yourself: What is this\nreally testing? Are there hidden reefs—edge cases—that we’re missing?\nAnd, when the tests fail (they’re no use otherwise) do they print\nsomething helpful?\n\n“E” is for Evaluate\n\nMachine learning is fine, but \nhuman\n learning is even better.\nAfter each task, take a little time to analyse what worked, and what\ncould have gone better.\n\nWere your prompts detailed enough? Did Junie sail safely into\nharbour, or did she end up grounded on a sandbar because her pilot was\ntoo busy splicing the mainbrace? Every voyage is a lesson that’ll help\nyou sharpen your prompting skills, anticipate pitfalls, and become a\nsteadier pirate cap’n for the next expedition.\n\nIf you remember the chart we’ve drawn here and use it to navigate\nyour next project, with the help of Junie or your AI shipmate o’choice,\nyou’ll be ready to truly code like a PIRATE [\nThat’s it, you’re\nwalking the plank—Ed.\n].\n\nAnchors aweigh\n\nCheck out the \nbooty\ncalculator project\n to see what Junie and I built together—try using\nit to divvy up your own pirate booty with friends. (It’s also kind of\nfun to say “booty”.)\n\nUntil next time, shipmates, wishin’ ye fair winds and full sails!\n\nLegal disclaimer:\n \nBitfield Consulting does not\nadvocate piracy, illegal seizure of vessels on the high seas, or the\nconsumption of rum. Please swashbuckle responsibly.", "url": "https://wpnews.pro/news/code-like-a-pirate-with-ai", "canonical_source": "https://bitfieldconsulting.com/posts/code-like-pirate", "published_at": "2026-08-04 19:09:15+00:00", "updated_at": "2026-08-04 19:22:39.298713+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents"], "entities": ["John Arundel", "JetBrains", "Junie", "Claude Code", "ChatGPT", "Codex"], "alternates": {"html": "https://wpnews.pro/news/code-like-a-pirate-with-ai", "markdown": "https://wpnews.pro/news/code-like-a-pirate-with-ai.md", "text": "https://wpnews.pro/news/code-like-a-pirate-with-ai.txt", "jsonld": "https://wpnews.pro/news/code-like-a-pirate-with-ai.jsonld"}}