| 24. 3. 2023 | 10 reading minutes

AI artificial intelligence and programming: should you be worried about your job?

What is artificial intelligence and how does artificial intelligence affect programming? You can learn how artificial intelligence works and how helpful the new version of artificial intelligence ChatGPT – 4 can be in programming, and how Github Copilot will help you learn and work as a programmer in this article.

chatgpt, githubcopilot, ai shared

In the article you will learn:

    AI artificial intelligence definition

    Artificial intelligence (AI) is the simulation of human intelligence in devices that are programmed to carry features of the human mind such as reasoning, learning, problem solving and creativity.

    What is artificial intelligence, you ask? Artificial intelligence is a common part of many aspects of our lives – from entertainment to healthcare. AI at home is also no longer uncommon. Many times you don’t even realise that specialised AI has already “infiltrated” your life, for example through the internet, advertising and marketing, robots in restaurants or assistants in cars. In the software field, GPT artificial intelligence has now gained more attention due to general conversational models such as ChatGPT and Bard artificial intelligence. Chat with artificial intelligence is becoming more and more common. Even in the field of programming, AI has enormous potential to streamline processes and increase productivity.

    How does ChatGPT artificial intelligence work?

    For example, we also wrote this article in collaboration with Github Copilot and ChatGPT, specifically with its new ChatGPT 4 model, which is a product of Open AI. It was released on 14th March 2023, and is a good initial test of how to test if it is up to date with the model’s database and libraries.

    chatgpt screenshot

    We asked the same question in English. As you can see, not everything is as tragic (or pink) with GPT AI as some people think. It will not dominate us or steal our jobs all at once. So far. But we can use it to make our tasks more efficient.

    AI Programming: GitHub Copilot how to use

    Github Copilot is a cloud-based AI assistant that helps programmers automatically generate code. How does ChatGPT work? This system was developed by Github and OpenAI (the creator of ChatGPT) and is based on the GPT-3 model. Github Copilot learns from the amount of code it has scraped, and then offers code suggestions that are relevant to the programmer’s particular project.

    It was introduced as a limited beta version on 29th June 2021, when it was made available by invitation to selected users. After the launch, GitHub gradually expanded AI access to the code and gathered feedback from the community. The full-featured Copilot Git was subsequently released as a plugin on JetBrains Marketplace 29th October 2021. It is now available globally for $10 per month for individuals or $19 for businesses.

    GitHub Copilot chat and plagiarism

    Scraping existing intellectual property is a grey area not just for AI dev assistants. This is because artificial intelligence combs through existing projects, community sites and portfolios (if it has access) and then uses what it sees fit – without permission from the authors of the code or other intellectual property. Users in the art world have also objected to this approach, where their work is used as building blocks by the AI Midjourney, which generates artistic images in a variety of styles – from impressionistic brushstrokes reminiscent of Monet to photorealistic portraits very similar to celebrities.

    But let’s set aside the moral aspect of the matter for a moment and think about how Github Copilot chat can be used for good in our case, not to exploit other industry colleagues.

    GitHub Copilot benefits

    Git Copilot works as an AI add-on to development environments (IDEs) and helps programmers generate code faster and more efficiently. We mentioned that it is trained on a lot of code and documentation. This allows him to understand various most used programming languages and their syntax, including Python, JavaScript, Java, and many others.

    GitHub Copilot Chat provides the following benefits:

    1. Automatic code generation: GitHub Copilot Chat suggests code for functions, classes, and even entire applications, reducing the time it takes to write code and increasing programmer productivity. So if it takes you half a day to program a Java function, you can do it in half to a third of the time with the assistant (read also our article Java coding tips).
    2. Improving code quality: thanks to a large amount of training data, Copilot can design code that is based on best practices and sources, which helps to improve the quality of the result code.
    3. Adapting new technologies: Copilot Git can help programmers learn new programming languages, libraries or frameworks by offering suggestions based on current learning materials and best practices. We need to reiterate what the ChatGPT artificial intelligence says about the GPT-3 model used in GitHub Copilot. Its last update was in September 2021, so let’s be skeptical of this “up-to-date” assertion.
    4. Reduce bugs: GitHub Copilot helps identify and fix bugs before code is run, leading to more efficient testing and fewer problems after the application is deployed.

    Java Junior Developer and AI artificial intelligence

    Programming for beginners in Java can be challenging (so don’t hesitate and read our article Coding tips for beginners), especially when switching from another syntax, not to mention programming for absolute beginners. Artificial intelligence in programming can also help them by providing useful suggestions and advice on code structure and solving common problems. In this way, AI can simplify the process of learning programming and adopt best practices faster.

    But it takes time investment, AI assistant will not turn you into a top developer, either to a Java junior developer in an evening. It can show you the way and other approaches to solving problems that you wouldn’t have thought of. If you start analysing, combining and improving them, you can use the full potential of AI to benefit your learning.

    hands holding phone with chatgpt bot AI graphics
    Artificial intelligence will simplify the process of learning to code

    Senior Developers and AI artificial intelligence

    The heavy calibre of AI assistant becomes heavy in the hands of an experienced programmer. Work of senior developer requires significantly more knowledge in order for a person to use the tool to its full potential. With expertise, it’s much easier to guess if the AI assistant is offering you the right solution – a quick look at the code, a confirmation, an edit, and the feature is done.

    Will artificial intelligence affect programmers’ salaries?

    We asked the most authoritative entity – the AI itself (the text is slightly edited for bohemianisms and structure):

    “Beginners or programmers with less experience could be at risk because AI can automate simpler tasks they would otherwise perform. Conversely, salaries could continue to rise for experienced programmers working on more complex problems or specialised technologies. AI may also increase the demand for programmers, as companies will need experts to develop, implement and maintain AI systems.”

    A programmer’s salary (check also Java developer salary) is made up of many variables, new tools, technologies and trends being just one of them. However, GPT artificial intelligence is correct in the statement that specialization in AI systems will be on the rise. Spin-off services are already emerging on the market to generate so-called prompts, i.e. commands for conversational and assistive AI tools, with which even a non experienced person can achieve above-average results. Without an appropriate or logical statement, you get unusable code.

    ChatGPT 4 code integration example

    We tried to see what it would look like if the team was missing a Java programmer senior and we needed some integration. We used this descriptive prompt:

    Write me Java code to integrate JIRA tickets into my application dashboard.

    The response of the GPT-4 model contained instructions in addition to the code itself:

    To integrate JIRA tickets into your Java application dashboard, you can use the JIRA REST API. Here’s an example of how you can use Java and the Unirest library for making HTTP requests to get tickets from JIRA. First, add the Unirest dependency to your pom.xml file:

    <dependency>

    <groupId>com.konghq</groupId>

    <artifactId>unirest-java</artifactId>

    <version>3.13.3</version>

    </dependency>

    You can then create a class to interact with the JIRA REST API:

    import kong.unirest.HttpResponse;

    import kong.unirest.JsonNode;

    import kong.unirest;

    import kong.unirest.UnirestException;

     

    public class JiraIntegration {

     

    private static final String JIRA_BASE_URL = “https://vasa-domena.atlassian.net”;

    private static final String JIRA_USERNAME = “vas-email@example.com”;

    private static final String JIRA_API_KEY = “vas-api-kluc”;

     

    public static void main(String[] args) {

    try {

    JsonNode jiraTickety = ziskajJiraTickety(“vas-project-kluc”);

    System.out.println(jiraTickety);

    } catch (UnirestException e) {

    e.printStackTrace();

    }

    }

     

    public static JsonNode ziskajJiraTickety(String projectKey) throws UnirestException {

    String jql = “project=” + projectKey;

    HttpResponse<JsonNode> response = Unirest.get(JIRA_BASE_URL + “/rest/api/3/search”)

    .basicAuth(JIRA_USERNAME, JIRA_API_KEY)

    .queryString(“jql”, jql)

    .asJson();

     

    if (response.isSuccess()) {

    return response.getBody();

    } else {

    throw new UnirestException(“Failed to retrieve JIRA tickets. Status:” + response.getStatus());

    }

    }

    }

    Be sure to replace your-domain, your-email@example.com, your-api-key and your-project-key with the appropriate values for your JIRA instance. After executing the getJiraTickets method, you get a JsonNode object that contains the JIRA ticket data, which you can then display in your application’s dashboard. Be sure to process the JsonNode object to extract the specific data you need for your dashboard.

    At msg life Slovakia we are always looking for skilled colleagues

    Maybe the code above made you unsure or, on the contrary, you see gaps in it. We are not going to build everything on AI anytime soon. In addition, AI assistants cannot be fully exploited in every sector due to the sensitivity of the data.

    The skillset of humans continues to be broader than that offered by AI. That’s why we are always looking for new colleagues for various positions. See our job offers. We welcome enthusiasts of new technologies, such as artificial intelligence, but the door is also open to traditional coders who like to look at code from their own perspective.

    Zuzana Kocáková

    At msg life Slovakia I take care of the company culture, events and I am part of the marketing team. I like a job where I can be creative and contribute to making my colleagues at msg feel good. I regularly prepare for you not only news and interesting things from the world of information technology and insurance, but also from behind the scenes events at msg life Slovakia.

    Send attachments larger than 4MB to
    jobs.sk@msg-life.com

    Join us!

      *

      *

      The controller processing your personal data is the company msg life Slovakia s. r. o., Hraničná 18, 821 05 Bratislava, IČO: . Personal data in the scope of a resume, application for employment, motivation letter, or other documents with your personal data, supplemented by any notes from the selection procedure, will be processed for the purposes of the selection procedure and the creation of a database of applicants for future selection procedures in the above-mentioned scope for a period of 3 years. Your consent to the processing of personal data can be revoked at any time at the e-mail address: jobs.sk@msg.group or by written notification at the controller's address. Withdrawal of consent does not affect the processing of personal data based on consent before its withdrawal. Personal data may also be processed by an processor authorized by the controller (system provider), the company recruitis.io p. r. o., Chmelova 357/2, 500 03 Hradec Králové, Czech Republic, ID: 27508391. More information on the processing of personal data can be found at here>.