The End of Traditional Computer Programming and the Emerging of AI Powered NLP Programming

The End of Traditional Computer Programming and the Emerging of AI Powered NLP Programming

In this article I will discuss how the rapid advancement of Artificial Intelligence today has greatly impacted one of the most important domains in the development of technology since the creation of the first programming language using very low level approach to implement computer programs with binary representation 0's and 1's to run set of instructions to achieve specific task on computer like calculation of multiplication of 2 numbers till high level programming languages which are used recently by AI NLP applications to write complex computer applications in fast and efficient approach.

The Relation between Imagination and Invention

Before that I want to talk about interesting concept that I was thinking about it since the first time I entered the digital world of computer. I remember that moment when I used this legacy old computer with Win 98 in playing video game for the first time which is Project IGI one of the oldest games since the first Microsoft operating system released. it was amazing experience for me to control character player inside virtual digital world and get him to complete objectives in order to win the game that's when I really interested to know more about how this video game actually work on the computer and I was really curious to discover more about the computers and since that time I started my journey in computer programming!

I am a big fan for Sci-Fi movies and it really excites me the idea of imagining the future of technology. A lot of concepts, ideas and technologies that presented in these movies become reality after a period of time ( maybe several years or decades ) and it's really awesome to see an idea from Sci-Fi movie become a reality. That's the power of imagination and applying scientific concepts and researches on real world. Without imagination we are really limiting our horizon of discovering and inventing new things on our real world. I recall a quote for Albert Einstein about that which really inspiring:

No alt text provided for this image
The power of imagination is the ultimate creative power.. No doubt about that. While knowledge defines all we currently know and understand.. Imagination points to all we might yet discover and create. Imagination is more important than knowledge. Your imagination is your preview of life's coming attractions

Albert Einstein

One of really interesting Science Fiction technology that no one could believe that one day it will become a reality the 3D Hologram. I remember the first time I saw it in Star Wars movie which was released in 1977 and since that time it was appeared in many Sci-Fi and Space movies.

No alt text provided for this image

This technology concept is to project 3D model of real world object using light on a different location as it's with you it is like virtual projection of the object on our real world. The first person who worked on developing the POC of this technology is the Russian scientist Dr.Yuri Denisyuk who work in natural color photography.?Denisyuk's approach produced a white-light reflection hologram which, for the first time, could be viewed in light from an ordinary incandescent light bulb.

But in 2018 after more than 20 years for imagining this technology in movies researchers at Brigham Young University (BYU), in Provo, Utah, are turning make-believe into reality. As part of an initiative they’ve nicknamed the “Princess Leia Project,” they’ve developed a way to project 3D images that appear to float in thin air.

Using lasers to trap and manipulate tiny particles in free space, the engineers created so-called volumetric displays of a butterfly, a prism, and the BYU logo.

It's really amazing achievement to witness in our time

Another interesting technology that we saw demos of it in many video games and movies for Cyber Robotics advancement in the future which is the rapid enhancement of Image and video quality while Robot Computer System observing the surrounding environment after zooming in and out. It's really interesting technology. One of the examples of presenting this technology in Blade Runner movie:

The great thing here that this technology became reality several years ago using Machine Learning algorithm which called Image Super resolution.

Single Image Super Resolution (SISR) is a deep learning model which is published by?research paper?“An Attention-Based Approach for Single Image Super Resolution” and hosted on?Intel OpenVino. It has applications in a number of domains including surveillance and security, medical imagery and enhancing Satellite images from the space.

It worth to mention that I implemented this deep learning model for Serverless Cloud Computing Hackathon in California and I won the second place in the Hackathon. you can check the project repository on GitHub and watch the following demo of it

Natural Human Language to Prompt Computer

Another very exciting idea that appeared a lot in Sci-Fi movies like 2001: A Space Odyssey is to command intelligent computer device to do specific tasks through your human natural language like English or German or any spoken language. the complexity of this application that it has multiple complicated layers for achieving such advanced task of converting Natural language command into computer instructions to complete the required objective. In fact you need cutting-edge technology to recognize the human spoken language and then translating it to computer programmatic command. Actually here we can see the great value that Artificial Intelligence have contributed to the advancement of our technology and made the dream a reality. There is discipline in Machine Learning called Natural Language Processing (NLP) that play big role in recognition of the human natural language and after understanding the meaning of the words in the language it will convert it to computer instructions to achieve specific task like searching for restaurant or finding a location on the map or sending message to contact or even turning lights on the room which is type of IoT integration with NLP applications.

