The way AI helps programmers
Using AI is becoming a standard part of the toolkit for many developers, from beginners to experienced professionals. And it has not taken away the jobs of programmers; rather, AI is enhancing their efficiency, productivity, and problem-solving abilities
My first encounter with AI when it comes to programming was a funny one. I was trying to build a simple prank app for my nephews. It would be a fake camera app — when a selfie is taken with it, it would turn into a photo of a laughing chimp! Back in the days, I had built a similar software for PCs in Visual Basic, but this time it would be an android app, and I am quite new on this platform.
AI is helping knowledge workers in big ways; designers, photographers, writers — who isn't taking AI's help nowadays? But can it help programmers as well? I wanted to give it a try.
So, I asked ChatGPT, can you make me an app which would…(description as mentioned earlier). In response, it said, "Sorry, I am a language-based tool, I cannot build an app."
Then I paraphrased the question, can you write me the codes? And voila! ChatGPT said yes, and provided me with the perfect codes. All I had to do is place the codes and required images and buttons in place on Android Studio.
The experience spoiled me. For all my next Arduino projects, I just asked ChatGPT or Gemini to write the codes for me in C++, which I would modify as necessary and flash my IOT modules with the codes.
It was smooth sailing from then onwards. If any compilation error was returned by the IDE (software development platform), I would simply mention that to the AI tool, and it would provide a flawless solution each time.
The only exception I faced along the course was when I started working with MicroPython, a variant of the Python programming language optimised to run on a microcontroller. I was building a GPS tracker for my car using the A9G development board. It would be pretty straightforward if I used another microcontroller to feed AT commands (Attention Commands — simple commands used to control and configure IoT devices) into the board, but my plan was to programme the board itself (something like a firmware) and remove the necessity of using an external microcontroller, thus keeping the project small.
Now, when I asked AI tools to write the necessary codes, they kept writing codes based on AT commands, which have plenty of resources online. On the other hand, MicroPython resources for this particular hardware are scarce, with only a few GitHub entries.
A struggle ensued over many sleepless nights when I would feed the AI with details of modules used in MicroPython, provide links to previous works and finally, ChatGPT wrote me the perfect codes for the intended function. Gemini, in this case, disappointed me.
"Suppose I want a script to read a large document and pick or tag necessary parts according to set conditions. Writing and testing it would take a couple of hours. But ChatGPT can write the function immediately, and tweaking it to get it to work takes only five minutes."
But this is a story of a hobbyist programmer. Do professional programmers use AI?
"Of course! AI reduces 10 days of workload to just three," said Sazedul Karim Bhuiyan, a programmer working for a renowned IT company of the country.
"Suppose I want a script to read a large document and pick or tag necessary parts according to set conditions. Writing and testing it would take a couple of hours. But ChatGPT can write the function immediately, and tweaking it to get it to work takes only five minutes," Sazedul explained.
"Secondly, let's say we are using a third-party library which I haven't read the documentation of. Suppose we are integrating login authentication of some third-party service in our application. When we add the library to our codes, AI writes the necessary codes to integrate it flawlessly. In the past, we would depend on client feedback on bugs to make necessary modifications to the code. But now AI does it so perfectly that we only need small tweaks," added the programmer, who mostly works in JavaScript.
Markup developers, especially those using Tailwind CSS, need to memorise a lot of names of classes, unless they use AI tools. Developers just need to give the right prompt to the tool, and it will provide codes with variations. The developers then test it if it works for them and give further prompts if modifications are needed.
"If prompting is good, the work can be accomplished quite fast," the developer said, adding, "AI support for JavaScript and Python are very effective."
Since AI is a party to this story, we also asked ChatGPT if programmers seek help from it.
It replied, "Yes, professional programmers sometimes use AI tools like me to help with various tasks. This can include:
Debugging: Reviewing code, identifying issues, and suggesting fixes.
Explaining concepts: Clarifying complex programming concepts or algorithms.
Code generation: Writing code snippets or even entire functions based on requirements.
Optimisation: Offering advice on how to make code more efficient.
Learning new technologies: Quickly getting up to speed on unfamiliar libraries, frameworks, or tools.
Documentation: Helping generate or improve code comments and documentation.
Brainstorming: Discussing architecture or design decisions for software projects."
Gemini, too, mentioned that programmers seek help on code generation and debugging, explanation of complex programming concepts, etc.
In essence, using AI is becoming a standard part of the toolkit for many developers, from beginners to experienced professionals. It has not taken away the jobs of programmers; rather, AI is enhancing their efficiency, productivity, and problem-solving abilities.