One and a half years of mobile development using NLP: results
iOS Team Lead at Globus IT Dmitry Lemaikin shared his experience of using neural networks in his work at the Tinkoff Mobile Meetup. For a year and a half now, our team has been experimenting with the ChatGPT–CoPilot combination. In this article we will tell you about the tasks neural networks can really help to solve, and about the cases when they can provide ambiguous results.
NLP (Natural Language Processing) has become an independent developer tool that is used in almost all areas and requires mastering. For a professional it can make the work easier by taking over routine tasks. But for amateurs it can easily make the life more difficult by misleading them. That is why it is important to be able to correctly compose a prompt, which is a request to the model in a natural language.

To work with neural networks, the Globus team chose the ChatGPT–CoPilot combination. These systems greatly simplify the process of writing code when developing mobile applications and complement each other perfectly.
ChatGPT is used for large general prompts, it understands context well and helps generate ideas. CoPilot integrates into an IDE (Integrated development environment), such as Xcode, and offers code completion based on the code base of your current project.

We have been working with the ChatGPT–CoPilot combination for a year and a half and have encountered three types of cases:
  • Successful cases, in which the use of NLP facilitates work and saves time.
  • Average cases. Here, the use of neural networks can help, but you will have to spend more time, and sometimes the answers given by neural network may lead you in the wrong direction.
  • Bad cases, where the use of neural networks can even cause harm.
POSITIVE
First, let's talk about successful cases
1. Rewriting old code
ChatGPT is great at rewriting code, such as moving the codebase from Objective-C to Swift. This was one of the first cases of the Globus IT team using neural networks. To verify the authenticity of the rewritten code, iOS Team Lead Dmitry Lemaikin manually checked each line: ‘Initially, we did not believe that this was possible and that the code would not contain errors. But when we were convinced that the results were correct, we began to trust ChatGPT more’.

Tip: ChatGPT doesn’t care what language the code is written in and how it is formatted, in any case, it successfully converts it into the desired language in Swift.

2. Moving code from one platform to another
Globus IT develops native applications on both iOS and Android, so Swift and Kotlin go side by side. Often the task of transferring logic from one platform to another arises. With ChatGPT, you can port code from one platform to another, saving significant time and resources. Both languages are quite similar in syntax and structure, which means that such a conversion should not be difficult for a machine.

Tip: You can transfer models and even user interface components. There may be exceptions for complexity or compatibility.

3. Structuring unstructured data
If data or text is sent to you in an unsuitable format, then instead of wasting time for parsing it, just create a structuring prompt and send the unstructured text to ChatGPT – it will return the text in the format you need.

Tip: the text can be anything, for example, JSON, XML, a piece of literary text, a mixture of texts that are different in format and meaning.

4. Changing the styles of finished code or text
If you are unable to use a linter, then ChatGPT will come to your rescue again. In the prompt you can write your requirements for the text: change style and format of the text or translate the text into another language. It allows you to get one more piece of content.

Tip: you can use it when composing letters and formatting code.

5. Writing instructions
In order not to waste time writing instructions, for example, for adding applications to the store, you can take a finished article, run it through ChatGPT to check its relevance, and get complete instructions. Don’t forget to validate the result before sending it to the customer – to do this, you must be an expert in the field for which the instructions are written.

Tip: you will still have to validate the result, but it is easier than to write the instructions from scratch.

6. Writing unit tests
ChatGPT and other neural networks, for example, Gemini, handle unit tests well. With NLP, you can automate this process and ultimately improve the quality of your application and ensure its reliability.

Tip: you can add several classes to one prompt, as far as tokens allow.

7. Generating Stub data
This function is very useful in case you need to fill a database with descriptions of users and products. You can press “Regenerate” button in ChatGPT as many times as you like, and as a result, you will receive a huge amount of data that can be structured and used.

Tip: use that method if you need to create 1000 products with descriptions, prices, reviews and other fields.

8. Writing regular expressions
ChatGPT makes routine tasks easier. You can write a regular expression to check email and immediately ask ChatGPT to write a hundred-unit tests for this.
HARD TO SAY
It's time to move on to the second class of cases. Here we will talk about the cases when it is impossible to say for sure whether using a neural network was useful or not
1. Unspecific queries
If the prompt is written inaccurately, ChatGPT, of course, can quickly suggest an option, but it will require deep reworking. Thus, the time spent on rework may be greater than if you write it from scratch yourself. That is why it is important to remember that the more specific the prompt is, the better it will work.