One of most successful NLP applications that used world-wide is the AI assistant Siri from Apple which runs on Apple platforms like IOS, macOS and iPadOS.

The first demo for it was introduced by Scott Forstall at Apple Special Event in 2011

It was great AI tool to try it for the first time and here some of its top functions:

  • Answer questions
  • Make recommendations
  • Make phone calls and send text messages
  • Dictate location
  • Refers to internet services

Also other AI assistants developed at this period such as Cortana from Microsoft, Alexa from Amazon and Google Assistant. After that the market for AI NLP applications has been rapidly growing and becoming more competitive.?Here we reached a point to realize how important Artificial Intelligence in NLP for developing advanced technologies which will shape our future.

Brief Overview of Computer Programming Evolution

Ada Lovelace invents the first-ever machine?algorithm?for Charles Babbage’s Analytical Machine to compute Bernoulli numbers and she is considered the first computer programmer for that reason.

No alt text provided for this image

Assembly language was the first low level computer programming language that simplifies the language of machine code.

Autocode developed by Alick Glennie at the University of Manchester which was the?first-ever compiled language to be implemented?meaning that it can be translated directly into machine code using a program called a compiler.?

You can see from the Diagram the levels of Programming Languages according to the level of abstraction evolution of writing instructions for computer to execute it on the hardware. The lowest part on the diagram is Machine Language which is the representation of computer program instructions on the binary (0, 1) format. it is the format that the computer understand and it's the native representation of any computer program when executing it on the hardware. the next level is Assembly language which considered one of the oldest and first language for implementing computer programs and translating its instructions directly to machine language the main issue with this language that it's very complicated to understand from human perspective and require to write many instructions to implement a simple program because it's designed to operate directly with the hardware components of the computer. this type of language needs experts on it to implement more complex computer programs.

Now we will move to middle-level languages like C and C++ which is more wide adopted than low level languages. C is general purpose programming language created in 1970 by by the pioneer?Dennis Ritchie which considered until now the standard programming language for the tech industry. the language contains many features for the high level programming and also have great low level features for managing memory and handling at the operating system level. it's efficient and complex language which require a lot of experience and practice to master it and most of applications that needs optimized performance on the OS written in C. it's compiled language which means that the source code is converted to machine language. C++ is extension of C language that has added object-oriented,?generic, and?functional?features to it.

After that the next layer is high level languages which considered the most popular programming languages on software development until this time because of it's understandable code syntax and abstraction of the hardware level when writing instructions for computer program. this type of languages have a lot of features including automatic management of memory allocation and release for application using some tools like garbage collector and have built-in libraries which make the process of implementing computer program more easier, time efficient and organized. some of the examples for high level languages Java, Ruby, C#, JavaScript and Python.

We even have gone long way using these languages to build upon it great frameworks for different domains like web development (Laravel, ASP.net, Django, Spring, Angular...) and mobile development (Flutter, React Native...) also for Data Science and AI (TensorFlow, PyTorch, Scikit Learn...).

These frameworks played a big role in accelerating and organizing the workflow of developing advanced applications that added great value on technology development.

No alt text provided for this image

These programming languages have been divided on different bases such as the process of translating the program code to machine language. Some languages like Java, Python using program called interpreter to convert code syntax to intermediate form which is independent than the operating system that run on it and after that the intermediate form will be translated to machine code. these languages are slower than compiled languages when executing its code but it is cross-platform and independent of the OS that run on it because the interpreter program like JVM will be responsible to convert the intermediate form such as bytecode to the appropriate machine code of the operating system that will execute on it. Other languages like C and C++ convert program code directly to machine code that is targeted to specific operating system architecture using the compiler.

No alt text provided for this image

Also another type of categorizing these languages according to the way of defining the variable data type and checking it at runtime. Static typed languages like C#, Java and C++ will require to explicitly define the type of variable and run type checking before compiling the source code of the program.

