保留正文与补采附件。源页面当前未重新核验;具体限制见交付清单。

Revisit consent button We value your privacy We use cookies to enhance your browsing experience, serve personalised ads or content, and analyse our traffic. By clicking "Accept All", you consent to our use of cookies. Customise Reject All Accept All Customise Consent Preferences We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below. The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... Show more NecessaryAlways Active Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

Functional Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

Analytics Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

Performance Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

Advertisement Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

Uncategorised Other uncategorised cookies are those that are being analysed and have not been classified into a category as yet. No cookies to display. Reject All Save My Preferences Accept All Toggle SearchToggle Mobile Navigation Publish AI, ML & data-science insights to a global community of data professionals. Sign inSubmit an Article LatestEditor's PicksNewsletterShipAI


Write For TDS LinkedInXToggle Search Artificial Intelligence

The Smarter Way of Using AI in Programming

avoid the outdated methods of integrating AI into your coding workflow by going beyond ChatGPT Hesam Sheikh August 29, 20247 min read AI-generated by Leonardo.ai AI-generated by Leonardo.ai

_Stuck behind a paywall?Read for Free! _ Since ChatGPT's launch in 2022, developers have split into two camps: those who ban AI in coding and those who embrace it. **** Many programmers, especially the more seasoned ones, not only don't use AI-generated code but also prohibit their teams from doing so. Their argument against using AI for programming is understandable, "AI-generated code is unreliable." Now even if you don't approve of this anti-AI-code stance, you must have faced challenges, hurdles, or hiccups when using AI for programming. The key is to find strategies to use AI to your advantage the right way. Many of us are using a simple, but outdated AI strategy that was only good two years ago. We are cutting a tree down with kitchen knives. I will begin this article with two major issues when we talk about AI for developers, and I will propose four reliable AI solutions that will separate you from the average programmer when it comes to using LLMs, no matter what kind of developer you are. Learn this step by step with the interactive AI Engineer, AI and Data Scientist and Computer Science roadmaps.

Table of Contents

· the wrong way you may be using AI... ∘ you're not using the right interface ∘ you have unrealistic expectations of AI · Cursor: AI-first IDE · Micro Agent: Code + Test Case · SWE-agent: AI against Github Issues · AI Commits: git commit -m · Let's Connect! · Further Reads

the wrong way you may be using AI...

... can be divided in two: Image created by GPT-4o. Image created by GPT-4o.

you're not using the right interface

When ChatGPT was released, for months, the mainstream method of working with AI was to go to the website and chat with gpt-3.5 in the browser. The AI scenery was simple. You wanted ChatGPT to write docstrings and comment on your function?

Many are still using AI to code the same way. I'm seeing this in students, programmers, and especially beginners. As the AI landscape has changed in the last two years, our methods for using AI have not adjusted. We haven't caught up to its full potential. Diagram By Author. Diagram By Author.

you have unrealistic expectations of AI

The second pitfall of using AI is how we tend to use it. Typically we would ask the LLM to code something, we test if it works, and if it doesn't, we go back and forth manually to fix the issue. If we're lucky, we don't fall into an endless loop of hallucinations when we try to have the LLM understand what's wrong with the code and it doesn't.

We know it doesn't work, but for a lack of a better solution, we push and push it. It's easy to get frustrated this way.


Having said this, I will share four tools that can boost your programming productivity with AI.

Cursor: AI-first IDE

🔎 Best For: Absolutely Everyone When I was first suggested to use Cursor, I didn't really know what it was. It was only after some testing that I figured it was a game-changer. Cursor is an AI-first IDE, well... it's actually VScode, but on steroids. Screenshot of the Cursor IDE. By Author. Screenshot of the Cursor IDE. By Author. Cursor allows you to use your chatbot API to use AI as an assistant in writing code. Some of the features that can practically uplift your coding workflow that I love about Cursor:

Tweet not found

The embedded tweet could not be found… The good thing about Cursor is that it is VScode with extra AI features, meaning, it's not a whole new IDE that you need to get comfortable with. So if you are already working with VScode, the transition will be effortless. You can provide your API of the model of your choice, GPT-4, GPT-4o, Claude 3.5 Sonnet, and the built-in free cursor-small. I have seen many people praise the Cursor + Sonnet 3.5 combo. Claude 3.5 Sonnet is a very smart model in coding, and you can get fantastic results once you plug it into Cursor. Cursor is a big improvement over copy-pasting code back and forth from the ChatGPT website (honestly, at this point this looks somewhat unprofessional).

Micro Agent: Code + Test Case

🔎 Best For: Reliable Code Generation Source: micro-agent under MIT License Source: micro-agent (under MIT License) When it comes to generating code with AI, every tool is unreliable. As mentioned earlier, LLMs tend to fall into painful loops of hallucination. Micro Agent is honest and reliable in what it promises. Instead of generating full chunks of code to be tested and reviewed by the user, Micro Agent starts by creating test cases for your prompt. It will then iteratively write code that passes the generated test cases. The idea is that LLMs are better at generating test cases for a problem than creating code to solve it. I haven't found much research to support this idea, but it's trivial that a tested code is more reliable than not, which is what Micro Agent achieves. If you want to create functions that are not super-complex, but at the same time are tricky to get right, Micro Agent generates code that is more tested and grounded than out-of-the-box LLM output. Make sure to check out their blog and GitHub page.

