T612a - AI in Programming: Threat to Jobs or a Tool for Enhancement?

AI in Programming: Threat to Jobs or a Tool for Enhancement?


By Zeb Bhatti


In the Article, the focus is on the evolving world of programming in the age of Artificial Intelligence, particularly Generative AI. The journey from early programming, where code was manually inputted, to the era of high-level languages like C++, Python, and JavaScript, is explored. The current trend is the integration of AI in coding, where AI assists in writing code, leading to speculation about a future where AI might completely take over coding tasks.

The article delves into AI code generation, where AI systems produce code from user inputs using advanced machine learning models. This involves natural language processing, code synthesis, and context awareness. The integration of AI coding tools in development environments and the process of code generation, which includes user input, AI processing, and code review and refinement, are discussed.

AI-generated code can be written in various programming languages, and the article lists several popular AI coding tools like OpenAI Codex, GitHub Copilot, and Google's AlphaCode. While acknowledging the efficiency of AI coding tools, the article also notes potential issues such as security vulnerabilities and unresolved copyright concerns.

The future of programming jobs in the AI era is a key discussion point. The article argues that AI coding will complement rather than replace programmers, emphasizing the continued need for human skills in complex problem-solving, algorithm design, AI integration, and ethical oversight. In conclusion AI code generation will transform programming jobs, necessitating new skills and a focus on human-AI collaboration.

#AICodeGeneration, #ProgrammingEvolution, #FutureOfCoding, #AIProgrammingTools, #HumanAICollaborationInCoding, #AICoder, #copilot

Link to Video: https://youtu.be/xTypv5LkBFw


Writing computer code has been one of the most lucrative and rewarding professions and career in the past six to seven decades, but does it have a future in the era of Artificial Intelligence, specifically Generative AI.

Let's just briefly visit the evolution of programming. In the dawn of early computers, we had humans directly writing machine instructions and inputting them with toggle switches and stuff like that. That was before programming in the conventional sense, was really invented.

Then people started writing programs in higher level languages. That is Bjarne Stroustrup who invented C++. Examples of other high-level programming languages in active use today include Python, JavaScript, Visual Basic, Perl, PHP, Ruby, C#, Java and many others.

In modern times, we have a world in which humans are writing code using these high-level languages, but are heavily assisted by Artificial Intelligence. And in the near future, we expect AI to write our code with very little human supervision or perhaps even entirely unassisted.

And some scientists think that in a couple of decades from now, if not sooner, we won't have to have programs at all, therefore, programmers won’t exist.

But let’s not go off into the far future and for now stay focused on the present and immediate future – that is for the next 5-6 years or so. What will programming be like? Who will do the coding? How will it be done? Will the programming jobs disappear or will new opportunities for programmers emerge from the Generative-AI foundational technologies.

This subject of AI coders replacing humans is a heavily debated subject with many different viewpoints. We’ll try to lay the groundwork for our viewers with some basic stuff so that you can understand the present state of programming and navigate through the rapidly shifting landscape in the future. Specifically we’ll attempt to answer the following questions:

1. What is AI Code Generation?

2. Is it even Possible to Code with AI Tools and if so, how is it done?

3. What is the AI Generated Code Written in?

4. Which are the most popular AI coding tools for code generation today?

5. What is the future of programming jobs if AI does all the coding?

Let’s start with what is AI code Generation.

AI code generation refers to the process where artificial intelligence systems generate programming code based on inputs given by the user, often in natural language (spoken language). This technology leverages advanced machine learning models, predominantly those based on transformer architecture, to understand user intents and translate them into executable code.

These AI systems are trained on vast datasets of source code, enabling them to learn coding patterns, syntax, and the functionality of various programming languages. Artificial intelligence programs can write their own programs or even translate from one programming language to another. They also perform tasks like offering assistance in auto-generating documentation and finding code snippets faster.

Key aspects of AI code generation include:

• Natural Language Processing (or NLP): This involves understanding human language inputs.

• Code Synthesis: This means translating requirements into code.

• Context Awareness: This means generating code that is relevant to the given context or project.

• Error Correction and Optimization: Which means offering suggestions to improve or debug existing code.

Some people question if it is even possible to Code with AI Tools trained on datasets of source code and if so, how is it done?

Well, the answer to the first question is ‘YES’, it is possible to code with AI tools, and the process is becoming increasingly streamlined and user-friendly. In fact, leveraging AI tools for coding is not only possible, but it can also significantly enhance productivity and accuracy. Here's how it's typically done:

· First is the Integration with Development Environments: Many AI coding tools are integrated into popular Integrated Development Environments (IDEs) like Visual Studio Code, PyCharm, or directly into online platforms like GitHub.

· Next is User Input: The developer provides input, which can be a description of the desired functionality in natural language (that is spoken language), a partial code snippet, or a specific programming query.