In other hand the dynamic typed languages like Python and JavaScript will infer the type of variable using the interpreter at runtime.

here we can see one way of simplifying programming using dynamic type feature which will make the code syntax simpler, easier to read and faster to write. it's the core feature of Python programming language and that's what made it one of most popular programming languages world-wide. The abstraction of writing the code in a way that is more human readable made programming accessible to a wide range of people from different backgrounds like Science, Engineering, Medical and so on. That's actually contributed hugely on making the implementation of interesting projects ideas easier and less time consuming and more cost efficient which is great for developing more projects that serve the community.

Comparison of Level of Abstraction

In order to demonstrate the level of abstraction between each programming language I will use simple example for writing a program to reverse input text (string) using Stack data structure.

As example if the word is "orange" the reverse result is "egnaro"

First we will write the program in low level language which is Assembly. the code for program instructions is long and complex to understand and you can check it on Github.

Now we will write the program in mid-level language which is C language:

#include <stdio.h>?
#include <string.h>??

#define max 50??
int top,stack[max];??
void push(char x){??
? ? ? // Push(Inserting Element in stack) operation??
? ? ? if(top == max-1){??
? ? ? ? ? printf("stack overflow");??
? ? ? }? else {??
? ? ? ? ? stack[++top] = x;??
? ? ? }??
}??
??
int pop(){??
? ? // Pop (Removing element from stack)??
? ? return stack[top--];??
}??
??
main()??
{??
? ?char str[]="orange";??
? ?int len = strlen(str);??
? ?int i;??
? ?for(i=0;i<len;i++)??
? ? ? ? push(str[i]);??
??
? ?for(i=0;i<len;i++) {
? ? ? str[i] = pop();
? ?}
? ?printf(str);
}???        

we can clearly notice that the code is less complex and more readable than assembly language.

After that we will write the same program in high level static typed language such as Java:

import java.util.*
public class ReverseString {
? ?public static void main(String[] args) {
? ? ? String input_string = "orange";
? ? ? char[] reverse = new char[input_string.length()];
? ? ? Stack<Character> stack = new Stack<Character>();
? ? ??
? ? ? for (int i = 0; i < input_string.length(); i++) {
? ? ? ? ?stack.push(input_string.charAt(i));
? ? ? }
? ? ? int i = 0;
? ? ? while (!stack.isEmpty()) {
? ? ? ? ?reverse[i++] = stack.pop();
? ? ? }
? ? ? String result = new String(reverse);
? ? ? System.out.println(result);
? ?}
};        

we can see here that the code is even simpler and easier than C language.

Finally we will write it in high level dynamic typed language which is Python:

input_string = "orange"
stack = []
reverse = ""
for i in range(len(input_string)):
? ? stack.append(input_string[i])

while len(stack) != 0:
? ? reverse += stack.pop()
? ??
print(reverse)        

you can notice that the code is much more simpler and readable with less lines of code than Java Language.

This example gives you an overview on the level of abstraction and simplification that we get on each layer when moving to higher level on each programming language.

The Emerging of Large Language Models

In August 2021 the pioneer of Artificial Intelligence OpenAI research lab company released interesting and mind blowing demo for creating Space Game using OpenAI Codex that powers GitHub Copilot. When I saw this demo for the first time I said to myself this is a breakthrough in the era of Artificial intelligence and it will make a huge impact in the field of software development and programming.

Codex is large language model based on GPT-3 that can interpret simple commands in human natural language and execute them on the user’s behalf making it possible to build a natural language interface to existing applications.

No alt text provided for this image

What is large Language Model ?

Large language model (LLM) is a type of?artificial intelligence?model that has been trained through?deep learning?algorithms to recognize, generate, translate, and/or summarize vast quantities of written human language and textual data. Large language models are some of the most advanced?natural language processing (NLP)?solutions today.

It's considered a form of?Generative AI because it can generate original content based on user inputs and queries.

After the rapid advancement of AI in the field of Natural language Processing many of the biggest tech companies today built some kind of large language model to leverage this new technology capabilities in their work.

Some of the common LLMs that are created recently:

