From Zero to Senior · The LabالعربيةGitHub

Chapter 18

Choosing Your Path

0 examples · 3 projects · 5 exercises

In this chapter you will

  • look back at everything you have learned
  • discover the four main paths in software development
  • find out what “junior”, “mid-level” and “senior” really mean
  • learn the habits that turn beginners into professionals
  • plan your next steps, your portfolio and your first job

Examples

Practice projects

Project 18.1 · Easy

A README that sells your project

Write the page a visitor sees first on GitHub, so that in thirty seconds they know what your app does, can try it, and can see what you learned.

You will practise: Markdown headings, lists, links and images, and writing for a busy reader.

Steps
  1. In your tasks app folder, create README.md. GitHub shows it automatically under your files.
  2. Start with the name and one sentence that says what it is and who it is for.
  3. Add the live link from GitHub Pages and a screenshot, saved in the same folder.
  4. List the features in short lines. Mention accessibility and both languages: they make you stand out.
  5. End with “What I learned”, in two or three honest sentences. Recruiters read this part.
  6. Commit, push, and look at your repository page on GitHub.

Hint: write it for someone who will never run your code. Most visitors only read the first screen, so put the link and the screenshot near the top.

Solution

My Tasks

A small, fast to-do list that works in any browser and remembers your tasks.

Live: https://sara-khan.github.io/my-tasks/

My Tasks on a phone and a laptop

Features

  • Add, tick off, edit and delete tasks
  • Filter: all, to do, done
  • Progress bar, and a count of what is left
  • English and Arabic, with right-to-left layout
  • Saved in the browser with localStorage
  • Works with the keyboard and screen readers

Built with

HTML, CSS and JavaScript. No frameworks, no build step.

Run it locally

  1. Download or clone this repository.
  2. Open index.html in your browser.

What I learned

How to plan a project before coding, keep the data separate from the display, and test a page with only the keyboard.

Project 18.2 · Medium

Your portfolio home page

Build one page that introduces you and links to your best three projects, and publish it as your personal site.

You will practise: everything from chapters 5 to 7 and 16: semantic HTML, Grid with auto-fit, Flexbox, custom properties, and the keyboard test.

Steps
  1. Header: your name in an h1, one line about what you do, and two links, one to contact you and one to your CV.
  2. “Selected work”: a grid of three cards with repeat(auto-fit, minmax(200px, 1fr)), so it becomes one column on a phone without a media query.
  3. Each card has a picture, a title, one sentence, and two links: the live app and its code on GitHub.
  4. “Skills”: a list of short tags. List only what you can show in a project.
  5. Run the checks from chapter 16: headings in order, every link has clear text, contrast passes, the keyboard reaches everything.
  6. Publish it in a repository named your-username.github.io, and it appears at that address.

Hint: three finished, polished projects beat ten half-done ones. The quiz from chapter 12 and the weather report from chapter 13 are good candidates to polish and add next to your tasks app.

