Lesson 2.
Where AI Shines and Where It Doesn’t
Hello and welcome to Lesson 2. In this lesson, we'll explore both the strengths and weaknesses of AI when it comes to coding. Let's dive in.
AI excels at solving formalized problems. But what exactly does that mean? A formalized problem is one that has a clear, specific solution. For example, 1 plus 1 will always equal 2. It's straightforward and predictable.
In coding, the most formalized tasks are algorithms. These involve inputting specific data and getting a specific output every time. That's why algorithms are easier for computers and machines to handle—it's all about following a defined process.
Since many algorithmic problems have been solved in various ways over the years, these solutions are well-known, which makes AI particularly good at handling them.
Let me show you an example of how I practice algorithms. Recently, I worked on a simple task where I had to write a function that returns the number of words in a string.
I spent some time solving it on my own, and I came up with a function that takes a string as input and returns the number of words in it.
Afterward, I asked Claude (or ChatGPT) to check my solution and provide feedback.
It successfully reviewed my function, confirming that it handled basic cases well and even suggested improvements and testing tips.
Then I asked it for alternative solutions, and it came up with five different approaches.