GPT which is originally created by OpenAI research lab and some of interesting information about it:

  • GPT technology is the foundation for ChatGPT.
  • GPT-4 is the latest and most advanced version of GPT.
  • OpenAI tools are used by many major companies, including Microsoft.

LaMDA considered one of the first conversational Large Language Model built by Google and Google Bard model is based on it.

Bert created by Google and some information about it:

  • A family of bidirectional LLMs.
  • Particularly useful for keyword research and text classification.
  • Pretrained with Wikipedia data.

Palm also created by Google:

  • PaLM 2 is the foundation for Google’s latest version of Google Bard.
  • Can be used for multilingual translation.

One of interesting models that made a lot of noise in tech industry is LaMDA.

LaMDA is quite an impressive AI model that even?one of Google's engineers, Blake Lemoine, claimed that the model is sentient. By saying LaMDA AI is sentient, Blake Lemoine meant that the AI chatbot was able to feel, just like a human would do. He concluded by having a series of rather intricately human-sounding conversations with the model. The complete conversation between Blake and LaMDA is documented in this blog which is really unbelievable. You can also watch this insightful documentary about it on ColdFusion:

Another amazing model that made a breakthrough in the technology is ChatGPT. In November last year After 5 days of launching it to the public it made more 1 million users which surpassed one of most popular social media platforms like Instagram that took about 3 months to get one million users.

ChatGPT is a large language model developed by OpenAI based on the GPT-3.5 series model, which finished training in early 2022. ChatGPT and GPT-3.5 were trained on an Azure AI supercomputing?infrastructure.

The interesting thing about these LLMs that it process the natural human language and understand the context of the input text and then reply to it according to that. This advanced capability allow us to use it in different use cases and leverage the power of NLP to create more sophisticated applications.

One of these use cases that is related to software development is Computer Programming. As I mentioned previously about Codex OpenAI model which is used to write commands in natural language and convert it to programming language code that will run program instructions in a computer.

No alt text provided for this image

This idea is really a big step in the evolution of computer programming. we actually reached a point that we created even new layer of abstraction for high level programming languages that I mentioned previously on the diagram of programming languages evolution and we could write text in natural language and the large language model will convert this text after recognizing its meaning to the corresponding programming language code and then execute it directly on computer device as we are watching a Sci-Fi movie. Large Language Models using Artificial Intelligence made this dream a reality now. And we are very close to a future that we don't need anymore to learn programming languages to develop applications. You only need to know how to prompt LLM like ChatGPT or GPT-4 in order to write a computer program in the programming language of your choice and run it directly on your device.

To complete our example that I mentioned previously for the level of abstraction of programming languages we will ask ChatGPT this question in natural language to write a program in different programming languages.

Write a program to reverse text input using stack data structure in different programming languages?

The answer for the question is great and in a matter of seconds it returns the code for implementing this program in Python, Java and C++ programming languages which is impressive. you can view the result on the attached link

I was also one of the first developers who created demo project for building Flappy Bird game prototype using OpenAI ChatGPT plugin on VS Code IDE.

The demo shows some of the capabilities of ChatGPT in software development in general. The game prototype took me approximately 4 - 6 hours to develop using ChatGPT. Without it it may take me at least 1 week of work.

You can check GitHub repository for the project and watch the attached demo

Surely you need to know some foundation concepts of computer programming in order to develop a good application. And in order to develop more advanced applications you need to understand the concepts of software engineering and software architecture design but these LLMs will make software engineers and developers 10x more productive if they know how to use this technology well and leverage it in their work. Also it will make computer programming and application development accessible by a wide-range of people from different domains which will contribute greatly on our technological growth and reaching advanced civilization that we would not have reached before emerging of Artificial intelligence technology.

I will end this article with interesting and deep meaning quote for Computer Scientist & Neural Networks Pioneer Jürgen Schmidhuber:

History of science is the history of compression progress.

Jürgen Schmidhuber

Our true ?????????????????????? is measured by the ???????????? (How Much?) we ???????????????? and ???????????????? the process of achieving a specific goal. The lesser steps you achieve the same task the better solution would be!

Follow me on LinkedIn?Mohammad Oghli?for more interesting Articles!

Created by Mohamad Oghli

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

Mohammad Oghli的更多文章