· After this the AI Processing: The AI tool processes this input, using its trained model to generate relevant code suggestions or complete code snippets.

· And finally there is a Review and Refinement Step: Here, the developer reviews the suggested code, makes any necessary adjustments, and integrates it into their project.

When it comes to the languages that AI Generated Code is written in, AI-generated code can be written in virtually any programming language, depending on the capability of the AI tool and the requirements of the project. For example, OpenAI Codex is most fluent in Python but is also quite capable in several languages, including JavaScript.

Common languages include:

· High-Level Languages: Such as Python, JavaScript, Java, C#, etc., for application development.

· Web Development Languages: HTML, CSS, and JavaScript for front-end development.

· Scripting Languages: Like Python or Bash for automation scripts.

· Specialized Languages: Such as SQL for database queries or R for statistical analysis.

The key is that the AI must be trained on or familiar with the syntax and nuances of the target language to generate effective code in that language. The versatility of AI in code generation is one of its most significant advantages, allowing for a wide range of applications across different domains and technologies.

One thing to recognize is that there are known problems with code generators.

While on one hand AlphaCode by DeepMind, an AI coding tool is shaking up the industry and outperforms human coders in certain situations, there are problems that were identified in another part of the world. AlphaCode outperformed 45% of programmers in coding competitions with at least 5,000 participants, but at the same time a Stanford-affiliated research team found that engineers who use AI tools are more likely to cause security vulnerabilities in their apps. Plus, questions around copyright are not entirely resolved.

In other words, AI code tools are not yet completely safe to use. That's why AI coding tools will help developers become more productive and efficient, rather than to replace them entirely. That said, the popularity of these tools means that they can’t be overlooked.

Now, let’s take a look at some of the popular AI code generators out there. Here are the top 15 that we’ve picked.

1. OpenAI Codex;

OpenAI Codex is the most prominent AI code tool available. It is based on OpenAI's LLMs (GPT-3 and GPT-4) and is trained on billions of lines of code. The tool is proficient in more than a dozen programming languages.

2. Copilot;

Copilot uses publicly available code from GitHub repositories so that users can access large datasets and quickly develop accurate code. The tool detects errors in code and recommends changes to it. You can start using GitHub Copilot by installing one of the extensions in your preferred environment.

3. ChatGPT (GPT-4);

Created by OpenAI, GPT-4, OpenAI's latest AI model, is a multimodal tool that excels in programming tasks. It understands and explains code, writes new code, and outperforms existing models on Python coding tasks. However, despite its ability to handle complex tasks, it has some limitations like reasoning errors and potential security vulnerabilities in the code it produces.

4. AlphaCode;

Another AI-based code generator is Google-backed DeepMind’s AlphaCode, which gives developers access to source code from various language libraries. With AlphaCode, developers can leverage thousands of pre-made libraries, helping them connect and use third-party APIs quickly and easily. AlphaCode however is not yet available to the public.

5. Tabnine;

Tabnine is an AI code completion tool that utilizes deep learning algorithms to provide the developer with intelligent code completion capabilities. Tabnine supports several programming languages such as Java, Python, C++, and more. This tool is open-source and is used by leading tech companies like Facebook and Google.

6. CodeWhisperer (from Amazon);

CodeWhisperer is a tool developed by Amazon. It offers real-time, AI-driven code suggestions and identifies potential open-source code matches for easier review. It also scans for security vulnerabilities, suggesting immediate patches. An added bonus is its commitment to code safety, which means aligning with best security practices such as OWASP guidelines. The OWASP (Open Web Application Security Project) guidelines refer to a set of best practices and recommendations designed to help developers create more secure software.

7. CodeT5;

CodeT5 is an open AI code generator that helps developers to create reliable and bug-free code quickly and easily. CodeT5 is also open-source and provides support for various programming languages such as Java, Python, and JavaScript. The tool also has an online version as well as a stand-alone locally installed version for data security.

8. Polycoder;

Polycoder is an open-source alternative to OpenAI Codex. It is trained on a 249 GB codebase written in 12 programming languages. With Polycoder, users can generate code for web applications, machine learning, natural language processing and more. It is well-regarded amongst programmers because of its capability of generating code quickly.

9. AskCodi;

AskCodi is a code generator that offers a full suite of development tools to help developers build and ship projects faster. With its AI-based code generation, it helps developers write better code and shorter code blocks, with fewer mistakes. AskCodi can be used to develop both web and mobile applications.

  1. Codiga;

Codiga is a static analysis tool that ensures that the program code is secure and efficient. It supports popular languages like JavaScript, Python, Ruby, Kotlin, and more. With Codiga, you can test your code for vulnerabilities and security issues in real time. It also includes an auto-fixer to quickly address any issues in the code.

11. Visual Studio IntelliCode;

