A few months ago, a colleague screamed at Microsoft Copilot like he was auditioning for Bring Me The Horizon. He typed, “Make this into a presentation.” Copilot spat out something. He yelled, “NO, I SAID PROFESSIONAL!” It revised it. Still wrong. “WHY ARE YOU SO STUPID?” And that, dear reader, is when it hit me. It’s not the AI. It’s you. Or rather, your prompts. So, if you've ever felt like ChatGPT, Copilot, Gemini, or any of those AI Agents are more "artificial" than "intelligent"? Then rethink how you’re talking to them. Here are 10 prompt engineering fundamentals that’ll stop you from sounding like you're yelling into the void. 1. Lead with Intent. Start with a clear command: “You are an expert…,” “Generate a monthly report…,” “Translate this to French…" This orients the model instantly. 2. Scope & Constraints First. Define boundaries up front. Length limits, style guides, data sources, even forbidden terms. 3. Format Your Output. Specify JSON schema, markdown headers, or table columns. Models love explicit structure over free form prose. 4. Provide Minimal, High Quality Examples. Two or three exemplar Q→A pairs beat a paragraph of explanation every time. 5. Isolate Subtasks. Break complex workflows into discrete prompts (chain of thought). One prompt per action: analyze, summarize, critique, then assemble. 6. Anchor with Delimiters. Use triple backticks or XML tags to fence inputs. Cuts hallucinations in half. 7. Inject Domain Signals. Name specific frameworks (“Use SWOT analysis,” “Apply the Eisenhower Matrix,” “Leverage Porter’s Five Forces”) to nudge depth. 8. Iterate Rapidly. Version your prompts like code. A/B test variations, track which phrasing yields the cleanest output. 9. Tune the “Why.” Always ask for reasoning steps. Always. 10. Template & Automate. Build parameterized prompt templates in your repo. Still with me? Good. Bonus tips. 1. Token Economy Awareness. Place critical context in the first 200 tokens. Anything beyond 1,500 risks context drift. 2. Temperature vs. Prompt Depth. Higher temperature amplifies creativity. Only if your prompt is concise. Otherwise you get noise. 3. Use “Chain of Questions.” Instead of one long prompt, fire sequential, linked questions. You’ll maintain context and sharpen focus. 4. Mirror the LLM’s Own Language. Scan model outputs for phrasing patterns and reflect those idioms back in your prompts. 5. Treat Prompts as Living Docs. Embed metrics in comments: note output quality, error rates, hallucination frequency. Keep iterating until ROI justifies the effort. And finally, the bit no one wants to hear. You get better at using AI by using AI. Practice like you’re training a dragon. Eventually, it listens. And when it does, it’s magic. You now know more about prompt engineering than 98% of LinkedIn. Which means you should probably repost this. Just saying. ♻️
Tips for AI-Assisted Programming
Explore top LinkedIn content from expert professionals.
Summary
AI-assisted programming refers to the practice of using artificial intelligence tools to help write, review, and manage code. By communicating clearly and breaking tasks into smaller steps, anyone can improve their collaboration with these tools and speed up their programming workflow.
- Define clear goals: Always explain your project objectives, code structure, and constraints when starting a session with an AI assistant.
- Break down tasks: Divide larger coding challenges into smaller, manageable prompts or questions to help the AI deliver more accurate results.
- Ask for explanations: Request the AI to explain its code suggestions or tradeoffs so you can better understand and validate its output.
-
-
After spending 1000+ hours coding with AI in Cursor, here's what I learned: 1️⃣ Treat AI like your forgetful genius friend, brilliant but always needing reminders of your goals. 2️⃣ Context rules everything. Regularly reset, condense, and document your sessions. Your efficiency skyrockets when context is clear. 3️⃣ Start by sharing your vision. AI can read code but not minds; clarity upfront saves countless revisions. 4️⃣ Premium models pay off. Gemini 2.5 Pro (1M tokens) or Claude 4 Sonnet are worth every penny when tackling tough problems. 5️⃣ Brief AI as you would onboard a junior dev, clearly explain architecture, constraints, and goals upfront. 6️⃣ Leverage rules files as your hidden superpower. Preset your coding patterns and workflows to start smart every time. 7️⃣ Collaborate with AI first. Discuss and validate ideas before writing any code; it dramatically reduces wasted effort. 8️⃣ Keep everything documented. Markdown-based project logs make complex tasks manageable and ensure seamless handovers. 9️⃣ Watch your context window closely. After halfway, productivity dips, stay sharp with quick resets and concise summaries. 🔟 Version-control your rules. Team-wide knowledge-sharing ensures consistent quality and rapid onboarding. If these insights help you level up, ♻️ reshare to boost someone else's AI coding skills today!
-
Whether you're using Replit Agent, Assistant, or other AI tools, clear communication is key. Effective prompting isn't magic; it's about structure, clarity, and iteration. Here are 10 principles to guide your AI interactions: 🔹 Checkpoint: Build iteratively. Break down large tasks into smaller, testable steps and save progress often. 🔹 Debug: Provide detailed context for errors – error messages, code snippets, and what you've tried. 🔹 Discover: Ask the AI for suggestions on tools, libraries, or approaches. Leverage its knowledge base. 🔹 Experiment: Treat prompting as iterative. Refine your requests based on the AI's responses. 🔹 Instruct: State clear, positive goals. Tell the AI what to do, not just what to avoid. 🔹 Select: Provide focused context. Use file mentions or specific snippets; avoid overwhelming the AI. 🔹 Show: Reduce ambiguity with concrete examples – code samples, desired outputs, data formats, or mockups. 🔹 Simplify: Use clear, direct language. Break down complexity and avoid jargon. 🔹 Specify: Define exact requirements – expected outputs, constraints, data formats, edge cases. 🔹 Test: Plan your structure and features before prompting. Outline requirements like a PM/engineer. By applying these principles, you can significantly improve your collaboration with AI, leading to faster development cycles and better outcomes.
-
I've been using AI coding tools for a while now & it feels like every 3 months the paradigm shifts. Anyone remember putting "You are an elite software engineer..." at the beginning of your prompts or manually providing context? The latest paradigm is Agent Driven Development & here are some tips that have helped me get good at taming LLMs to generate high quality code. 1. Clear & focused prompting ❌ "Add some animations to make the UI super sleek" ✅ "Add smooth fade-in & fade out animations to the modal dialog using the motion library" Regardless of what you ask, the LLM will try to be helpful. The less it has to infer, the better your result will be. 2. Keep it simple stupid ❌ Add a new page to manage user settings, also replace the footer menu from the bottom of the page to the sidebar, right now endless scrolling is making it unreachable & also ensure the mobile view works, right now there is weird overlap ✅ Add a new page to manage user settings, ensure only editable settings can be changed. Trying to have the LLM do too many things at once is a recipe for bad code generation. One-shotting multiple tasks has a higher chance of introducing bad code. 3. Don't argue ❌ No, that's not what I wanted, I need it to use the std library, not this random package, this is the 4th time you've failed me! ✅ Instead of using package xyz, can you recreate the functionality using the standard library When the LLM fails to provide high quality code, the problem is most likely the prompt. If the initial prompt is not good, follow on prompts will just make a bigger mess. I will usually allow one follow up to try to get back on track & if it's still off base, I will undo all the changes & start over. It may seem counterintuitive, but it will save you a ton of time overall. 4. Embrace agentic coding AI coding assistants have a ton of access to different tools, can do a ton of reasoning on their own, & don't require nearly as much hand holding. You may feel like a babysitter instead of a programmer. Your role as a dev becomes much more fun when you can focus on the bigger picture and let the AI take the reigns writing the code. 5. Verify With this new ADD paradigm, a single prompt may result in many files being edited. Verify that the code generated is what you actually want. Many AI tools will now auto run tests to ensure that the code they generated is good. 6. Send options, thx I had a boss that would always ask for multiple options & often email saying "send options, thx". With agentic coding, it's easy to ask for multiple implementations of the same feature. Whether it's UI or data models asking for a 2nd or 10th opinion can spark new ideas on how to tackle the task at hand & a opportunity to learn. 7. Have fun I love coding, been doing it since I was 10. I've done OOP & functional programming, SQL & NoSQL, PHP, Go, Rust & I've never had more fun or been more creative than coding with AI. Coding is evolving, have fun & let's ship some crazy stuff!
-
AI won't replace engineers. But engineers who ship 5x faster & safer will replace those who don't. I've been shipping code with AI assistance at AWS since 2024. But it took me a few weeks to figure out how to actually use AI tools without fighting them. Most of what made the difference isn't in any tutorial. It's the judgment you build by doing. Here's what worked for me: 1. Take the lead. •) AI doesn't know your codebase, your team's conventions, or why that weird helper function exists. You do. Act like the tech lead in the conversation. •) Scope your asks tightly. "Write a function that takes a list of user IDs and returns a map of user ID to last login timestamp" works. "Help me build the auth flow" gets you garbage. •) When it gives you code, ask it to explain the tradeoffs. 2. Use it for the boring & redundant things first •) Unit tests are the easiest win. Give it your function, tell it the edge cases you care about, let it generate the test scaffolding. •) Boilerplate like mappers, config files, CI scripts. Things that take 30 minutes but need zero creativity. •) Regex is where AI shines. Describe what you want to match and it hands you a working pattern in seconds. •) Documentation too. Feed it your code, ask for inline comments or a README draft. You'll still edit it, but the first draft is free. 3. Know when to stop prompting and start coding •) AI hallucinates confidently. It will tell you a method exists when it doesn't. It will invent API parameters. Trust but verify. •) Some problems are genuinely hard. Race conditions, complex state management, weird legacy interactions. AI can't reason about your system the way you can. •) use AI to get 60-70% there fast, then take over. The last 30% is where your judgment matters. 4. Build your own prompt library •) Always include language, framework, and constraints. "Write this in Python <desired-version>, no external dependencies, needs to run in Lambda" gets you usable code. "Write this in Python" gets you a mess. •) Context is everything. Paste the relevant types, the function signature, the error message. The more AI knows, the less you fix. •) Over time, you'll develop intuition for what AI is good at and what it's bad at. That intuition is the core skill. AI tools are multipliers. If your fundamentals are weak, they multiply confusion. If your fundamentals are strong, they multiply speed & output. Learn to work with them, it will give you a ton of ROI.
-
I started coding again when the first ChatGPT launched in November 2022—curiosity turned into obsession. Since then, I’ve tried nearly every AI coding tool out there. Recently, I’ve become hooked on Cursor. It’s common to see two extremes: • New/junior devs often overestimate what AI can do. • Senior engineers usually distrust it entirely. Both are wrong! The sweet spot is using AI as an empowering partner, not a full dev replacement. You’re still in control—AI can help you go faster and think deeper, but only if you stay in the loop. After months of heavy use, here are some practical tips and a prompt sequence I rely on for deep code reviews and debugging in Cursor 👇 ⸻ 🔁 1. LLMs have no memory. Every chat is stateless. If you close the tab or start a new thread, you must reintroduce the code context—especially for complex systems. 📌 2. Think in steps, not monolith prompts. Work in multi-step prompts within the same chat session. Review each output before proceeding. ⚠️ 3. LLMs tend to do more than asked. Start by asking: “What are you going to do?” Then approve and ask: “Now do only that.” 💾 4. Commit before you go. Save your last working state. AI edits can be powerful—and sometimes destructive. 🧠 5. Use the right model for the job. • Lightweight stuff → Sonnet 4 • Deep analysis or complex refactoring → Opus 4 or O3 (these cost more, but they’re worth it) ⸻ 👨💻 Prompt Workflow Example: Reviewing a Complex App with Legacy Code Here’s a sequence I use inside a single Cursor chat session: ⸻ 🧩 Prompt 1 “As a senior software architect, review this app. Focus on [e.g. performance, architecture, state management, UI]. Provide an .md doc with findings, code diagrams, and flow logic.” ✅ Carefully review what’s generated. Correct or expand anything that feels off. Save it for reuse. ⸻ 🔍 Prompt 2 “Based on this understanding, identify the top 5 most critical issues in the app—explain their impact and urgency.” Ask for clarification or expansion if needed. ⸻ 💡 Prompt 3 “For issue #3, suggest 2–3 possible solutions (no code yet). For each, list pros/cons and outline what needs to change.” Choose the most viable solution. ⸻ 🛠️ Prompt 4 “Now implement the selected solution step by step. After each step, run ESLint (and if available, unit tests).” ⸻ 🔬 Pro tip: Ask Cursor to generate a full unit test suite before editing. Then validate every change via tests + linting. ⸻ This is how I use AI coding tools today: as a thought partner and execution aid, not a replacement. Would love to hear your workflows too. #CursorIDE #PromptEngineering l #DeveloperTips #CodingWithAI
-
Agent-assisted coding transformed my workflow. Most folks aren’t getting the full value from coding agents—mainly because there’s not much knowledge sharing yet. Curious how to unlock more productivity with AI agents? Here’s what’s worked for me. After months of experimenting with coding agents, I’ve noticed that while many people use them, there’s little shared guidance on how to get the most out of them. I’ve picked up a few patterns that consistently boost my productivity and code quality. Iterating 2-3 times on a detailed plan with my AI assistant before writing any code has saved me countless hours of rework. Start with a detailed plan—work with your AI to outline implementation, testing, and documentation before coding. Iterate on this plan until it’s crystal clear. Ask your agent to write docs and tests first. This sets clear requirements and leads to better code. Create an "AGENTS.md" file in your repo. It’s the AI’s university—store all project-specific instructions there for consistent results. Control the agent’s pace. Ask it to walk you through changes step by step, so you’re never overwhelmed by a massive diff. Let agents use CLI tools directly, and encourage them to write temporary scripts to validate their own code. This saves time and reduces context switching. Build your own productivity tools—custom scripts, aliases, and hooks compound efficiency over time. If you’re exploring agent-assisted programming, I’d love to hear your experiences! Check out my full write-up for more actionable tips: https://lnkd.in/eSZStXUe What’s one pattern or tool that’s made your AI-assisted coding more productive? #ai #programming #productivity #softwaredevelopment #automation
-
If you find yourself constantly refactoring AI-generated code, you are skipping the most important step: The Conversation. Here’s the workflow that gives me high-quality code on the first write to disk: 1. Start with a conversation, not code • Explain the problem to the LLM in detail. • Tell it explicitly: “Propose an approach first. Show alternatives. Do not write code until I approve.” • Review the proposal, poke holes in it, iterate, then let it generate code. Treat it like a cognitive power tool, not an autocomplete. 2. Pick models that actually follow instructions • In my experience, GPT-5 high variant with codex is the best at respecting constraints and following “do not code yet” style directives. • Claude Sonnet 4.5 and Claude Opus 4 are solid runner-ups. • Many other models tend to ignore “do not code” and sneak in extra stuff you never asked for. 3. Set your coding standards once • Have something like a Claude/Agents.md (or equivalent system prompt) that defines: • Coding style • Architecture preferences • Clean code principles This becomes your reusable “engineering brain” the model loads every time that writes high quality code by default. 4. Control your context size • Don’t let the thread get bloated. • Use commands like /compact (or your tool’s equivalent) frequently. • Long, noisy context = degraded output quality. This workflow has made my coding sessions faster, more predictable, and has dramatically reduced the amount of refactoring I need to do because all the guidance is given up front.
-
More thoughts on Claude Code, prompted by Laura F. (thanks!): This is how I get higher quality results from Claude. By default, agentic / "vibe" coding can give you "good enough" code that gets the job done, but might be hard to maintain. Good software design and guidance to the AI is the key - AKA good software leadership 😄 The method I use is a modified form of what I do in my day job. I was a startup CTO for 10 years and have been an enterprise tech executive for the last 5. This approach delivers results, with people or AI! 1. Build a detailed high level design that describes the application and its major components, what major technical choices you want to make, and why. Include constraints and reasoning for decision making. 2. Validate the design with engineering spikes as necessary. Save the spikes for later reference and document your learnings. 3. Use the data you collected along with public documentation to build a series of low level designs, one per major component or system in the product. Validate the hell out of these designs! Make sure they clarify technical details of what needs to be built and that they show particularly tricky algorithms or technical choices in the design. Include diagrams, data designs, UX design, and a testing strategy. This phase is the most critical one to get right! When the context window gets compacted, these docs bring the AI back up to speed. 4. Build a project plan and break the work into milestones and sprints. Make sure the build order is correct. 5. Start building, but write tests first! Claude will default to just build code. Be clear that tests must come first, so you can know if you're moving in the right direction and not introduce regressions. You'll need to remind the AI throughout the process on this one. 6. Have Claude check what it's built against the low-level design docs frequently. Claude will diverge from the plan! You will also probably find that you want to change the plan. When you do, take the time to update the design docs. These docs are the beating heart of your product. They're truth, keep them true. 7. Iterate 😄 It'll take some time but this formula is working for me. Pro tip: When Claude gets stuck (throwing ideas at the wall, going in circles): Switch to plan mode, have it look up docs / blogs and see what others are doing. Or, start a fresh session. Sometimes Claude gets tunnel vision. I'd love to learn your tips too! 🎉
-
Today, let me share my two cents on AI Coding Assistants ... I have been using code assistants like Cursor and GitHub Copilot extensively recently. While productivity gains are undeniable, certain nuances must be considered to maintain long-term code quality. First, the notable advantages: >> Efficient Debugging and Documentation: AI assistants are excellent for generating unit tests, documentation, and brainstorming design patterns. Once I encountered a complex environment variable path conflict caused by multiple dependency versions. This type of issue is notoriously difficult to isolate, yet Cursor identified the root cause in under ten minutes. It saved hours of manual debugging. >> Rapid Prototyping: Exploring new frameworks is now straightforward. This provides leverage for researchers and non-engineers to build MVPs via "vibe coding" with ease. However, there are many pitfalls >> Code Verbosity: AI assistants, particularly Claude models, frequently generate more code than is strictly necessary. While some argue that prompt engineering can mitigate this, it remains difficult to prevent the AI from introducing over-complicated logic. >> Lack of Coherence: Automated changes can sometimes lack consistency across multiple files, likely due to internal context window limitations. Additionally, the tendency to include superfluous detail in documentation can clutter a codebase. >> Stale Training Data: LLM knowledge is often several months behind the latest releases. This is evident with fast-evolving libraries like TensorFlow. Relying on AI patches for outdated library versions without understanding the underlying mechanics significantly increases technical debt. Here are my recommendations for responsible usage >> Scrutinise Every Line: I would advise all developers, particularly those earlier in their careers, to avoid the temptation of "Tab-to-complete" without full comprehension. Challenge your AI assistant’s reasoning until you are satisfied. It may seem time-consuming initially, but it prevents costly architectural errors in the future. >> Transparency in Pull Requests: We should be honest about our AI usage. If more than 50% of a PR is AI-generated, it should ideally require two human peer reviewers. Furthermore, such code must be held to a higher standard regarding unit test coverage and quality scores. >> The Need for AI Audit Logs: There is a significant opportunity for IDEs to automate AI audit logs within PRs. These logs could specify the LLM used and the percentage of code generated versus refined. This would allow for better guardrails; for instance, code generated by one model could be cross-reviewed by another (such as Gemini or GPT) for an independent quality check. AI is a formidable tool but no substitute for critical thinking. To avoid technical debt, we must remain the primary architects of our systems. #SoftwareEngineering #AI #VibeCoding #CleanCode #TechLeadership