The Great Programmer Purge: How AI Is Taking Over the Tech Workforce

The Great Programmer Purge: How AI Is Taking Over the Tech Workforce

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 telling him what the issue was.

Article content

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 all 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 will happen.

As the great Niels Bohr once said:

Prediction is very difficult, especially about the future.
Article content

Now, it's clear: lazy programmers are doomed!

The Good News

What can we do as software engineers besides writing crappy code?

Give Up

Article content

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.

Maximiliano Contieri

Engineering Manager@Avature | CS Teacher@UBA | Book Author@O'Reilly | MaximilianoContieri.com

1mo
Like
Reply

To view or add a comment, sign in

More articles by Maximiliano Contieri

  • Code Smell 299 - Overloaded Test Setup

    When your test setup is bigger than the actual test TL;DR: Bloated setup that's only partially used makes your tests…

    1 Comment
  • Code Smell 298 - Microsoft Windows Time Waste

    When Conditional Logic Silences Critical Signals TL;DR: Skipping status reports in conditional branches causes silent…

  • Code Smell 297 - Syntactic Noise

    Your code shouldn't look like alien hieroglyphics TL;DR: Too many cryptic symbols make your code hard to understand and…

  • From Helpful to Harmful: How AI Recommendations Destroyed My OS

    Why you should always be in control TL;DR: Always stay in control when using AI tools. Blind trust can lead you to…

  • Refactoring 027 - Remove Getters

    Unleash object behavior beyond data access TL;DR: Remove or replace getters with behavior-rich methods that perform…

  • Code Smell 296 - Unhappy to the Right

    Keep your happy path flowing, not nesting TL;DR: Arrange your code so the main logic flows along the left margin…

  • Refactoring 026 - Migrate Global Console Input to Declarative Function

    Transform manual hard-coded inputs into testable functions TL;DR: Extract input logic into separate functions to make…

    2 Comments
  • Refactoring 025 - Decompose Regular Expressions

    Make Regular Expressions Testable and Understandable TL;DR: You can break down a complex validation regex into smaller…

    1 Comment
  • Code Smell 295 - String Concatenation

    Untangling the string mess in your code TL;DR: Avoid string concatenation for complex strings, use templates. Problems…

  • Code Smell 294 - Implicit Return

    Your language adds clever features. Making YOU more obsolete TL;DR: Overusing implicit returns makes your code harder…

Insights from the community

Others also viewed

Explore topics