Visual Studio IntelliCode is an extension of the Visual Studio Code editor created by Microsoft that provides AI-assisted development experiences to improve developer productivity. It offers smarter IntelliSense completions and helps reduce the amount of time developers spend navigating and debugging code.

  1. PyCharm;

PyCharm is an AI code completion tool from JetBrains which provides developers with intelligent code completion capabilities. This tool supports various programming languages such as Java, Python, and JavaScript. PyCharm is well regarded for its accuracy and can help developers reduce the amount of time spent on coding tasks.

13. AIXcoder;

AIXcoder is an AI-powered programming pair designed to aid development teams in writing code. Pair programming or programming pair is a collaborative technique that helps developers improve quality and reduce errors while coding. AIXcoder supports languages such as Java, Python, and JavaScript. This tool also offers a range of features such as automated routine tasks, AI-powered code completion, real-time code analysis and error checks while typing.

  1. Cody (Sourcegraph);

Cody (not to be confused with AskCodi), is Sourcegraph's AI tool. It is a comprehensive coding assistant. It understands your entire codebase, answers queries, and writes code. Beyond guidance, Cody provides detailed code explanations, locates specific components, and identifies potential issues with suggested fixes. Cody works directly in VS code with an extension.

  1. WPCode;

WPCode is an AI-driven WordPress code generator created by Isotropic. It supports both developers and non-technical WordPress creators, allowing them to quickly generate high-quality code snippets. CodeWP supports not only HTML and CSS but languages such as Java and Python. It even includes AI assistants to suggest improvements to code snippets.

It is also important to keep in mind that there are plenty of other tools out there as well. We’ve just listed 15 above. This domain is growing faster than you can imagine. In order to guide you in your independant evaluation of AI coders, including their features, capabilities, and which companies are behind them, we are providing some selection criteria that may be of value to you. You need consider the following factors;

1. Which programming languages are supported by the tool?

2. The tool’s Domain-Specific Code Generation Suitability (for example; whether the tool can generates SQL queries from natural language descriptions. Whether it converts natural language to SQL, making database interactions more accessible. Does it offer a full suite of development tools with AI-based code generation for web and mobile applications. Can it generate code from problem descriptions, offering access to source code from various language libraries etc..)

3. The Accuracy and Quality of Generated Code.

4. The tool’s Integration with Existing Workflows.

5. Which deep learning algorithms does it use?

6. Does it have Reinforcement learning from human feedback (or RLHF) capability - a generally superior capability?

7. And how friendly and easy is it to Use.

And now we come to the big question being debated is; “What is the future of programming jobs in the era of AI-generated code”. This is a topic of significant interest in the programming community.

While AI code generation tools are becoming more sophisticated, it's important to consider several factors that will shape the future of programming jobs:

First we need to understand that AI powered coding will Complement and Not Replace programmers.

An AI coder is simply just a Tool: It is best seen as a tool that enhances productivity rather than a replacement for human programmers. It can automate repetitive tasks, help debug, and even write boilerplate code, but it still requires human guidance and expertise.

The demand for certain programming skills may shift. Programmers might need to focus more on complex problem-solving, algorithm design, understanding and implementing AI solutions, and overseeing the integration of AI-generated code.

There will be increased demand for professionals skilled in developing, training, and fine-tuning these AI systems. This area itself creates a substantial number of jobs.

We also know that Domain Expertise will Remain Crucial: AI is less adept at understanding context and nuances of specific domains. Programmers with deep domain knowledge will still be needed to ensure that the AI-generated code aligns with the unique needs and constraints of their field.

There are many other reasons why programmers will remain relevant. For example there is the need for Ethical Oversight: AI-generated code raises questions of ethics, security, and reliability. Human oversight is crucial in ensuring that the code generated aligns with ethical standards and is free from biases.

Secondly, Creativity and Innovation has no substitute – at least as yet. AI struggles with creative aspects of programming. Human programmers will continue to lead in areas requiring innovation and creative problem-solving. And then there is always Customization and Personalization and Tailoring required to meet business needs: Each project has unique requirements and may need customization that AI cannot fully understand or implement. This customization will require a human touch.

In Conclusion, while AI code generation will undoubtedly transform many aspects of programming, it's unlikely to eliminate the need for human programmers. Instead, it will change the nature of programming jobs, requiring new skills and a focus on areas where human expertise is irreplaceable.

The future of programming will likely emphasize the ability to continuously learn and adapt to new tools and paradigms, including AI. It is more about human-AI collaboration than replacement, with AI amplifying human capabilities rather than rendering them obsolete. Remember at one time if programming history, COBOL programmers were in high demand. Many refused to adopt to the new paradigm of object oriented programming, but those who did, managed to catapult to higher levels of income and prosperity. In the future, AI coding tools will become standard practice for developers, so it is worth examining the lessons from history.

Last updated