How AI is Redefining the Role of Programmers in the Tech Industry
TL;DR: AI-generated code outperforms lazy programmers. Software jobs are declining, but centaurs will survive.
Today, a friend of mine shared his frustration about being asked to fill out a registration form requiring a username and password.
The system was poorly designed and demanded a secure password without explaining what the issue was.
This is a clear example of terrible UX and a lazy programmer unaware of writing error messages with empathy.
I told my friend this is unacceptable in today’s world since modern AIs can easily solve such problems.
I took my phone and said, “L.M.P.T.F.Y.” (Let Me Prompt That For You), the modern equivalent to LMGTFY.
I quickly wrote a prompt:
Give me the code for a secure password validation site with helpful error messages when the user enters a weak password.
The A.I. successfully provided a working page with this code:
document.getElementById('passwordForm')
.addEventListener('submit', function(event) {
event.preventDefault();
// Prevent the form from submitting
const password = document.getElementById('password').value;
// Get the password value
const errorMessages = document.getElementById('errorMessages');
// Get the error messages container
errorMessages.innerHTML = ''; // Clear previous error messages
let errors = []; // Array to store error messages
// Validate minimum length
if (password.length < 8) {
errors.push('The password must be at least 8 characters long.');
}
// Validate uppercase letters
if (!/[A-Z]/.test(password)) {
errors.push('The password must contain one uppercase letter.');
}
// Validate lowercase letters
if (!/[a-z]/.test(password)) {
errors.push('The password must contain one lowercase letter.');
}
// Validate numbers
if (!/[0-9]/.test(password)) {
errors.push('The password must contain one number.');
}
// Validate special characters
if (!/[!@#$%^&*(),.?":{}|<>]/.test(password)) {
errors.push('The password must contain one special character.');
}
// Display errors or success message
if (errors.length > 0) {
errors.forEach(error => {
const p = document.createElement('p');
// Create a new paragraph element
p.textContent = error;
// Set the error message as text
errorMessages.appendChild(p);
// Add the error message to the container
});
} else {
alert('Valid password!');
// Show success message if no errors
}
});
You can also try it yourself:
The Bad News
The AI-generated solution with helpful error messages is bad news for lazy programmers.
Software development jobs are already declining, and this trend is expected to continue:
This is something many people have been forecasting.
I wrote an article five years ago during the last AI Winter predicting this would happen.
As the great Niels Bohr once said:
Prediction is very difficult, especially about the future.
Now, it’s clear: lazy programmers are doomed!
The Good News
What can we do as software engineers besides writing mediocre code?
Give Up
Explore Other Careers
Soon, there will be a shortage of handy people such as electricians, plumbers, and painters.
Improve Ourselves by Becoming Centaurs.
A.I. won’t take your job. A developer mastering AI tools will.
I write biweekly articles about clean code, refactoring, and programming.
In these articles, you can compare the output of many AIs with and without guidance.
For example, the above code has several problems unnoticed by AIs:
Humans remain invaluable when they know how to harness AI effectively.
Here’s a video benchmarking some tools:
Conclusion
Hopefully, my friend will soon complete the password form — or better yet developers will deprecate all passwords.
Also, I hope you’ll write solutions like these and get paid as a “Centaur”- a developer who masters AI tools to enhance their craft.