Lesson 2 / الدرس 2

Why software breaks / لماذا تنكسر البرمجيات

Bugs are not random misfortune. They cluster in a small number of predictable places, and knowing where those places are is most of what separates a fast tester from a thorough one.

الأخطاء ليست سوء حظ عشوائيًا. بل تتجمّع في مواضع قليلة يمكن توقّعها، ومعرفة تلك المواضع هي معظم ما يفصل المختبِر السريع عن المختبِر الدقيق.

A developer writing a feature holds one story in their head: the thing the feature is for. The code they write handles that story well, because they were looking straight at it. Everything that breaks is something they were not looking at — and people are not looking at the same few things, over and over, in every project ever built.

The places bugs live

  1. Edges. Zero items, one item, the maximum, one past the maximum. The code was written for "some items" and never asked how many.
  2. Emptiness. A blank field, a user with no orders, a search that matches nothing. Empty is a real state and it is almost never the one that was drawn.
  3. Repetition. Pressing the button twice. Submitting while the first submit is still in flight. Refreshing halfway through.
  4. Other people. Two users editing the same thing, or an admin deleting what someone else has open.
  5. The unhappy path. The network drops, the file is too big, the password is wrong. Failure handling is written last and tested least.
  6. Anything recently changed. A fix is new code, and new code is where new bugs are. The area around a change is the highest-yield ground on the whole product.

A bug is a disagreement, not a crash

Nothing here needs to crash to be a bug. If the page says "1 results", if a date reads 03/04 with no way to know which is the month, if an Arabic name comes out reversed — the software ran perfectly and still did the wrong thing. A bug is a gap between what was promised and what happened, and the promise is often unwritten.

<p>Showing 1 results for &quot;test&quot;</p>
<p>Delivery on 03/04</p>
<ul></ul>
<p>You have 0 new messages.</p>
Four lines, no crash, and at least three arguable bugs. "1 results" is wrong grammar. 03/04 is ambiguous between two continents. The empty list shows nothing at all where it should say why it is empty. Run it and look at it as a stranger would.

Try it live / جرّب بنفسك

Preview / المعاينة

Check yourself / اختبر نفسك

1. Which area of a product is usually the highest-yield place to test?

2. A page displays "Showing 1 results". Nothing crashes. Is this a bug?

3. Why is "no real user would do that" a risky reason to skip a test?

Your task / مهمتك

Take any page on this site and hunt one of the six places above. Build a short page reporting what you looked at, which of the six it was, and what you found — including "nothing", if that is the truth.

خذ أي صفحة في هذا الموقع وفتّش في واحد من المواضع الستة أعلاه. وابنِ صفحة قصيرة تبلّغ فيها بما نظرت فيه، وأيّ المواضع الستة كان، وماذا وجدت — بما في ذلك «لا شيء» إن كان ذلك هو الصدق.

  • Names the page you looked at and which of the six places you hunted تذكر الصفحة التي نظرت فيها وأيّ المواضع الستة فتّشت
  • Says what you actually did, step by step, not just what you concluded تذكر ما فعلته فعلًا، خطوة خطوة، لا ما استنتجته فقط
  • States the result plainly, even when the result is that you found nothing تذكر النتيجة بوضوح، حتى لو كانت أنك لم تجد شيئًا
How do you want to submit? / كيف تريد التسليم؟