The Evolution of Coding: From Machine Coding to Modern Languages to LLM

November 2, 2024

This year, especially with the announcement of several tools claiming to be the first AI Software Engineers, there has been a lot of chaos in the programming world. From AI replacing software engineers to performing tasks just like humans, the landscape is rapidly changing. I have kept myself updated with the latest trends and capabilities of AI in programming to see what the future holds. After almost a year, I see this as just another layer of abstraction in programming, albeit the fastest evolving one.

In this blog post, I will showcase the evolution of programming languages from Machine Coding to Large Language Models (LLM) by writing a simple "Hello, World!" program in each.

1. Machine Language

Machine language consists of binary code that the computer's processor can execute directly. It is the lowest level of programming language and varies between different architectures.

10101000 01100001 01101100 01101100 01101111 00000001 01110111 01101111 01110010 01101100 01100100 00000001 01100001 01110010 01100101 00101110

(Note: This is not a practical example as machine code is architecture-specific.)

2. Assembly Language

Assembly language serves as a slight abstraction over machine language, using mnemonics and symbols to represent instructions. Although it is still low-level, it allows programmers to write more readable code.

section .data
    hello db 'Hello, World!',0

section .text
    global _start

_start:
    mov rax, 1          ; syscall: write
    mov rdi, 1          ; file descriptor: stdout
    mov rsi, hello      ; pointer to message
    mov rdx, 13         ; length of message
    syscall             ; call kernel

3. C Language

C is a high-level procedural language that allows for structured programming. It provides low-level access to memory and system resources, making it suitable for system programming.

#include <stdio.h>

int main() {
    printf("Hello, World!\n");
    return 0;
}

4. Java

Java is an object-oriented programming language designed to be platform-independent. It introduced concepts such as garbage collection and a rich standard library, which greatly simplified application development.

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}

5. JavaScript

JavaScript is a high-level, interpreted language primarily used for web development. It is known for its flexibility and can be executed in the browser, allowing for dynamic content and interactivity.

console.log("Hello, World!");

6. Python

Python is known for its readability and simplicity, making it a popular choice for beginners and experienced developers alike. It emphasizes code readability and has a vast ecosystem of libraries.

print("Hello, World!")

7. Large Language Models (LLM)

Large Language Models (LLMs) are a type of artificial intelligence that leverage machine learning techniques to understand and generate different types of data. These models can significantly enhance coding by automating tasks such as code generation, documentation, and debugging. Trained on vast amounts of text and code data, LLMs can assist in writing more efficient code, translating code between languages, and even suggesting improvements.

For example, using an LLM, you can generate a "Hello, World!" program in Rust with a simple prompt. This is just a basic example, but LLMs are capable of much more complex tasks:

write hello world in Rust

Conclusion

The evolution from machine language to high-level languages like Python illustrates a significant trend in programming: abstraction. This shift has made coding more intuitive, allowing programmers to focus on logic and functionality rather than the intricacies of hardware. With the advent of Large Language Models (LLMs) and artificial intelligence, we are witnessing another leap in this evolution. These technologies are not only making programming more accessible but also enabling new ways of interacting with code, such as natural language processing and automated code generation.

I am not sure will it replace any developers or not, but definately not the engineers. With the abstraction like LLM, the engineers are going to focus more on the real problem-solving rather than the syntax and the language itself. And I am loving this already.