What you'll learn
- Explain why AI is an umbrella of technologies that learn patterns from data rather than a single tool like ChatGPT
- Compare software 1.0, 2.0, and 3.0 using Karpathy's software evolution framework as a mental model for AI
- Describe how software 1.0 uses hand-written if-then rules in Python and why changing behavior requires editing the code
- Train a no-code image classification model in Teachable Machine using balanced, varied samples to reduce bias
- Identify PII, intellectual property, and other sensitive data that must be kept out of model training data
- Distinguish a naive prompt from zero-shot, one-shot, and few-shot prompts that use constraints and examples
Free 60-minute video lesson with a full transcript and knowledge checks. No account needed to watch.
Introduction
Welcome to the first skill of the AI Vibe Coding & Security: ChatGPT, Cursor & TDD course! In this course, we'll explore the main types of AI at a practical level, so you understand what's really happening behind the scenes when you Vibe Code. Don't worry, we'll define vibe coding later, but for now, this is when you describe what you want, the AI drafts, and together, you refine the code. It's about understanding enough to steer the vibe, not just copy the code blindly.
We'll also dive into prompt engineering, the art of communicating clearly with AI. Think of it as learning to ask the right question, in the right way, so you get a meaningful, reliable output from your coding assistant.
This course is made up of six skills where you'll move from understanding how AI thinks to building your own web projects step by step with HTML, CSS, and JavaScript.
Knowledge Check
This AI mini course 'AI Vibe Coding & Security: ChatGPT, Cursor & TDD' is focused on teaching how to code from scratch
What is AI?
In this video, we explore what Artificial Intelligence really is and how it fits into different categories of technology. Together, we will look at how AI systems learn from data, how Machine Learning and Deep Learning connect, and where generative AI fits in. By building a simple mental model, we will begin to understand how these ideas relate to the tools we use for Vibe Coding with AI and why thinking about security from the start is imperative.
Knowledge Check
Which of the following is a subset of machine learning that uses layered neural networks for tasks such as vision, speech, and language?
Understanding Karpathy’s Software Evolution Framework
In the following video, we explore how programming has evolved from writing traditional code to communicating with AI through plain language. Together, we will look at Andrej Karpathy’s framing of Software 1.0, 2.0, and 3.0 to understand how each stage changes the way behavior is created - first through explicit rules, then through learning from data, and finally through prompts.
Knowledge Check
What is the primary characteristic of Software 1.0?
Software 1.0
In this video, we explore the foundations of software 1.0, where every action a program takes is defined by the code itself. We will see how explicit logic using clear rules and structures shapes predictable behavior in traditional programming. Through simple examples, we will begin to understand how writing and adjusting code forms the basis of how computers follow instructions.
Colab Notebook:
Number Game:
import random
import sys
import time
BANNER = r"""
____ _ _ _ _
/ ___| _ _ ___ ___ ___| |_ | \ | | ___ _ _ _ __ ___| | ___ _ __
\___ \| | | |/ __/ _ \/ __| __| | \| |/ _ \| | | | '__/ _ \ |/ _ \| '__|
___) | |_| | (_| __/\__ \ |_ | |\ | (_) | |_| | | | __/ | (_) | |
|____/ \__,_|\___\___||___/\__| |_| \_|\___/ \__,_|_| \___|_|\___/|_|
"""
def slow_print(text, delay=0.01):
for c in text:
print(c, end="")
sys.stdout.flush()
time.sleep(delay)
print()
def choose_difficulty():
print("\nChoose difficulty:")
print(" 1) Easy (1–50, 10 guesses)")
print(" 2) Normal (1–100, 10 guesses)")
print(" 3) Hard (1–200, 8 guesses)")
print(" 4) Insane (1–1000, 12 guesses, but hotter/colder only)")
while True:
choice = input("Enter 1/2/3/4: ").strip()
if choice in {"1","2","3","4"}:
if choice == "1": return (1, 50, 10, True)
if choice == "2": return (1, 100, 10, True)
if choice == "3": return (1, 200, 8, True)
if choice == "4": return (1, 1000, 12, False)
print("Invalid choice. Try again.")
def get_hint(target, guess, last_diff=None, show_direction=True):
diff = abs(target - guess)
direction = ""
if show_direction:
direction = "Too high!" if guess > target else "Too low!"
# qualitative heat hint
if diff == 0:
heat = "Exactly right!"
elif diff <= 3:
heat = "Scorching! 🔥"
elif diff <= 7:
heat = "Hot! ♨️"
elif diff <= 15:
heat = "Warm 🙂"
elif diff <= 30:
heat = "Cool 😐"
else:
heat = "Cold 🧊"
colder_or_warmer = ""
if last_diff is not None:
if diff < last_diff:
colder_or_warmer = " Warmer ↑"
elif diff > last_diff:
colder_or_warmer = " Colder ↓"
else:
colder_or_warmer = " Same distance →"
parts = [p for p in [direction, heat + colder_or_warmer] if p]
return " | ".join(parts), diff
def play_round():
low, high, tries, show_direction = choose_difficulty()
target = random.randint(low, high)
used = 0
last_diff = None
print(f"\nI'm thinking of a number between {low} and {high}.")
print(f"You have {tries} guesses. Good luck!\n")
while used < tries:
raw = input(f"Guess {used+1}/{tries}: ").strip()
if raw.lower() in {"q","quit","exit"}:
print("Exiting to menu.")
return None # user quit this round
if not raw.lstrip("-").isdigit():
print("Please enter an integer.")
continue
guess = int(raw)
if guess < low or guess > high:
print(f"Stay within range {low}–{high}.")
continue
used += 1
if guess == target:
print(f"🎉 Correct! The number was {target}. You used {used} guesses.")
return used
hint, last_diff = get_hint(target, guess, last_diff, show_direction)
print(hint)
print(f"\nOut of guesses! 😢 The number was {target}.")
return tries + 1 # penalty bigger than any win
def main():
print(BANNER)
slow_print("Welcome to Guess The Number!\n", delay=0.005)
best = None
while True:
result = play_round()
if result is None:
# user returned early to menu
pass
else:
if result <= 12: # arbitrary cap: only count reasonable wins
if best is None or result < best:
best = result
print(f"🏆 New personal best: {best} guesses!")
else:
print("Keep at it—you've got this!")
again = input("\nPlay again? (y/n): ").strip().lower()
if again not in {"y","yes"}:
if best is not None:
print(f"\nYour best this session: {best} guesses. Thanks for playing!")
else:
print("\nThanks for playing!")
break
print("\n" + "-"*60 + "\n")
if __name__ == "__main__":
main()Knowledge Check
When writing a program in Software 1.0, what must a developer do to change how it responds to new input?
Software 2.0
In this video, we explore Software 2.0, where programs learn patterns from data instead of relying on hand-written rules. Together, we will see how a model can be trained to recognize examples using Google’s Teachable Machine and how this approach represents a shift from coding logic to guiding learning through data.
Knowledge Check
What is a key characteristic of Software 2.0?
Software 3.0
In this video, we explore Software 3.0, where we program with plain language prompts instead of writing code or retraining models. We will also note how this approach differs from Software 1.0 and Software 2.0 for a clear foundation for the upcoming quick overview of prompt engineering.
Knowledge Check
What best describes the main difference between Software 2.0 and Software 3.0 in the context of Vibe Coding?
Challenge 🎉
Congrats on making it to the end of the skill and to the challenge! Your task is to answer the questions below to ensure you understand key concepts about how AI systems progress from traditional coding to data-driven learning and modern prompting. Take a moment to reflect on what connects each stage before moving on to the next skill.
Knowledge Check
Which of the following are considered subdomains or types of Artificial Intelligence (AI)? (Select three)
Select all that apply.
Knowledge Check
Which of the following statements about AI and its subdomains are true? (Select three)
Select all that apply.
Knowledge Check
Which of the following statements are true about Software 1.0, 2.0, and 3.0 as described by Andrej Karpathy? (Select three)
Select all that apply.
Knowledge Check
Which of the following statements about Software 1.0 and programming in Python are true? (Select three)
Select all that apply.
Knowledge Check
Which of the following statements about Software 2.0 and the use of Google's Teachable Machine are true? (Select three)
Select all that apply.
Knowledge Check
Which of the following statements about Software 3.0 and vibe coding are true? (Select three)
Select all that apply.
View Transcript
Introduction
0:00Hello and welcome to the first skill in the AI Vibe Coding and Security with ChatGPT, Cursor and TDD course. In this course, we'll explore the main types of AI at a practical level so you can understand what's really happening behind the scenes when you vibe code. And don't worry, we'll define vibe coding later. But for now, this is when you describe what you want, the AI drafts, and together you refine the code.
0:31It's about understanding enough to steer the vibe, but not just copy and paste the code blindly. That's why we have security in the title of this course. You'll see how tools like ChatGPT and Cursor use different kinds of AI to reason, generate, and assist, and why understanding that helps you write safer, smarter prompts. But first, I do want to let you know that this course is part of an AI series of mini courses. And we are here, AI Vibe Coding and Security. The recommended path is to take this first because we'll learn prompt engineering in depth. We do cover prompt engineering in the AI Vibe Coding and Security, but it's just a mini crash course.
1:21Ideally, you would have AI prompt engineering under your belt, but if not, you can definitely start with AI Vibe Coding. And then you can move on to AI agentic coding, which we get much deeper into the different tools, including Cloud Code and Copilot. If you're working with Microsoft products, you might enjoy this course, AI Essentials with Microsoft Copilot. But if you're looking for an ecosystem agnostic approach to AI, then you might consider AI Productivity for Professionals. If you're trying to launch a product, this is a great one, Artificial Intelligence for Executives and Leaders.
2:00And these two courses go hand in hand, depending on your background. If you're a developer, then the AI Compliance, Privacy, and Copyright for Developers is a great course to take. Conversely, you can take the HR, Legal, and IT, which is for non-technical audiences. And together, all of these courses give you a great foundation on using AI right away. But first, what's in this course and what is not in this course? In scope, we'll identify the differences between main types of AI. The takeaway here is that AI isn't just one thing, and it's not just chat GPT. There are many different approaches, and we'll explore that in this first skill.
2:43In the next skill, we'll dive into understanding basic prompt engineering for vibe coding. Again, in this case, we're really thinking about a mini crash course. If you want the full course, it's still a mini course, but at least it's all about prompt engineering. And even in that mini course, we're just scratching the surface. So this is a great skill to have. And finally, we'll plan, build, and test code with chatbots like chat GPT and later, agentic tools such as Cursor. But here is what is out of scope. We're not learning how to code. I highly recommend learning how to code, and doing so with a chatbot or maybe an agentic tool like Cursor is an incredible way to learn, and it's a faster way to learn. In fact, I'm jealous that you get to learn how to code if that's your path. I had to do it the hard way without AI at all, and it was a lot of reading documentation, a lot of reading books, and so on and so forth, trial and error, making mistakes. But with AI, you can learn at lightning speeds. And there are no tutorials on how to build your own AI chatbots. I do have courses that give you the foundation for that, but that is not in this course. For those, check
4:00out TensorFlow developer course and the introduction to machine learning and introduction to deep learning courses. We also will not use APIs. API just means no use of computer to computer connections. And that's how you build chatbots, by the way. So again, we're not going into those. Although exciting, it's not part of this course. Now a little bit about me. I'm Jonathan Barrios, and I teach data science, machine learning and deep learning. Previously, I was a full stack developer and have worked with AI and built SAS applications, AI applications and streaming platforms. I'm a veteran trainer, and I've been teaching for a while at top platforms such as Treehouse, Thinkful and Chag. And now I'm happy to be part of the CBT Nuggets team. You can find me on LinkedIn at Jonathan-Barrios-AI and at my website, JonathanBarrios.com. And then finally here at X at AI underscore data underscore science. And this is a great example of what my field is called.
5:02At least that's what I call it. AI data science. That is my background. I have 50% AI engineering and 50% data science and combined. I just call it AI data science. And one note on X. A lot of people either love it or hate it. But if you're into AI like me, it's a great resource. And I only follow people who talk about AI and machine learning. And turns out that's where the community is. Everybody else, quite frankly, I ignore. And that's because I consider social media to be a waste of time. Time is very, very valuable. And whatever time that I do have left after all of the work that I do with AI, I'm not going to spend it on social media. So if you want to follow me and other people that talk about AI, you can learn so much and stay apprised of all the upcoming changes of all of the new developments, which happen almost daily. And that way it's better than a newsletter. All right. In this course, we're going to explore the AI behind vibe coding tools. And we'll also dive into prompt engineering, which is the art of communicating clearly with AI. As you'll learn, I really see prompt
6:17engineering as programming in plain language. This will make sense by the end of this skill. When you're thinking about all of the six skills that you'll take in this course, I can break it down like this. We'll start with how AI thinks to help build your own projects step by step. First, we'll start with AI and prompt engineering, and then we'll use CodePen to try out code without AI. And then we'll introduce it with chat GPT. And then we'll add cursor to the mix, which is an AI agentic tool. And each one of these work together to help us plan build and debug our apps. And when you look at TDD, if you're wondering what this is, this is test driven development. That means test your code like the professionals do. Even if you're using AI, you'll learn why that is very, very powerful. And then we'll take what you learned in prompt engineering and apply it with code. So code plus prompt engineering. And we'll apply that with HTML, CSS, and JavaScript. And finally, we'll take everything that we learned and add version control, which is GitHub. But then we'll launch a website using
7:36GitHub pages. I should say that skills one and two are here. And this is skill three, skill four, skill five, and then skill six. So that's how these six skills are distributed. AI and prompt engineering are the first two. So I kind of lumped them in the first one. I just wanted to clear that up. Now let's take a look at what we're going to cover in this skill. And just remember that this course is a mini course. So we're only going to scratch the surface. So if you want a full course on vibe coding or any of the other mini courses, just let us know in the comments. That is precisely the data that we need in order to make the courses that you want. For example, there's so much more that we can get into, like replit, lovable, V zero. These are all different tools that are great for five coding. We're just going to get into GitHub pages and just really focus on this mini course. All right. Now that we've gotten that out of the way in this skill, we're going to explore what is AI really? It isn't just one thing. And number two, AI can be super confident, plus super wrong at the same time. And this is why prompt engineering and testing is so important. And then we're
8:52going to break down AI into a mental model. This mental model is going to be very simple because you need to think about this as you're working with AI. So we're going to break it down into three types of software, 1.0, 2.0 and 3.0. This is going to be a very powerful, but very simple mental model. And then we'll apply each one, meaning we're going to build in software 1.0, which is traditional programming. Just give you a preview there. Then we're going to use deep learning to build our own neural network. If that sounds intimidating, don't worry. It's going to be super easy and we'll use no code to build that model. And finally, 3.0 is generative AI. That just means chat GPT. So we're going to tour the different types of AI, but thinking about them as types of software, which makes it a much simpler task to build our mental model that we'll use as a foundation for the entire course. And by the end of this skill, you'll know what AI really is, why it sometimes fails in a spectacular manner and how to talk to it like a tool instead of a human. All right. I will see you in that very first video. What is AI really and how it's more than just
10:12generative AI.
What is AI?
0:00Welcome back. For this course, you don't need a programming background. You can be a beginner. And that's why vibe coding is so powerful and fun. And that's why I love vibe coding, because it really democratizes programming for everybody. However, security becomes a key component. And the way that we can mitigate this is by building a mental model to truly understand what AI is. And the most important thing that I want you to take away is that AI isn't one thing.
0:32It's a whole umbrella of different technologies that learn, adapt, and even create. And at the broadest level, these AI systems learn patterns from data and use them to make predictions, decisions, and even content. And if you're like many people, you think that chat is AI, which is not wrong, but it's not the complete picture. For example, when you're vibe coding with tools like ChatGPT or Cursor, meaning you are working with AI in some way to generate code with a chat bot, you're working with something called generative AI that's built on top of other AI technologies.
1:13So gen AI or generative AI is what ChatGPT is, but that's not what AI is, or at least that is not all that AI is. Everybody thinks, oh, AI is ChatGPT. Those chat bots that seem human. And while that does make complete sense, it's partially true. So now we build our mental model. Let's try to understand the main components of AI and then distill them into different types of software.
1:44And this is the essential core that you need to become a vibe coder that also navigates safety so that you create code and understand it and don't create security vulnerabilities, which is super easy to do if you don't have a programming background. So under the umbrella term AI, there are rules, search, machine learning, deep learning, generative AI. There are many different things, but for our context of this course, we're gonna simplify this to the main domains.
2:17So we know that the umbrella term here is artificial intelligence, but inside of that, we have different kinds of technologies that can learn on their own, meaning that they learn from the data. And while we could go into this, which many courses do, they'll talk about supervised and unsupervised, self-supervised and reinforcement learning. These are the different types of learning. They're not super helpful unless you're gonna become an engineer or a data scientist, or maybe even a deep learning engineer.
2:49Those are the nuances that you need, but for AI vibe coding with security in mind, we just need to understand that machine learning and deep learning are types of AI that learn from data. These are the main subsets. So machine learning. These models learn patterns from data, like predicting stock prices. Maybe they can detect spam or make video recommendations, but they're using algorithms. So machine learning is a subset of AI, and deep learning is a subset of machine learning.
3:24So what is deep learning? Deep learning uses layered neural networks for vision, speech, and language tasks. It's very similar to machine learning in that they both learn from data. But the main distinction is that machine learning learns from algorithms, and deep learning uses neural networks. So what does that mean? Well, it's software modeled after the brain. So much like the human brain that has neurons that are connected together to form these neural networks, we've created software that mimics the human brain, and that's why ChatGPT seems so powerful and pretty much like you're talking to a human.
4:07We've learned to mimic that process. But ChatGPT isn't really called deep learning. It's called generative AI, and this is the new kid on the block. These are the models like ChatGPT, Claude, Grok, or Gemini, that can create text that seems so lifelike that it's hard to tell the difference between a person and a model. It also generates code, and that's why we're using it for vibe coding, but it can also generate images and even music.
4:37So generative AI is just one slice of the AI pie. And as you can imagine, this can be confusing because it can be applied to vision, speech, text, or natural language processing. It can make recommendation. It can be used with robotics, which is pretty much self-driving cars, and on and on and on. So we need to simplify this so that we can use this. When we're thinking about AI and its subdomains like machine learning and deep learning, in gen AI, let's add them here.
5:10In AI, let's add them here. We could talk about supervised learning, which is like using flashcards where the model learns from labeled examples. We could do that, but instead of doing that and then trying to tie them to all of these different applications or use cases of AI, we're gonna use a hamburger and a hot dog. These two are gonna be our labeled examples, and we're gonna build a deep learning model so you can understand how that works, but we're not gonna call it supervised learning.
5:40I mean, I've told you that's what it is, but it's not directly helpful to get into that detail. What's more important is to build this mental model, and we're gonna use three types of software. When we're talking about machine learning and deep learning, we're talking about software 2.0, but now I'm getting ahead of myself. I'll be sure to explain exactly what software 1.0, 2.0, and 3.0 mean, but now let's look at these use cases and try to identify what types of AI are being used here.
6:11So when you see something like facial recognition, this is often deep learning, but depending on how you use it, it could also incorporate machine learning. When you're looking at computer vision and robotics, this is also deep learning because the robots use deep learning to see and to classify objects, much like you would in facial recognition or even computer vision for cars. You need to identify, okay, that's a car. This is a tree. That's a person. That's a sign.
6:42These are all deep learning use cases. Fantastic for neural networks, but again, that's not the important part. The takeaway really is that AI isn't just one thing. It's these three main subdomains that can be used in all kinds of ways. For example, when we're doing intelligent document processing, that could be Gen AI because we're dealing with text, it could also be deep learning or machine learning or all three at the same time.
7:13And fraud detection, this is a classic machine learning problem that finds different kinds of outliers. Oh, wow, that expense is 10 times the average of all the other expenses for the last 10 years. Maybe that is some kind of a outlier. Let's flag it as fraud. So that's a classic example of using an algorithm with machine learning to detect these outliers for fraud detection. And in the next video, we're gonna dive into software 1.0, 2.0, and 3.0, and here's why.
7:48This is a much easier way to think about all of the different types of AI and how they work. We're gonna go through each one of these examples and we're gonna try it out ourselves. For example, software 1.0, that's programming. I'll show you the if this, then that behavior of traditional programming. Software 2.0 is where the models learn from data. And we'll do that together so that we can classify the hot dog and the hamburger. We'll use deep learning for that because it's really good at identifying these or classifying these types of images with labeled data, which again is called supervised learning because it has labels.
8:28But again, that's not super important for our needs, but if you do hear it, now you know what it means. And then finally, we'll get into generative AI, which is the new kid on the block, meaning that it's built on deep learning, but it's really focused for generating content, not so much classifying. It generates text, images. It can do that with video. It can do that with sound, which includes music. It's pretty amazing. So I'll see you in that next video and we'll tackle each one of these together.
Understanding Karpathy’s Software Evolution Framework
0:00Welcome back. Before we get into the different types of software to help us build our mental model, what do I mean by "Carpathy Framing?" That means Andre Carpathy is the person that came up with these different types of software 1.0, 2.0, and 3.0, and they always have really amazing content on X. So if you are on X and you're just using it to follow people on X for AI and machine learning to keep up with the developments in AI, then definitely follow Carpathy at ARPA THY. Here's why.
0:37They have this pinned tweet here that says the hottest new programming language is English. So what do they mean by that? And that's software 3.0 where you're doing programming with plain language or English. And here this is the term that Andre Carpathy came up with , vibe coding. There's a new kind of coding I call "vibe coding" where you fully give into the vibes, embrace exponentials, and forget the code even exists. It's possible because LL Ms, which is a kind of generative AI, are getting too good. Then it gets a little technical.
1:13And that's the thing to keep in mind. Andre Carpathy will post amazing things, but often they're pretty technical. And rightfully so, this is the person that helped found OpenAI. They helped Tesla with autonomous vehicles and so on. They're really one of the best in the field. So it's going to be a little bit more technical, but I'm going to break it down for you. And we're going to use three simple types of software to build our mental model. We'll start with software 1.0. This is the classic software programming. So the word coding, that's software 1.0. Vibe coding is software 3.0. But we'll get to that. I'm getting ahead of myself. This is the if this or if X, then why. And this is traditional programming. So the code creates the behavior. So we use statements, loops, and functions to tell the computer exactly what to do. The behavior comes from the explicit code. It's not going to just think something else, right? When you're talking to chat GPT, well, it's non deter ministic, meaning the output, you can ask it the same question, but that output may not be the same every time. However, once you write a program with code like Python, and you
2:30run it, let's say one plus one equals two, it's always going to equal two. If you say print, and then you add your name, it's always going to print your name. It's not going to just think something else, or phrase it in a different way, like chat GPT would, because software 1.0 is deterministic. So that's a nice way to compare these software 1.0 is programming, traditional programming, the stuff that we use before AI showed up. And now when we're talking to a chat bot, it kind of has variations, right? And sometimes it can be wrong. But programming, if it's written correctly the first time, it's going to stay that way. Unless there's a package or something that gets updated, but the logic doesn't change. So think of software 1.0 is precise , reliable, but also rigid. The computer only knows what it's been told. Then we have software 2.0.
3:25This is where we stopped writing all of these rules ourselves, and started to let the computers learn the rules on their own using training and fine tuning. That's basically the computer learning from data. And that's what creates the behavior. So you might hear the term weights. That's how it creates these rules. How important is this and piece of information? How important is this? How important is that? So in this network full of little nodes, they all have different weights, but that just really means rules. That's how it learns from data.
4:00Instead of coding every behavior, we can define a model, feed it the data, and use training to find the rules automatically. In the world of machine learning and deep learning, the behavior changes not because we changed the code, but because we changed the data. Or we retrained the model means that we changed these weights. You changed the weights, you changed the behavior. And how do you change the weight? You either change the data, or you do the training and fine tuning again. Now, if you're feeling that that 's confusing, don't worry. We're going to apply this with the hamburger and the hot dog without using code.
4:37And we're going to both do this on our computers. And you will automatically see exactly how this works. We're going to demystify that process. No need to get into the brain and neurons and all of that good stuff. And now let's talk about software 3.0. This is the world where vibe coding lives. We don't code it like you would in software 1.0. You don't train it with data so that it learns. We code it with plain language. And that plain language is called a prompt. And that's why Andrei Carpathi said that the hottest new programming language was English.
5:14Because to get the behavior, all you have to do is steer that model. And the way that you do that is by writing prompts in plain language. The AI is still running code behind the scenes, but our prompts can steer or influence the outputs. And that's why we're going to learn prompt engineering. So the hottest new programming language is English. And that's a spirit of vibe coding. We'll explore what that really means as we move through this course. We'll use prompt engineering such as CRE, which stands for context role expectation shots, which are examples.
5:53And then we'll use constraints and then different snippets that we'll call facts to feed it into the model. But really what we're doing is programming and plain language. And that's where this course really stands out from most of the other courses that I've seen. Don't talk to the AI like a human. Talk to it using prompt engineering because you now understand how it works. All right, so let's build that mental model by exploring software 1.0, 2.0, and 3.0 in a hands-on approach. So I'll see you in the next video on software 1.0.
Software 1.0
0:00Welcome back. In this video, we're going to unpack software 1.0. In this world, the behavior of a program lives entirely inside of the code, meaning that we write the code means we write the rules. If you want the computer to do something new, you wouldn't tweak the data or ask politely. You would just open the file, change the logic and rerun the program. That means you change the code that you created by hand to get that new behavior. Every decision is made by explicit rules.
0:32Like we mentioned before, if X, then Y. And if you know anything about programming, especially in Python, we use something called if and else conditions. And we also use loops and comparisons. So the code really is explicit rules. There's no learning from the data. It's rules that we create. And to change the behavior, you edit the code. And we could demo one of many different things. So we could greet based on an hour, because if it's this time, then create this greeting if X, then Y.
1:05In this video, I'll show you a small Python demo that encapsulates how we create rules by hand using code. In this case, Python code. And the reason I picked Python is because it's almost like English. There are many different kinds of programming languages. Some like assembly language are really geared towards the machine. So the closer that you get to the hardware, the machine, the less it's like plain language. However, Python was created to make it easier for humans to program.
1:39And essentially all programming languages are for humans to make it easier to write code that isn't directly the code that the computers run themselves. So if that doesn't make sense, don't worry. We'll break it down in the Python example. And to do that, we're going to use Google Colab. And the reason is, well, it's the most popular for data science. That's why I use it. But it's also probably the easiest way to start writing Python code without doing any setup. I'll share this notebook with you and you can open it up and take a look and maybe even run it.
2:13But if you want to save it, you need to have a Google account, which is free. So it's pretty easy to get started. And if you get into AI and you want to go further with chatbots like generative AI and build models using APIs, meaning computer to computer communication, which is often how these applications are built. This is a great tool to use for that purpose. It's a great way to get started and iterate on ideas. All right. So let's try to create a greeting based on time.
2:45But first, let me show you that if I type one plus one, which is a form of programming and I hit shift enter, that runs the cell. You could also just hit the play button. And once it connects to the computer in the back end, meaning to Google, then it returns the answer. And it does so pretty quickly. This number one means it ran one time. However, if I push this a bunch of times, you can see that I'm always going to get two. And generally speaking, when you're working with chat GPT, you can say one plus one and then run that and it'll give you something like this.
3:19But if I do it again, you get a nondeterministic response. This was pretty interesting. I did not plan that here. We get this in here. We're getting something completely different. But now we have two responses to pick from. That is not common. This is testing. So this is kind of like an A B test within the prompt from chat GPT because they're trying to improve. And it's probably because I've typed the same super easy thing into the model twice. So it's like, oh, I prefer this one or I prefer this one. Total equals to answer to here.
3:51It says one plus one equals two. Again, nondeterministic. That made my point beautifully. So now going back to this, let's do some software one point oh, where we add some logic. So first I'm going to use name, which is a variable. When we do this, we can store things in name. For example, I can put my name in there, run it, and then nothing happens. But the minute that I type name and run it, then I get Jonathan back. It's just a container that stores something. But we can do something even more fun. For example, I can say name like this, but add an input function and then put that inside.
4:27The minute that I do this, we create a little program. Let me show you what I mean. Once I run this, it prints name and space out, which is exactly what we have in here. But input is saying ask the user for input. And once I give it that input, it's going to store it in name. So I'm going to say Jonathan. I'm going to give him my full name this time. And now when I run this, I get my full name. So this is a cool way to store a value. And guess what? We're going to use this for our program. So let me get rid of this.
4:58I can click on delete here and then it goes away. Now I'm going to add to this. So instead of just using name, I'm also going to create a variable to store the hour so we can ask the user for an input. So I'm going to say input and I'm going to say our. But I'm also going to specify that it's military time. So I'm going to say zero through twenty three. And then colon and then space. This way we'll get a name plus a time. However, let me show you a little trap here that we didn't see. If I run this and I say one, it's going to say, cool, I work.
5:30Everything's going to work. But if I return our, you get one. But if we type type and then pass our into it, what we're doing here is asking what kind of a data type is this? This is something that you may not realize. And it's a string. The problem here is that we can't use strings. But how would you know? Well, let's say that we didn't do anything about this and we're going to try to get some help whenever we run into that error. So let's continue with our program. Let's go ahead and remove our and remove this example.
6:02And let's continue with our little program to do a greeting based on the hour. For example, if it's before noon, we would say good morning. So if the hour is before noon colon. Now, that's super easy way to understand it, right? But this is still logic. If X, that's what we've written here, then why? Meaning greeting is going to equal good morning just like that. But we can continue. And whenever you do continue, you can use something called Elif. And that's just a word that combines the words else and if together.
6:36So you can say if the hour is less than 12, the greeting is going to be good morning, else if the hour is less than 18, then we can say something else like reading equals good afternoon. And the way this works is if this is true, then it'll print this one first. But if it's not, it'll ask this one. So it's going to skip over this one if it's not that time. And if it's below 18, well, that's good afternoon. But you can continue. You can add as many of these else if checks as you like.
7:06But the last one should be else. So you can have if Elif, Elif, Elif, as many as you need. And the last one's going to be else colon. And then here you would say greeting equals. So we have good morning, good afternoon, and now good evening. And if I run this, I'll add my full name and I'm going to say that it's 1 a.m. And then it gave me this weird error not supported between instances of string and int. So what you could do at this point, and this is the beauty of learning to code using generative AI, you put the code in there and then you grab all of this as well, and then you paste it in there and you don't have to say anything.
7:43This is enough information. And this is called a naive prompt because you're not really telling the model very much, but it could probably figure it out. And this is absolutely not how I do it. But let's say that you're just starting out and you're just going to enter this and see what happens the minute you do that. It'll explain why you got that error and you can learn. And this is the most important part of this lesson. When you don't know something, learn. The idea here is to learn fast, not to just get AI to do stuff for you like you're a CEO and it's your engineer, right?
8:16That's not the role that you want. You want to be the engineer that tells the model what to do. And here it says you have to convert this to an integer because it's a string. So, Oh, okay. Because you can't use a string or text to add one. For example, it's like saying one plus one and then entering that. And it doesn't know what you're talking about. But if you use numbers, then you can get that. However, whenever we looked at these outputs earlier, it said that it was a string. So let me show you what I mean.
8:48Our we say type our and you get a string. So let's see what our looks like now, these single quotes. OK, so what happens if we do that here? Then you get 11. OK, that is so weird. What is it doing? Well, it's just putting them together. That's called concatenating. And that just means putting one thing after the other. That could also be a B and then you can keep going. So you're just putting text together. So think of those cutouts that you cut out and you hold together like accordion. ABC, it's one of those things.
9:19Instead of happy birthday here, you're just doing it with strings. And that's why they call it a string. It's a string of text. So you need a number. And whenever you have these quotes, that means it's a string. And that's what it's saying here when you check. So all you need to do is remove these quotes and then you can do one plus one equals two. But how do you remove those quotes? Well, it told us and this int. So you're taking this whole piece of code and putting it inside of there. The minute that you do that, look what happens.
9:50Name. I'm going to use my initials, JB. I'm going to say one. And then the program finishes. I'll talk about that in a second. But if I say what is the type of our now, it says int. So the idea here is to learn with a I just as much as you are creating applications with a I vibe coding isn't just about creating code, copying it and pasting it somewhere. It's about doing that plus learning. That is the most important part. All right. So now that we have all of this, let's go ahead and use it because we haven't really done anything with it yet.
10:22Now we're going to say print and now we can create a greeting based on the time. Don't worry about this F. This just means that you can do printing and programming at the same time and get reading and name, but you have to use these little curly braces to print these different variables. That's the only reason we're using that. It's called an F string. Definitely grab that or go to the chat bot and ask, create a mini lesson on an F string, and then you can learn what it is. And then finally, I'm going to say demo is at, and this is the time.
10:55So this is the time that I'm going to add. And let's say I'm adding central time in the United States, just as an example. Now, when I run this, I can say I'll just add my initials for brevity and then I'm going to add fourteen hundred. And now it gives me another error. What's happening? Well, I did say I wanted the hours to be zero through twenty three. All right. So let's do 14. Well, first, JB, then the hour is 14. And this is good afternoon. The demo is at 14. So we could make this more realistic.
11:26Let's do that again. First, I'm going to add my name and I'm going to say, well, good afternoon, Jonathan Barrio. So now we've created logic. But no matter how many times I run this, I'm going to get the same answer because it's deterministic.
Software 2.0
0:01In this video, we'll build a small classifier. We'll train it, not necessarily teach it, because it learns on its own. And it creates rules on its own, from the data, and we call these weights. The deep learning models use weights, which are rules, to create the behavior. So we train it, and that creates these weights. But you can also fine-tune it, which means creating a specialized function. And by the end, you'll have a good idea of how it works. And more importantly, in software 2.0, we don't write if-else statements or loops by hand.
0:36Instead, we collect examples. And then we'll click train, and let the system discover the patterns for us. And we'll use Google's teachable machine to do just that. And we'll create these samples using our webcam. And you can use your hand, and form a 1 with your hand, or a 2. And then you'll label them as 1 and 2. But I'm going to use the hamburger and hot dog. But you could really use any two objects that you like. And the takeaway is that software 2.0 learns from these examples.
1:08It learns from the data. The weights change during training. Again, we don't really see that. That's just giving you a little bit of insight as to what happens inside of these models. All right, so here is teachable machine. You can create a deep learning model by using audio or images or video. In this case, all three. So let's click on get started. And we're going to choose an image project. But you could also do audio or poses.
1:38If you're doing audio, we first convert the audio to an image. So really, it's also an image project. And poses are just a series of images. So that's the secret behind these models. So the simplest one is this image project. Let's just grab that. We're going to use this standard image model. And now we have two classes. Meaning hot dog and hamburger. And to create this model, all we have to do is use our webcam. And I'm going to crop mine. So I'm going to just create this little area. I clicked on this to crop it.
2:09And I can say done cropping. And now I'm going to use the hot dog. I'll use this hand to better control it. I'll move back here. There we go. And maybe let's get, I said 20 to 25. Let's do 100. 101 is fine. Now let's do the same for hamburger. I'm also going to crop this in the same fashion. Put it over here in the corner. And now I'm going to create 101 samples of hamburger this time. Okay. I have too many. So I'm going to delete these. Perfect. Now we have 101 of each.
2:39Now something important to note. If I had 10 here, 10 images of hot dogs and 100 of hamburger. It would be biased to predict hamburger over hot dog. And that's how models work. So we need to avoid bias to create fairness. Whenever we're working with chat GPT, it also has bias. So that is something that goes into these models. Now let's go ahead and train it. What happens here is that it does it a bunch of times. And when it's done, we can preview it.
3:09So I'm going to click on crop here. And do the same thing. Put this over here to the side. Click on crop again. And now it's saying hamburger. It doesn't know what it's talking about, but let's get the hot dog involved. And boom, it knows it's a hot dog. So it's correctly predicting a hot dog because we have 100 labeled images of hot dogs. We didn't write any code, but look at it. It knows. However, if we do hamburger, it's like, oh yeah, that's a hamburger. But so is the background. Let's fix that. If I jump in here, it thinks I'm a hot dog, right?
3:41So that's called a hallucination. It's like, oh yeah, that's definitely a hot dog. Nope. It thinks I'm a hot dog. Depending on how much my face I put in here, if I go like this, it thinks I'm definitely a hot dog. So it's hallucinating. Super confident. Super wrong. So let's create a background class. Or we could say waiting. That's a better way to do it. Let me show you how to do this. You go to webcam. I'm going to get out of the way again and just put this over here like that. Done cropping. And I'm going to hold to record and try to get 101. Okay. I'm going to delete one.
4:11And now we're at 101. Now I'm going to retrain the model. So I'm not updating the code. I'm just retraining the model so that it can learn from this data. So when it sees nothing, it's waiting to see an image of either a hot dog or a hamburger. Now it sees a hamburger, even with the backside or the front. It knows that it's a hamburger. Same thing with the hot dog. 100% hot dog. But if I put my hand in here, it thinks it's a hot dog. If I do one, two, it's really confused.
4:41So the takeaway here is that the classifier just does hot dogs and hamburgers. And it does so with a high degree of accuracy. And really what it's doing is learning on its own. It learns from the data. And one important thing to note, we kept the samples the same size to avoid bias. We also moved them to different positions so it can train on all the different patterns. But most importantly, I did not add my face in the training data. Because that face image would end up in a model somewhere.
5:12And that's considered personally identifiable information. So your face, your address, social security numbers, driver's license images, and so forth. These are all considered PII. And there's also intellectual property and other sensitive information. You definitely don't want to add that to the model. And on that note, I will see you in the next video on Software 3.0.
Software 3.0
0:00Welcome back. In this video, we're going to talk about generative AI, which is software 3.0. Both machine learning and deep learning are considered software 2.0 and traditional programming, we can call it coding, is software 1.0. So 1.0, 2.0, and now 3.0. And really, this is the world of vibe coding. We're not writing code or training models. We're programming with plain language. So you can call these prompts as plain language programming.
0:36A prompt is like a little program that you run in real time. What you're doing is you're giving the model instructions in plain English on what to do, who to be, and what a good output should look like. Prompts don't retrain the model. They don't change its internal weights like we did in software 2.0 when we added the background and retrained it. Instead, in software 3.0, we condition the model in the moment. We're steering it and shaping its short term behavior by focusing the attention and probabilities inside of the current model. That's why prompting feels conversational, but it's actually a new kind of programming. So prompts are runtime instructions and not necessarily code, though they do kind of behave in a similar way. They 're not changing the way they condition or steer the behavior with the context of that prompt.
1:34And they do that with the constraints and examples. We'll use facts and excerpts to teach the style and format again with plain language. And the goal is shorter, steadier, and paste ready outputs instead of trying time and time again. The goal is to get it on the first try. And in the next video, we're going to talk about prompt engineering, and we're going to use something called CRE, which is context role expectation. And we'll talk about something called shots. A shot is an example.
2:06So sometimes we can give it no examples. That's zero shot. One shot is one example. And few shot is two examples. All right. So here we are in chat GPT. And we could ask a question. Summarize the key points of a famous novel. That's called the naive prompt, not only because it's very simple, but also I didn't even tell it what novel. So let's just pick the mockingbird because it's trying to help us like, wow, you really are very vague. Okay. So here is a summary of to kill a mockingbird. And it just does it however it wants to do it. And that's fine. If you don't care, but you can use context role and expectation to get exactly what you want.
2:48These aren't necessarily variables like we had here for name and hour, but they do kind of look similar in the sense that we can add the definition of context here, the role we wanted to be. So you are a creative copywriter who understands, and then you can add something specific here, some sort of a specific domain, maybe. And in a context, you could say you're helping me write a copy for a website and expectation, write three short taglines under 10 words each that feel modern and emotional, and it would give you that output much closer than if you just said, summarize this. To review, software 1.0, we're coding or programming, and those are the rules. With software 2.0, the model learns from data on its own. We just click on train, and then it learns from the data.
3:42And for software 3.0, we steer models using prompting. And really, that's the essence of vibe coding, because we can vibe code using prompts or prompt engineering. And instead of getting text, we can get code. Let me show you. Okay, I've never done this before. Let 's try it. Give me Python code to run a simple game. I didn't say in Google Colab, but I think it might understand. Let's see what we get. And let's see if this even works. I've never played a game inside a Google Colab that wasn't just a text game. Okay, so it's a text game. Fine. Fair enough. I've created these. But look at this, that's kind of different. Wow. Okay, so this is vibe coding. We're really just jumping right into it. This is quite a bit of code. And it's not super easy, but it's not super hard. So let me copy this and go over here and let me create a new notebook. And I'm going to paste this. So everything that you don't understand here, you should definitely try to learn what it is. If you see the if and then another if and then a bunch of ellipse and then an else, we learned that today. So there are these things called functions that we haven't talked about. So if you don't know what those are, learn, and these are all different kinds of variables and then printing
4:58which we did. Here's a while loop. That's the only thing we haven't talked about. But other than that, we're just using functions while loops, if and else, and then this little block of code down here, you could learn what all of this means. Let's go ahead and play it. Okay, that looks awesome. I'm not sure what this means. I mean, grab it and ask, what does this mean? All right, I don't think that says guess the number, it spells out the game, the game's name, guess the number, maybe it's a different language. I'm not sure. Okay, so it's not able to do that. So this is a great example of hallucination. Anyway, let's get back to the game. I'm going to enter 123 or 4 for the let's do difficulty insane. Enter an integer that just means a number.
5:42So one out of 12, let's do one cold. Let's do 12 warmer. What's the range? Oh, one through 1000. Okay, 100. Let me do 500. Okay, 100, 350, 300, 350, 325, 350, 355, 353, 354. Okay, so something is quite wrong with this game. It was something go up and down, but it was like not even close. Okay, let's not play this a game. But that's vibe coding. And as you can tell, it was totally wrong.
6:16The game logic is wrong. So it needs a little bit of improvement. So this is vibe coding. And the takeaway is that we're going to learn techniques on how to create really good games right from the beginning. And we're going to test the games using code to make sure that the parts that we don't understand actually work. And they're not going to do things that we don't expect. And because Python programming can be very complicated, we're going to use much simpler languages, HTML, CSS, JavaScript, keep it super simple. And that way we can create a simple website. All right, until next time, I hope this has been informative. I'd like to thank you for you.
Frequently asked questions
What does the Explore the AI Behind Vibe Coding Tools lesson cover?
The lesson explains AI as an umbrella of technologies that learn patterns from data, not a single tool like ChatGPT, and uses Karpathy's software 1.0, 2.0, and 3.0 framework as a mental model. Learners try each type hands-on: hand-written if-then rules in Python, a no-code image classifier in Teachable Machine, and structured prompting in ChatGPT.
Does a team member need programming experience before taking this vibe coding lesson?
No. The trainer states that no programming background is needed and that beginners are welcome. The software 1.0 demo uses Python because its syntax reads close to plain English, and the neural network is built with a no-code tool.
How long is this lesson and where does it fit in the AI Vibe Coding and Security course?
The lesson runs about 1 hour and is the first of six skills in a course of roughly 6 hours, 21 minutes per learner. It covers AI and prompt engineering, giving learners the mental model the later skills build on as they move through CodePen, ChatGPT, Cursor, test-driven development, and GitHub Pages deployment.
What data should be kept out of AI model training data?
The lesson identifies personally identifiable information such as faces, addresses, social security numbers, and driver's license images, along with intellectual property and other sensitive information, as data that should not go into a model. It also shows how balanced, varied training samples help reduce bias.
What is the difference between a naive prompt and zero-shot, one-shot, and few-shot prompts?
A naive prompt tells the model very little and leaves it to guess. In the lesson, a shot is an example: zero-shot gives no examples, one-shot gives one, and few-shot gives two. These prompts add constraints and examples, so the output is shorter, steadier, and ready to paste on the first try.
How can an IT Director or Training Manager roll this lesson out to a team?
The lesson gives the team a shared mental model of how AI works and why it can be confident and wrong at the same time, which supports consistent and reviewable AI-assisted coding. Training Managers can use CBT Nuggets Playlists to sequence the course for an onboarding sprint or pilot group. Team Reporting then tracks per-learner progress and completion across the assigned cohorts.
Team training path
Turn this skill into assignable team training
This free skill is a preview of the courses your team can assign, track, and report on with CBT Nuggets.
Free training library
More free lessons in AI
AI
Explore AI & Prompt Engineering Fundamentals
Free lesson from AI Prompt Engineering with ChatGPT, Gemini, and Claude · 47m
AI
Explore AI Programmatically
Free lesson from AI Agentic Coding: ChatGPT, Cursor, Claude, and Copilot · 49m
AI
Explore AI and Its Different Types
Free lesson from AI Essentials with Microsoft Copilot · 53m
AI
Harness AI Principles Beyond Generative AI
Free lesson from AI Essentials for Executives & Leaders · 46m
AI
Identify the Main Types of AI
Free lesson from AI Productivity for Professionals · 54m
AI
Explore AI Literacy for IT, HR, and Legal Teams
Free lesson from AI Compliance, Privacy & Copyright: HR, Legal, IT · 48m
$59
seat / mo, billed annually