2. When absolute accuracy is required
Another rule to remember is that neural networks make mistakes, and errors are an integral part of any neural network.
It may turn out that checking the results may require too many resources and it would be easier to do it by yourself.
So, if you are looking for absolute accuracy, it is better to use other methods.

3. Limited training database
ChatGPT information is currently limited to the data available as of September 2023. The neural network will not be able to consider everything that happened after, which means it will probably respond to your request with irrelevant information. This problem can be partially solved with plugins: for example, the Globus IT team uses a plugin for parsing web pages.

4. Trainee training
When using ChatGPT in training, you need to consider the trainee's experience or lack of experience.
If the trainee has experience, the use of neural networks can help with learning. But if the trainee has no experience, it can lead him in the wrong direction or prevent him from learning the material.

5. Overcoming the terror of the blank page
If you find it difficult to start projects from scratch, ChatGPT can give you a push forward and inspire you to do something. The other side of the coin is that a neural network can lead you in the wrong direction.
Initially, chatbots were created with the goal of convincing the users that their conversational partners were real persons. Therefore, in any case, you will have to check the results of the neural network by yourself.
NEVER TRY
The cases when you should not use ChatGPT
1. If you are not an expert in the field, you are asking a question about
If your expertise in this area is low, you will have difficulties judging the accuracy of the neural network’s response. This can lead to significant errors, and it is unlikely that you will get a good result.

2. Tasks are too large
Don't give ChatGPT huge tasks, it's better to decompose them and work with small pieces of code. This will make it easier for you to check the results, and the neural network’s answers will be more accurate.

3. Using non-specialized NLP tools
Today there is a big number of NLP tools, including highly specialized ones. And if you want to get better results, it is better to choose a neural network that will be suitable for your task.

4. ChatGPT can't write poetry
Although it is designed for working with text and works well with it, creative tasks such as writing poetry are difficult for it.

5. Forwarding the results of one neural network to another
In this case we cannot talk about a definite result. The first neural network may produce an erroneous result, which will be transferred to another neural network, and as a result, errors may gather like a snowball. To avoid this, you will need to spend significant time for experiments that are unlikely to pay off.

6. Creating custom visual components
Even with the most accurate prompt, ChatGPT will not always create the visual that you wanted.
LET'S CHECK IT
The Globus IT team also had experimental cases on which there is no established opinion yet
1. Project evaluation
You can upload project documentation to the neural network and ask it to break it down into paragraphs.
ChatGPT does not always consider all points and misses information. As a result, some things have to be added.
On the plus side: it can provide an estimate of the project in hours, but validation will be required.

2. Finding memory leaks by code
In this case, ChatGPT can only give general recommendations, because the neural network does not have complete data, and to understand the problem you need to have a good understanding of the situation and the code itself.
Perhaps the situation will improve in ChatGPT 5 or other versions.

3. Writing code screens based on a hand-drawn screen layout on paper or design
The ChatGPT advertisement claims that this is possible: a person draws an application screen on a napkin, uploads it to the chatbot, and receives a code as a result. But, as it turned out, in practice this is difficult to use even with good quality layouts.
Based on my experience with NLP, I would like to share the following recommendations:
  • Practice building prompts for a specific neural network and a specific task.
  • Save successful prompts in a separate file: this will help you analyze and find your own approach to the neural network.
  • Experiment with new client agent applications for your development environment.
  • Weigh the pros and cons of using NLP for the task at hand.”
To summarize, we would like to say that even despite LLM, it is still impossible to completely exclude human from the work process. Neural networks are unlikely to replace programmers, but they can definitely make the process of writing code more enjoyable for humans. And we still have to find new uses for neural networks and new approaches to them.

Dmitry Lemaikin
iOS Team Lead at Globus IT
© 2023
contact@globus-it.com
Gustava Zemgala gatve, No. 74, lv-1039
Latvia, Riga
+371 64 415 295
+90 532 307 88 88
Yeşilce Neighborhood. Yunus Emre Street. No: 8/1
Kağıthane
Türkiye, Istanbul