By Tom Cranstoun
As someone who has witnessed the evolution of programming languages over five decades, I've noticed an interesting parallel:
Writing prompts for AI is remarkably similar to traditional programming. The only real difference is the syntax we use to express our intentions.
The next time someone tells you AI is making programming obsolete, remember: prompting is programming. The only thing that's changed is the compiler.
Let me take you on a journey through time.
The More Things Change, The More They Stay The Same
Let's look at a simple example that has stood the test of time: the interactive "Hello World" program.
Whether you're coding in BASIC from 1977 or prompting an AI in 2024, you're essentially solving the same computational problem with the same logical requirements:
Get input from the user
Handle empty or invalid input
Process the input (in this case, trim whitespace)
Provide a default value if needed
Output the result
A Walk Through History
We start the journey in 1977 with BASIC. BASIC, short for Beginner's All-purpose Symbolic Instruction Code, is an early programming language that was designed to help non-technical users and students solve easy problems with a computer. That looked like this:
10 PRINT "ENTER YOUR NAME"
20 INPUT N$
30 IF LEN(N$) = 0 THEN N$ = "WORLD"
40 PRINT "HELLO "; N$
50 END
Simple and direct - the logic is clear even after 47 years.
Le't’s then move to 1995 and the Java programming language and object-oriented maturity. Here we go:
import java.util.Scanner;
public class HelloName {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String name;
System.out.print("Enter your name: ");
name = scanner.nextLine().trim();
if (name.isEmpty()) {
name = "World";
}
System.out.println("Hello " + name);
scanner.close();
}
}
More verbose, but with better resource management and string handling.
And then we arrive today, with the “new” language: AI prompts.
Create a nodejs program that:
1. Declares a variable called 'name'
2. Prompts the user "Enter your name: "
3. Reads user input into the 'name' variable
4. If 'name' is empty or only whitespace, sets it to "World"
5. Outputs "Hello" followed by the value of 'name'
Additional specifications:
- Trim whitespace from input
- Handle null input gracefully
- Use modern string interpolation
- Close any resources properly
So, I ask you: How far have we come?
The inconvenient truth about AI "democratizing" programming
People often claim that AI will democratize programming by allowing anyone to create software using natural language. I respectfully disagree. Here's why:
Same Logic, Different Syntax
Whether you're writing in BASIC, Java, or prompting an AI, you still need to:
Define the problem clearly
Specify the exact steps needed
Handle edge cases
Manage resources properly
Consider error conditions
The Complexity Scales Similarly
As your requirements become more complex, your prompts must become more detailed and precise - just like traditional programming. Consider these parallels:
Traditional Programming | AI Prompting |
---|---|
Variables and types | Explicitly naming and describing data |
Control structures | Detailed step-by-step instructions |
Error handling | Specifying edge cases and fallbacks |
Documentation | Providing context and requirements |
Testing | Validating outputs and edge cases |
What’s the real difference?
The main distinction isn't in the computational thinking required - it's in the syntax we use to express our intentions:
Traditional languages use formal syntax (if, while, for)
AI accepts natural language ("if the input is empty", "repeat until")
But in both cases, you need to think like a programmer:
Break down problems into logical steps
Consider all possible scenarios
Specify exactly what should happen in each case
Understand data flow and resource management
You are still programming
AI isn't eliminating the need for programming thinking - it's just providing a new syntax for expressing it. The fundamental skills of computational thinking, problem decomposition, and logical reasoning remain essential.
Whether you're writing code or crafting prompts, you're still programming - you're still telling a computer system exactly what you want it to do and how you want it done.
Learn more about what’s changing with AI and what’s not
AI is the buzz these days and we’ve naturally covered it extensively in our peer groups and conferences, both the many positives and negatives. And the conversation continues for the foreseeable future.
Back in March, Tom wrote this piece: Rethinking AI’s Role in Content Management, which covered how CMS Kickoff 24 changed Tom’s perspective on how AI changes things. You can continue the conversation with Tom in person in January at CMS Kickoff 25 in January in Florida.
AI has also been a regular topic in our many members’ calls. Recently Richard Harbridge looked at how AI changes the value of our work, where he also covered the fears that we don’t talk enough about.