Using AI to Empower Software Developers

Using AI to Empower Software Developers

Welcome to a journey where we'll explore the use of artificial intelligence (AI) and its impact on software development, through my own experiences with projects at Pointwork. Regardless of whether you're a developer, a manager, or a company owner, this article offers insights that could pave the way for better products, elevated customer satisfaction, and a potential rise in revenue through the strategic use of AI.

Why Should Developers Jump on the AI-wagon?

Imagine you’re handed a puzzle: a project coded by a different team, perhaps even from another country, using unfamiliar software principles, and with little to no documentation available. The task of understanding, let alone modifying this code, might appear daunting, if not downright impossible.

Here's where AI becomes a game-changer. Instead of allocating a specialized team to decode and possibly rewrite the software, AI can decipher it for us, enabling modifications with considerably less hassle.

Let’s dive into a more concrete example. Suppose you have an API written in Java, and you're faced with the need to generate a client in a different language, such as C# or TypeScript. AI can streamline this process, automatically producing the necessary client code, thus making a usually hard and hands-on process easier.

I discovered the potential of AI through a personal experience involving a programmable robot and a language barrier. Knowing nothing about Python, the language used to program the robot, I turned to ChatGPT for help. After feeding it Python documentation found on GitHub, I was able to program the robot in within a few days, enabling it to track and follow me in real-time. The picture below from the robot shows that it is, in fact, tracking two persons in real-time.


However, it's crucial to note that AI is not without its challenges. The code generated might require debugging, and there have been instances where the AI created non-existent functions to fulfill assigned tasks.

In a nutshell, while AI can remarkably enhance our capabilities and efficiency as software developers, it requires our expertise for oversight and refinement for now. The synergy of AI and human expertise can lead us towards creating better products, delighting our customers, and potentially unlocking new revenue streams.


My setup

My company has provided me a MacBook Pro M2, a laptop equipped with Apple's Silicon chip, which has proven to be an invaluable asset in navigating the world of AI, as you’ll discover later in this article.

One of the standout features of this laptop is its formidable computing power, which effortlessly allows me to switch between Windows, Linux, and Mac environments. This multi-platform capability ensures that I am not bound by platform-specific limitations and can virtually code for any environment with ease and efficiency.

My software of choice for these coding adventures is Visual Studio Code (VSCode). It’s not just a code editor; it’s a lightweight, fast, and efficient companion that seamlessly integrates AI into my development process. The ability to synchronize VSCode across all my working environments ensures consistency and continuity in my projects, making it a reliable ally in my day-to-day coding endeavors.


AI in software development

If you have not worked with AI or, in this case, ‘GitHub Copilot Chat’ this is basically how it works:

Picture this: A chat button nestled conveniently in my sidebar, which, when clicked, unveils the chat task panel. This isn’t just any chat – it’s an intelligent assistant that immediately knows which file I’m working on and stands ready to assist with my coding queries and challenges.

Here’s a snapshot of it in action:

With the parallax.html file open, I communicate a specific request to the AI: ensure that newScrollPercentage adheres to a maximum of two decimal places. Astoundingly, the AI doesn't just find where this is relevant in my code, but it autonomously rewrites the entire function to comply with the request. What’s more, with a simple click of a button, I can seamlessly integrate the AI’s modified function back into my file.

VSCode - GitHub Copilot Chat


Here is another example of how we can with use of AI help to understand a complex code, the AI has been tasked with: ‘translate the scroll event listener for junior developers’:

VSCode - GitHub Copilot Chat


Let's look at another example of AI creativity:

Here I’ll use ChatGPT to help me out with a logo for an Office Add-in we have coded:

ChatGPT DALL·E 3


Run LLMs (Large language models) on Your Laptop Offline and Secure Your AI Interactions

When users interact with online platforms utilizing LLMs, such as Microsoft’s CoPilot or OpenAI’s ChatGPT, the data transmitted can potentially be utilized to enhance and train the models, thereby continuously improving their performance and relevance. While this iterative training is pivotal for the evolution and enhancement of AI, it also raises pivotal questions: Where does our data go? Who has access to it? And, how is it being used?

The journey of your data, once sent to companies like Microsoft or utilized in platforms like ChatGPT, often involves being processed and analyzed to understand user behavior, needs, and to identify areas for improvement in the AI models. While these organizations implement stringent data protection protocols and anonymization processes to safeguard user privacy, the very transmission of data to external servers can be a point of concern for those especially cautious about their digital footprint and data security.

Implementing LLMs on your own laptop, running entirely offline, offers a transformative solution. This approach ensures that your interactions, inputs, and data never leave your personal device, providing an unparalleled level of security and privacy. Not only does this safeguard your sensitive information from potential online threats, but it also guarantees that your data will not be utilized in ways that you have not explicitly consented to.

Let's explore how I'm running different models offline on my laptop. Not all laptops can handle this because it's a very demanding task. However, Apple laptops like mine are quite proficient at it due to the Unified Memory Architecture of the M chips.

LM Studio

The easiest way to get started with offline LLMs is using LM Studio, it can be downloaded from LM Studio - Discover, download, and run local LLMs

Based on your laptop/computer specs you may only be able to run some of the LLMs. My laptop has 32GB, from playing around a bit these models seem to work on my machine:

  1. Models with up to 34 billion tokens
  2. Each model has different versions, for me, Q4_K_M seems to work fine.

You can find multiple models at Hugging Face – The AI community building the future.

Let's say you would like to run this model locally: “WizardCoder-Python”:

Lets find the model:

LM Studio

Click on the ‘Model Card’ to get more information about the different models, here you can see the RAM requirement, and note the name of the model you want to try out, also look for models with the comment: ‘recommended’ under ‘Use case’:

huggingface.co


After I have downloaded the model, these are the settings I use:

  1. Uncheck ‘Keep entire model in RAM’ (This frees up the RAM after a response from AI)
  2. Check ‘Apple Metal (GPU)’ (This uses the GPU, and minimizes the use of RAM)
  3. I use 12 CPU Threads

LM Studio

Now we can give the AI model a task and see how it performs:

Input:

LM Studio

Output:

LM Studio


Conclusion

Navigating the intricate landscape of software development, AI emerges as a potent ally, opening new horizons in automating and simplifying complex tasks. From automating code translation between different programming languages to aiding in understanding and modifying existing code, AI has proven its mettle in various facets of the software development lifecycle.

However, this technological marvel is not a universal solution; it accompanies its own set of challenges and limitations. The code generated by AI may necessitate human intervention for debugging and refining to ensure it aligns with specific requirements and standards. Furthermore, while AI can generate creative solutions, the ethical use and management of AI-generated content necessitate vigilance and adherence to pertinent laws and guidelines.

The meeting of AI and software development starts a new time where combining machine power and human creativity can push innovation to new heights. Developers, managers, and company owners should thus strategically weave AI capabilities into their development processes, ensuring that the technology serves as a tool that augments human expertise rather than an unsupervised entity.

As we tread forward, one thing remains crystal clear: our journey with AI is just beginning, promising an exciting future where our collective capabilities are amplified, fostering the creation of software products that were once beyond our imaginations.

Ruslana Tytechko

Fintech | Logistics | Retail |Tech Agency | SELECTO: TOP-15 Design Agencies by Clutch)

5 个月

Zuhaib + 1 thumb up ??

回复

要查看或添加评论,请登录

Zuhaib Mian的更多文章

  • Application delivery at scale

    Application delivery at scale

    At Pointwork, we are currently on a journey to have a modular and reusable codebase for our frontend solutions, like…

    1 条评论

社区洞察

其他会员也浏览了