SWE-agent: AI against Github Issues

🔎 Best For: GitHub Geeks Source: SWE-agent under MIT License Source: SWE-agent (under MIT License) On the list of Agentic tools that actually work, sits SWE-agent, developed by the Princeton Language and Intelligence. SWE-agent is specialized in resolving real-world GitHub repository issues and then submitting a pull request for review. It's a lifesaver for big repositories, organizations, or even small-scale projects. The reason it works well is the particular tools created by the developers that focus on reviewing codebases, identifying the issue, and then making the necessary changes. SWE-agent is an open-source project with already 13.1K stars on GitHub.

AI Commits: git commit -m

🔎 Best For: Those Who Commit Source: aicommits under MIT License Source: aicommits (under MIT License) If you have a hard time coming up with the right commit messages, you are not alone. There must be a better way to write meaningful commit messages than adding dates or simply including "minor changes", right?

Tweet not found

The embedded tweet could not be found… AI Commits is a simple solution to this problem. It is easy to install and easy to use. Based on your git diff , aicommits returns an AI-generated commit message. It uses gpt-3.5, which is a great choice as it is cheap and the task is not heavyweight too.


At the end of the day, what matters is that you use tools that help you in productivity and achieving your goal. AI landscape is changing shapes fast, and the right tools change with it as well. If you want to get all the necessary updates on AI and its new technologies, I have written an article on how you could do this for only a few minutes a day. We cannot get rid of AI hallucinations or its limitations. But we can take measures to mitigate it. Simple, manual interactions with AI, such as using ChatGPT for generating code or comments, can be frustrating and inefficient. By choosing the right tools, you can avoid the common pitfalls and be more confident in your practice. Thank you for reading through the article! I have tried my best to provide an accurate article, however, please share your opinions and suggestions if you think any modifications are required.

Let's Connect!

Subscribe for FREE to be notified of new articles! You can also find me on LinkedIn and Twitter .

Further Reads

If you have reached so far, you might also find these articles interesting:

A Comprehensive Guide to Collaborative AI Agents in Practice Learn Anything with AI and the Feynman Technique

Register Now to Continue Reading

Unlock Towards Data Science with a Free Account

All articles on Towards Data Science are available to registered users. Create a free account today to access this article and thousands more. Register for freeSign in to your account


Written By

Hesam Sheikh

See all from Hesam Sheikh Artificial IntelligenceData ScienceLarge Language ModelsProgrammingTechnology Share This Article

Towards Data Science is a community publication. Submit your insights to reach our global audience and earn through the TDS Author Payment Program. Write for TDS

Related Articles

Implementing Naive Bayes From Scratch

Artificial Intelligence Coding the inner workings with just Python and NumPy Marvin Lanhenke December 22, 20215 min read

Hyperparameter Optimization with Genetic Algorithms - A Hands-On Tutorial

Machine Learning A step-by-step tutorial of using genetic algorithms for optimization tasks. Farzad Nobar September 26, 202412 min read

4 Techniques to Optimize Your LLM Prompts for Cost, Latency and Performance

Large Language Models Learn how to greatly improve the performance of your LLM application Eivind Kjosbakken October 29, 20257 min read

Yellowbrick - Analyze Your Machine Learning Model with Visualizations

Artificial Intelligence A Python library for machine learning visualizations. Soner Yıldırım September 10, 20205 min read

Machine Learning Classification Project: Finding Donors

Machine Learning Find and predict who will donate to a charity with this classification model! Victor Roman February 20, 201918 min read

What's Next If You Can't Get a Data Scientist Job

Artificial Intelligence Alternative job possibilities for data scientists Vicky Yu February 13, 20214 min read

Building Your Own Google Translate App with Plotly Dash

Machine Learning Language knows no boundaries! Vanessa Wong August 3, 20216 min read

Logic and Statistics: Joys and Sorrows of Markov Logic Networks

Artificial Intelligence The best statistical thinking model. Eleonora Laurenza February 8, 202112 min read

Triangle Forecasting: Why Traditional Impact Estimates Are Inflated (And How to Fix Them)

Data Science Fix inflated forecasts with Python. Learn the mathematical method that transforms projections into trustworthy estimates. Sayali Rajeev Kulkarni February 7, 20257 min read

Your home for data science and AI. The world's leading publication for data science, data analytics, data engineering, machine learning, and artificial intelligence professionals. Subscribe to Our NewsletterWrite For TDS•About•Advertise•Privacy Policy•Terms of Use © Insight Media Group, LLC 2026•The New Stack•roadmap.sh•Creator Network

Recommended Articles

Close