Programming & Artificial Intelligence

How does a computer think —
and how does a programmer think?

Your very first session. No experience needed.

أول حصة ليك. مش محتاج أي خبرة سابقة — ولا رياضيات، ولا جهاز قوي. الموبايل كفاية.

Start here

A computer is a dumb machine.

It does exactly what you tell it. Nothing more.

الكمبيوتر جهاز "غبي" — بينفذ اللي بتقوله له حرفيًا، ولا حاجة زيادة. وده مش عيب فيه، ده بالظبط اللي بيخلي البرمجة ممكنة.

1 · How a computer works

Every task has three stages

1

Input

What you give the machine

You press 3 + 5
→
2

Processing

The work inside, where you can't see it

It adds the two numbers
→
3

Output

What it gives back to you

The screen shows 8

المدخلات: اللي انت بتديه للجهاز. المعالجة: الشغل اللي بيحصل جواه ومش شايفه. المخرجات: اللي بيرجعهولك.

1 · Same pattern, everywhere

You already use this every day

ThingInputProcessingOutput
ATM machineCard and amountChecks your balanceCash comes out
Logging inUsername and passwordChecks if they matchAccount opens
MicrowaveYou set 2 minutesCounts down and heatsBeeps — food is hot
Delivery appYou pick your orderFinds a driver near youFood arrives

نفس المراحل الثلاث موجودة في أي حاجة بتستخدمها يوميًا — من الصراف الآلي للمايكروويف لتطبيق الطلبات.

2 · The big difference

Programming or AI?

You want a program that knows if a photo has a cat in it.

Programming

  • You write the rule
  • "If it has pointed ears and whiskers, say cat"
  • Follows your rule exactly, every time
  • Wrong only if your rule was wrong

Artificial Intelligence

  • The computer works out the rule
  • You give it thousands of photos marked cat / not cat
  • Makes its best guess on a new photo
  • Can be wrong — it is guessing

في البرمجة انت اللي بتكتب القاعدة بنفسك. في الذكاء الاصطناعي الكمبيوتر بيستنتج القاعدة من آلاف الأمثلة — وعشان كده ممكن يغلط.

2 · Another way to see it

Recipe vs. watching your mum cook

Programming = a recipe

  • Every step written down, in order
  • Follow it exactly and you get the same dish
  • Miss a step and it fails

AI = learning by watching

  • Nobody wrote the steps for you
  • You watched it done 100 times
  • You cook by feel — sometimes it's off

البرمجة زي وصفة أكل مكتوبة خطوة بخطوة. الذكاء الاصطناعي زي إنك اتعلمت الطبخ بالمشاهدة من غير وصفة — بتطلع حلوة غالبًا، بس ساعات بتغلط.

3 · Two words people mix up

Language vs. code

Programming language

  • The language itself
  • Like English or Arabic
  • Python, JavaScript, C++

Source code

  • An actual sentence written in it
  • The text you type
  • print("hello")

لغة البرمجة زي اللغة العربية نفسها. الكود المصدري زي جملة مكتوبة بالعربي. بايثون هي اللغة، و print("hello") هي الكود.

4 · A programmer's tools

Think of a kitchen

A computer only understands zeros and ones — so we need tools in between.

🔪
The counter

Text editor

Where you write the code. It cannot run it.

🔥
The oven

Compiler

Turns your code into zeros and ones so it can actually run.

🏠
The whole kitchen

IDE

Counter + oven + everything else, in one place.

محرر النصوص هو الطاولة اللي بتجهز عليها. المترجم هو الفرن اللي بيطبخ فعلاً. والـIDE هو المطبخ بالكامل. يعني الـIDE مش أداة رابعة — هو الأدوات دي كلها مجمّعة مع بعض.

4 · Follow one example

You want to print your name

ToolWhat it doesIn this example
Text editor Lets you type and save. Cannot run it. You type print("Eissa") and save
Compiler Translates it into zeros and ones Turns your line into something the processor reads
IDE Editor + compiler + error finder, together You press one button and see Eissa appear

نفس السطر الواحد، شوف كل أداة بتعمل فيه إيه: المحرر بيكتبه ويحفظه، المترجم بيحوّله للغة الآلة، والـIDE بيعمل ده كله بضغطة زرار.

5 · How a programmer thinks

It is not about typing fast

HabitWhat it looks like
Break it downCut one big problem into small easy pieces
Try another wayWhen it doesn't work, look for a different route
Keep searchingNobody memorises everything. Everyone looks things up
Be patientOne missing semicolon can stop the whole program

اللي بيفرّق مش سرعة الكتابة — أربع عادات: تقسيم المشكلة، تجربة طرق تانية، البحث المستمر، والصبر على التفاصيل الصغيرة.

6 · Where this can take you

Seven doors this opens

Web Development مواقع
Mobile Apps تطبيقات
Artificial Intelligence ذكاء اصطناعي
Cybersecurity أمن سيبراني
Data Analysis تحليل بيانات
Game Development ألعاب
Networking شبكات

كل مجال من دول ليه طريقه الخاص — مش لازم تختار دلوقتي، بس اعرف إن الأبواب دي كلها مفتوحة قدامك.

Before you go

Test yourself — 10 questions

QR code linking to the Lecture 1 quiz

Scan with your phone camera. At the end it shows you which parts you understood and which parts to read again.

امسح الكود بكاميرا موبايلك. الاختبار هيوضحلك في الآخر انت فاهم إيه ومحتاج تراجع إيه.

← → or swipe