Module 1: How software actually works

What is code?

Lesson 1 of 5 About 10 min Free preview

Before you ask AI to write code, it helps to know what code actually is. Not how to write it, just what it is. Once this clicks, everything else in the course has somewhere to sit in your head.

Code is a recipe for a very literal cook

Think about the recipe for making chai.

Your mother might say: "Boil water, add patti, then milk and sugar, let it come up twice." That works because the person listening already knows a lot. They know how much patti. They know what "come up twice" means. They will not put the cup on the stove.

Now imagine a cook who knows nothing at all, but follows instructions perfectly and very fast. To make chai, you would need to say:

  1. Pour 150 ml of water into the pan.
  2. Turn the stove to high.
  3. Wait until the water bubbles.
  4. Add one teaspoon of tea leaves.
  5. Wait two minutes.
  6. Add 100 ml of milk and two teaspoons of sugar.
  7. When it rises to the top of the pan, turn the stove to low.
  8. Repeat step 7 one more time.
  9. Turn the stove off. Pour through a strainer into the cup.

That cook is a computer. Those instructions are code.

A computer does exactly what you say. Not what you meant. If you forget to say "turn the stove off", it never turns it off. If you write "add 1000 teaspoons of sugar" by mistake, it adds 1000 teaspoons without a question.

Code is a set of instructions, written precisely enough that a computer can follow them without guessing.

Why computers need special languages

You cannot write code in plain English, at least not directly. English is full of guesses. "Add a little sugar" could mean anything.

So people invented programming languages: ways of writing instructions with strict rules, so every instruction has exactly one meaning. Each language has its own words and its own grammar, called syntax.

There are hundreds of programming languages. In this course you only meet three, all used to build websites:

Language What it does Chai comparison
HTML The content and structure of a page: headings, paragraphs, buttons, images. What is on the tray: cup, saucer, biscuits.
CSS How the page looks: colours, sizes, spacing, fonts. How the tray is arranged and decorated.
JavaScript What the page does: reacts to clicks, calculates, saves data. The person who notices your cup is empty and refills it.

HTML and CSS are technically not "programming" languages in the strict sense, because they describe things rather than give step-by-step instructions. You do not need to worry about that difference. Everyone calls them code.

What code looks like

You do not need to understand this yet. Just look at it.

HTML
<h1>Priya Sharma</h1>
<p>Second-year BCA student in Jammu.</p>

This is HTML. The first line says "show a big heading with the text Priya Sharma". The second says "show a paragraph". The bits in angle brackets, like <h1>, are called tags. They tell the browser what each piece of text is.

That is a real piece of code. Two lines. You will write pages like this, with AI's help, in Project 1.

Code lives in files

Code is just text. You can write it in any plain text editor, even Notepad.

What makes it code is:

  • The file name ending, called the extension. index.html tells the computer "this is HTML". app.js means JavaScript. style.css means CSS.
  • Something that reads it and follows it. For HTML, CSS and JavaScript on a web page, that is your browser: Chrome, Edge, Firefox or Safari.

When you open a website, your browser downloads some files full of code and follows the instructions in them to draw the page on your screen. That is all a website is: files of instructions, and a program that follows them.

"Running" code

You will hear "run the code" constantly. It just means: give the instructions to the computer and let it follow them.

  • For a web page, running it means opening the file in a browser.
  • For other programs, you might type a command, which you learn in the setup module.

Writing code without running it is like writing a recipe and never cooking it. You do not know if it works until you try. This will become very important when AI writes code for you.

Bugs

A bug is a mistake in the code that makes it do the wrong thing.

Some bugs stop the program completely. The browser shows a blank page, or you see an error message: the computer telling you, in its own way, what went wrong and where.

Other bugs are quieter. The program runs, but the total is wrong, or the button does nothing. These are harder to find, because nothing tells you about them. You only notice if you look.

Debugging means finding and fixing bugs. Every developer spends a lot of time doing it. AI helps a great deal, and module 4 teaches you how.

So where does AI come in?

Writing code by hand means remembering a lot of exact syntax. One missing bracket and the whole page breaks. This is where beginners used to get stuck for weeks.

AI coding tools can write that syntax for you. You describe what you want in plain English, and the AI writes the precise instructions.

But remember the literal cook. The AI translates your words into instructions. If your words are vague, it guesses. If it guesses wrong, the computer will follow those wrong instructions perfectly. That is why the two skills you build in this course are:

  1. Describing exactly what you want, so the AI guesses less.
  2. Understanding what it gave you, so you can catch the wrong guesses.

Neither needs you to memorise syntax. Both need you to know what code is and how it behaves. Which you now do.

Your task

  1. Pick something simple you do every day: making Maggi, booking an auto on an app, or recharging your phone.
  2. Write it as numbered instructions for a cook or a helper who knows nothing and guesses nothing. Aim for 8 to 12 steps.
  3. Read it back as if you were that helper. Find one place where they would get stuck or do something silly. Fix it.

That fixing step is debugging. You just did it.

Check yourself

Enjoying this? This is one of the free lessons. The full course has 78 lessons and three projects you publish yourself.

Get the full course for ₹499 Log in

Enrol in AI Coding Kickstart

₹499 one-time, lifetime access, free updates

Have a coupon?

Secure payment by Razorpay: UPI, cards, net banking and wallets. The policies open in a new tab: terms, privacy, refunds.