Solution
portfolio.html↗ Open page⤓ File
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Sara Khan · Web developer</title>
    <style>
      *, *::before, *::after { box-sizing: border-box; }
      :root { --brand: #4338ca; --ink: #1e1b2e; --muted: #5b5873; --soft: #eef2ff; }
      body { margin: 0; font-family: system-ui, "Segoe UI", Tahoma, sans-serif; color: var(--ink); background: white; line-height: 1.5; }
      main { max-width: 760px; margin: 0 auto; padding: 32px 20px; }
      .hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
      .avatar { width: 96px; height: 96px; border-radius: 50%; background: linear-gradient(135deg, #4338ca, #db2777); color: white;
                display: grid; place-items: center; font-size: 2rem; font-weight: 700; }
      h1 { margin: 0; color: var(--brand); }
      .role { margin: 4px 0 12px; color: var(--muted); }
      .actions { display: flex; gap: 8px; flex-wrap: wrap; }
      .button { display: inline-block; padding: 8px 18px; border-radius: 999px; background: var(--brand); color: white; text-decoration: none; }
      .button.secondary { background: var(--soft); color: var(--brand); }
      h2 { margin-top: 36px; }
      .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
      .project { border: 1px solid #e0e0ee; border-radius: 16px; overflow: hidden; }
      .project h3, .project p { margin: 8px 14px; }
      .project p { color: var(--muted); font-size: 0.95rem; }
      .thumb { height: 90px; background: var(--c); opacity: 0.85; }
      .links { display: flex; gap: 14px; }
      .links a { color: var(--brand); font-weight: 700; }
      .skills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
      .skills li { background: var(--soft); color: var(--brand); padding: 4px 12px; border-radius: 999px; }
      :focus-visible { outline: 3px solid #db2777; outline-offset: 2px; }
    </style>
  </head>
  <body>
    <main>
      <header class="hero">
        <div class="avatar" aria-hidden="true">S</div>
        <div>
          <h1>Sara Khan</h1>
          <p class="role">Junior web developer in Alexandria. I build small, accessible web apps.</p>
          <p class="actions">
            <a class="button" href="mailto:sara@example.com">Say hello</a>
            <a class="button secondary" href="cv.pdf">Download my CV</a>
          </p>
        </div>
      </header>

      <h2>Selected work</h2>
      <div class="grid">
        <article class="project">
          <div class="thumb" style="--c: #4338ca" aria-hidden="true"></div>
          <h3>My Tasks</h3>
          <p>A to-do app with filters, progress and two languages.</p>
          <p class="links"><a href="#">Live</a> <a href="#">Code</a></p>
        </article>
        <article class="project">
          <div class="thumb" style="--c: #db2777" aria-hidden="true"></div>
          <h3>Bit’s Quiz</h3>
          <p>A quiz that builds itself from data.</p>
          <p class="links"><a href="#">Live</a> <a href="#">Code</a></p>
        </article>
        <article class="project">
          <div class="thumb" style="--c: #059669" aria-hidden="true"></div>
          <h3>Weather Report</h3>
          <p>Loads data with fetch and survives errors.</p>
          <p class="links"><a href="#">Live</a> <a href="#">Code</a></p>
        </article>
      </div>

      <h2>Skills</h2>
      <ul class="skills">
        <li>HTML</li>
        <li>CSS</li>
        <li>JavaScript</li>
        <li>Git & GitHub</li>
        <li>Accessibility</li>
        <li>Responsive design</li>
      </ul>
    </main>
  </body>
</html>
portfolio.html380px
…and on a phone.

Project 18.3 · Challenge

Your own app, from idea to launch

Choose a small problem from your own life, plan an app that solves it, and publish version 1 in about a week, alone.

You will practise: the whole method from chapter 17, deciding what to leave out, and finishing.

Steps
  1. Write one sentence for the problem and one for who has it. If you cannot, choose another idea.
  2. Split the features into “must have” and “nice to have”. Version 1 gets only the first list, three or four items at most.
  3. Sketch the screens on paper, and write the data as one JavaScript object.
  4. Break the work into daily milestones, each one ending with something that works and a commit.
  5. Build it in the order from chapter 17: HTML, then CSS, then JavaScript, then the tests.
  6. Publish it, write its README, add it to your portfolio, and send the link to one person who will use it. Their first question is your next feature.

Hint: the hardest part of a real project is not the code; it is saying “not now” to good ideas so that you finish. Every professional product you use started as a small version 1.

Solution

Plan: Water Buddy

The problem

I forget to drink water when I study.

Who it is for

Students who sit at a desk for hours.

Must have (version 1)

  • Set a daily goal in glasses
  • One big button: "I drank a glass"
  • Progress bar for today, reset every new day
  • Saved in localStorage

Nice to have (later)

  • A reminder every hour
  • A weekly chart
  • Arabic and English

Screens

  1. Today: goal, progress, the big button
  2. Settings: change the goal

Data

{ goal: 8, today: "2026-05-01", glasses: 3 }

Milestones

  • Day 1: HTML and CSS, mobile first
  • Day 2: the button and the progress bar
  • Day 3: save, load, reset on a new day
  • Day 4: keyboard test, contrast, README
  • Day 5: publish on GitHub Pages, share the link
+ 1 files
screenshot.png⤓ File

Exercises

Exercise 18.1 · Easy

Write down which path you will take next, and why, in three sentences.
Show the solution

My next path

I will take the Frontend track next, with Vue. I enjoyed Chapters 12 and 17 most, when the page answered back the moment I clicked, and I want to build interfaces that people use every day. Most junior job adverts in my area ask for a frontend framework, so this path also gets me closest to a first job.

Your three sentences: which path (Frontend, Backend or Flutter), what you enjoyed in this book that points there, and one practical reason (a job, a project, a person you want to build for).

Exercise 18.2 · Easy

Write a README for your tasks app with a screenshot, a live link and a list of features.
Show the solution

My Tasks

A small, fast to-do list that keeps your tasks in your browser. No account, no server, works offline.

Live: https://books.smszs.tech/b1/en/ch17/examples/index.html

The app with three tasks, one of them done

Features

  • Add a task with Enter or the Add button
  • Tick a task to mark it done, and untick it to bring it back
  • Show all tasks, only the ones to do, or only the done ones
  • See how many tasks are left, and clear the done ones in one click
  • Your tasks are still there after you close the browser (localStorage)
  • Works with the keyboard and screen readers; checked with Lighthouse

Run it yourself

Download the repository and open index.html in any browser. There is nothing to install.

Built with

HTML, CSS (Flexbox and custom properties) and JavaScript, as the final project of Code from Zero.

screenshot.png⤓ File

Exercise 18.3 · Medium

Find three job adverts for junior developers in the city or country where you want to work. List the skills they ask for, and mark the ones you already have.
Show the solution
skills.js⤓ File
// Which skills do junior job adverts ask for, and which do you already have?
// Replace the three adverts with the ones you found, and set have: true for what you can already do.
// (These three are examples of what such adverts typically contain, not real adverts.)
const adverts = [
  { title: "Junior Frontend Developer", skills: ["HTML", "CSS", "JavaScript", "Git", "Vue", "REST APIs"] },
  { title: "Junior Web Developer", skills: ["HTML", "CSS", "JavaScript", "Git", "PHP", "Laravel", "SQL"] },
  { title: "Junior Flutter Developer", skills: ["Dart", "Flutter", "Git", "REST APIs", "English"] },
];

const have = new Set(["HTML", "CSS", "JavaScript", "Git", "English"]);

// How often is each skill asked for?
const counts = {};
for (const advert of adverts) {
  for (const skill of advert.skills) {
    counts[skill] = (counts[skill] ?? 0) + 1;
  }
}

const rows = Object.entries(counts)
  .sort((a, b) => b[1] - a[1])
  .map(([skill, times]) => `${have.has(skill) ? "✓" : "·"} ${skill} (${times}/${adverts.length})`);
console.log(rows.join("\n"));

console.log("");
for (const advert of adverts) {
  const got = advert.skills.filter((s) => have.has(s)).length;
  console.log(`${advert.title}: ${got}/${advert.skills.length} (${Math.round((got / advert.skills.length) * 100)}%)`);
}

const missing = Object.keys(counts).filter((s) => !have.has(s) && counts[s] > 1);
console.log(`\nLearn next (asked for more than once): ${missing.join(", ")}`);
Recorded output$ node skills.js
✓ Git (3/3)
✓ HTML (2/3)
✓ CSS (2/3)
✓ JavaScript (2/3)
· REST APIs (2/3)
· Vue (1/3)
· PHP (1/3)
· Laravel (1/3)
· SQL (1/3)
· Dart (1/3)
· Flutter (1/3)
✓ English (1/3)

Junior Frontend Developer: 4/6 (67%)
Junior Web Developer: 4/7 (57%)
Junior Flutter Developer: 2/5 (40%)

Learn next (asked for more than once): REST APIs

Exercise 18.4 · Medium

Find a small open-source project on GitHub that uses HTML, CSS and JavaScript. Read its code and write down three things you learned.
Show the solution

Reading a small open-source project

1. Find one

On GitHub, search with these filters (paste them into the search box):

language:JavaScript topic:vanilla-javascript stars:20..300
topic:todo-app language:JavaScript stars:10..200
"no dependencies" language:HTML stars:20..500

Pick one that is small enough to read in an evening: fewer than 10 files, no build step, and a README with a live demo.

2. Read it in this order

  1. The README: what does it do?
  2. index.html: which elements, which ids and classes?
  3. The JavaScript: find the data first (arrays, objects, localStorage), then the functions that change it, then the events.
  4. The CSS last: look for Flexbox, Grid, custom properties and media queries.

3. Write down three things you learned

# What I saw Where (file, line) What I will do with it
1
2
3

Examples of the kind of thing worth writing down: a function name that explains itself, a clever use of dataset, a CSS variable for every colour, a <template> element used to create list items, a commit history that tells a story.

Exercise 18.5 · Challenge

Plan, build and publish a new app of your own idea, using the method from Chapter 17. Then send the link to someone who has never seen your work.
Show the solution

Plan: a habit tracker

Following the method of Chapter 17: the idea in one sentence, the data, the screens, then the steps, smallest first.

Idea: tick the habits you kept today, and see your streak for each one.

Data:

{ id: 1717171717, name: "Read 10 pages", days: ["2026-12-01", "2026-11-30"] }

Each habit keeps the dates it was done on, so the streak can be worked out at any time and nothing has to be updated at midnight.

Steps:

  1. HTML: a form to add a habit, and an empty list.
  2. Add habits to an array and draw the list from it.
  3. A "done today" checkbox that adds or removes today's date.
  4. Work out the streak: count back day by day from today while the date is in days.
  5. Save to localStorage; delete a habit.
  6. CSS, keyboard check, Lighthouse, then publish and send the link to someone new.
index.html↗ Open page⤓ File
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Habits</title>
    <link rel="stylesheet" href="style.css">
  </head>
  <body>
    <main class="app">
      <h1>Habits</h1>
      <p class="subtitle" id="today"></p>

      <form id="new-habit">
        <label for="habit-name" class="visually-hidden">New habit</label>
        <input id="habit-name" type="text" placeholder="e.g. Read 10 pages" required>
        <button class="primary" type="submit">Add</button>
      </form>

      <ul id="habits"></ul>
      <p class="empty" id="empty">No habits yet. Start with one small thing.</p>
      <p id="summary" aria-live="polite"></p>
    </main>
    <script src="app.js"></script>
  </body>
</html>
index.html640px
app.js⤓ File
// ---------- Data ----------
const STORAGE_KEY = "habits";
let habits = load();

function load() {
  const saved = localStorage.getItem(STORAGE_KEY);
  return saved ? JSON.parse(saved) : [];
}

function save() {
  localStorage.setItem(STORAGE_KEY, JSON.stringify(habits));
}

// A date as "2026-12-01", in the reader's own time zone.
function dayKey(date) {
  const y = date.getFullYear();
  const m = String(date.getMonth() + 1).padStart(2, "0");
  const d = String(date.getDate()).padStart(2, "0");
  return `${y}-${m}-${d}`;
}

const today = dayKey(new Date());

// How many days in a row, counting back from today (or from yesterday, if today is not done yet).
function streak(habit) {
  const day = new Date();
  if (!habit.days.includes(dayKey(day))) day.setDate(day.getDate() - 1);
  let count = 0;
  while (habit.days.includes(dayKey(day))) {
    count++;
    day.setDate(day.getDate() - 1);
  }
  return count;
}

// ---------- Changes ----------
function addHabit(name) {
  habits.push({ id: Date.now(), name, days: [] });
  update();
}

function toggleToday(id) {
  const habit = habits.find((h) => h.id === id);
  habit.days = habit.days.includes(today) ? habit.days.filter((d) => d !== today) : [...habit.days, today];
  update();
}

function deleteHabit(id) {
  habits = habits.filter((h) => h.id !== id);
  update();
}

function update() {
  save();
  render();
}

// ---------- Display ----------
function daysText(n) {
  if (n === 1) return "1 day";
  return `${n} days`;
}

function habitItem(habit) {
  const li = document.createElement("li");
  const done = habit.days.includes(today);
  li.classList.toggle("done", done);

  const box = document.createElement("input");
  box.type = "checkbox";
  box.id = `habit-${habit.id}`;
  box.checked = done;
  box.addEventListener("change", () => toggleToday(habit.id));

  const label = document.createElement("label");
  label.htmlFor = box.id;
  label.textContent = habit.name;

  const fire = document.createElement("span");
  fire.className = "streak";
  const n = streak(habit);
  fire.textContent = n > 0 ? `🔥 ${daysText(n)}` : "";

  const remove = document.createElement("button");
  remove.type = "button";
  remove.className = "delete";
  remove.textContent = "Delete";
  remove.setAttribute("aria-label", `Delete: ${habit.name}`);
  remove.addEventListener("click", () => deleteHabit(habit.id));

  li.append(box, label, fire, remove);
  return li;
}

function render() {
  document.querySelector("#habits").replaceChildren(...habits.map(habitItem));
  document.querySelector("#empty").hidden = habits.length > 0;
  const done = habits.filter((h) => h.days.includes(today)).length;
  document.querySelector("#summary").textContent =
    habits.length === 0 ? "" : `Today: ${done} / ${habits.length}`;
}

// ---------- Events ----------
document.querySelector("#today").textContent = new Date().toLocaleDateString("en-GB", {
  weekday: "long", day: "numeric", month: "long",
});

document.querySelector("#new-habit").addEventListener("submit", (event) => {
  event.preventDefault();
  const input = document.querySelector("#habit-name");
  const name = input.value.trim();
  if (name) {
    addHabit(name);
    input.value = "";
  }
  input.focus();
});

render();
style.css⤓ File
*, *::before, *::after { box-sizing: border-box; }

:root {
  --brand: #15803d;
  --accent: #ea580c;
  --ink: #1c1917;
  --muted: #57534e;
  --soft: #f0fdf4;
}

body { margin: 0; font-family: system-ui, "Segoe UI", Tahoma, sans-serif; color: var(--ink); background: var(--soft); }
.app { max-width: 520px; margin: 32px auto; padding: 24px; background: white; border-radius: 20px; box-shadow: 0 4px 20px rgba(28, 25, 23, 0.1); }
h1 { margin: 0; color: var(--brand); }
.subtitle { margin: 4px 0 20px; color: var(--muted); }
form { display: flex; gap: 8px; margin-bottom: 12px; }
form input { flex: 1; padding: 10px 14px; font: inherit; border: 2px solid #d6d3d1; border-radius: 12px; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 999px; }
.primary { padding: 10px 20px; color: white; background: var(--brand); }
ul { list-style: none; padding: 0; margin: 0; }
li { display: flex; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--soft); }
li label { flex: 1; }
li.done label { color: var(--brand); font-weight: 700; }
li input { width: 22px; height: 22px; accent-color: var(--brand); }
.streak { color: var(--accent); font-weight: 700; font-size: 0.9rem; }
.delete { padding: 4px 12px; color: #b91c1c; background: #fef2f2; }
.empty { color: var(--muted); text-align: center; padding: 24px 0; }
#summary { text-align: center; color: var(--muted); font-weight: 700; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }