0

The Do’s and Don’ts of Using AI in Software Development

#Dos #Donts #Software #Development

In this article, we’ll explore the do’s and don’ts of using AI in software development, empowering you to stay ahead of the curve with the latest technologies and use AI confidently as a helpful tool in your toolbox instead of a threat to your job.

AI Is Revolutionizing Software Development

AI tools like ChatGPT are making waves throughout the development community. While some people are embracing the change, others feel that AI is a threat. How are we going to handle this new technology? Do we have to give up all of our old routines? The second fear struck us more deeply: the fear of becoming useless and losing our jobs.

A comic of a guy feeling happy and then sad when he thinks that ChatGPT can do his job for him

If we act in accordance with those fears and believe them, we will use the new technology incorrectly, which will make those fears come true. For example, if we completely rely on the new technology and give up all the old, traditional techniques, we risk losing our knowledge and eventually being completely replaced by it.

Remember, this is far from the first time that humanity has faced such challenges. When machines began to occupy factories during the Industrial Revolution, the same two fears arose: The fear of having to adapt to use new, unknown tools and the fear of being completely replaced by these new tools.

Note: If you don’t have much experience with AI tools and want to learn how you can use them to enhance your apps and avoid the pitfalls while coding, check out The Future is Now: Integrating AI in Software Development. It will show you effective strategies for collaborating with AI.

DON’T Use AI Tools to Replace Learning Platforms

If you’re looking to acquire new skills or expand your knowledge in a flexible and accessible online format, you should head to an online learning platform or bootcamp. These platforms offer a wide range of online courses, tutorials, and educational content created by experts in their fields. These experts put their experience to work, giving you a thorough and trustworthy way to learn a new subject.

You shouldn’t trust AI tools this way. AI tools can hallucinate responses when it doesn’t know the answer — and they can be very convincing. If you don’t know the subject matter, you won’t know when AI is making things up.

Before requesting assistance from AI tools, you should grasp the fundamentals of the technology you wish to use. This will enable you to assess the results of the AI tools and identify any problems with the answers you receive from them.

However, at these early stages of learning a new programming language or technology, you can still use the assistance of AI tools in one area: providing you with a learning path. Here’s an illustration of how to use ChatGPT to create a custom learning path:

Screenshot from ChatGPT asking it to suggest a learning plan for Angular to follow.

In the previous screenshot, ChatGPT gave me a complete learning schedule up to and including Week 25. This list can guide you to begin your adventure with Angular by using books, courses, and other e-learning resources.

Should you, however, just rely on AI technologies after a few weeks of learning and when you have access to them? In the next section, we’ll talk about this.

DO Use Emerging AI Tools in your Learning Support System

AI technologies make repetitive jobs easier for you; they can even help you solve bugs that you spent days trying to fix. In fact, they are so helpful that you might fall into the trap of relying solely on these tools.

However, while AI is a useful part of your learning support system, it shouldn’t be the only element.

Pic showing how developers neglect Stack Overflow and documentation in favor of ChatGPT

You might wonder why you need to go elsewhere when one tool can almost always provide you with the answer to every challenge. For the answer to this question, think about Maya Angelou’s statement: “In diversity, there is beauty and there is strength.”

Whether you watch a video, read an article, take a course, or engage in a hands-on activity, every learning method offers you a unique point of view. AI tools should become part of your learning support system, which is the collection of resources you consult when you want to learn something new or review information you have already gathered about a subject.

For example, it’s crucial to review each technology’s documentation to learn the best practices from those who developed it.

Also, remember that traditional methods like searching Stack Overflow can offer more than just answers to questions; they provide diverse insights through discussions on each topic.

DO Treat AI Like a Useful Tool

It’s essential to treat AI-powered development tools as what they are meant to be — tools that assist developers in tackling long and repetitive tasks. They are not fully functional code-writing machines; rather, they’re designed to enhance efficiency and productivity by automating certain aspects of coding.

While AI excels at generating code snippets and automating repetitive tasks, it can’t take over the developer’s role. It’s crucial that you maintain an active role in coding, understand the logic behind the code, and ensure that the final output aligns with project requirements and best practices.

Furthermore, it’s important to judge when to leverage AI tools in your coding workflow. While AI can be a valuable resource for generating ideas, suggesting improvements, and automating repetitive tasks, it should not become a crutch for every coding task.

Over-reliance on AI tools can inhibit your own growth and problem-solving abilities as a developer. Striking a balance between utilizing AI for efficiency and using your own problem-solving skills to craft robust, logical code is key to maintaining the integrity and quality of your work.

In essence, while AI can be a powerful ally in your development journey, it should complement your skills, not replace them entirely.

DO Evaluate All AI Output

Evaluating the output you receive from AI tools is a critical aspect of responsible AI implementation. Continuously monitoring and assessing AI’s results is essential to maintaining their accuracy and relevance over time.

AI systems are not infallible; they can produce errors or biased outcomes. As a result, you must review any code AI generates to enable quick identification and correction of any problems.

Despite their strength and ability to process enormous volumes of data, AI systems are not immune to biases in the training data or algorithmic constraints. The best response to your question may occasionally come from asking additional questions for AI tools or rephrasing your initial question. It is crucial for you to exercise critical thinking and maintain a healthy level of skepticism when interpreting AI-generated results.

Furthermore, it’s important to acknowledge that AI tools like ChatGPT 3.5 have a knowledge cutoff date, which means their information is current only up to a certain point. Relying solely on their output may not reflect the most recent developments or insights in a rapidly evolving world.

It’s essential to use real-time data and expert human judgment when dealing with AI-generated data, especially when you’re making critical decisions or seeking the latest information.

Here’s an example of a question that I submitted to ChatGPT 3.5 regarding how to build a content-unavailable view in SwiftUI for iOS devices.

Screenshot from a question to ChatGPT showing it doesn't answer me with the latest update in 2023.

In the previous example, ChatGPT was unaware that, since 2023, SwiftUI has included a new view called ContentUnavailableView that is designed exclusively for this kind of content. When I persisted and asked if it knew of any more recent views on how to achieve this in 2023, it responded that its most recent knowledge update was in September 2021.

Screenshot from ChatGPT showing that its last knowledge update was in September 2021.

So be sure to take timeliness into account to make sure you receive the correct response to your questions. If you’re trying to update code to current standards or learn about the most recent tech announcements, your AI tools might not be able to help you (though they might hallucinate and sound like they can).