Skip to content

Add interview practice deck - #44

Merged
gpbsumido merged 6 commits into
ps/ng-12-ssrfrom
ps/ng-13-interview
Nov 21, 2026
Merged

gpbsumido merged 6 commits into
ps/ng-12-ssrfrom
ps/ng-13-interview

Conversation

@gpbsumido

@gpbsumido gpbsumido commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Thirteenth and last lesson in my Angular guide: interview prep. The feature slice is a practice deck that drills every interview question in the guide.

What shipped

An interview practice deck (lessons/interview-practice.ts). All 78 questions from the guide, one at a time:

  • The answer stays hidden until "Show answer", a real button with aria-expanded and aria-controls.
  • "Got it" takes the card out; "Ask again" sends it to the back. A role="status" line reads "78 left, 0 known".
  • A labelled topic filter narrows the deck to one lesson. When the deck is done, "Start over" resets it.
  • All three buttons stay rendered between cards, so the one just pressed keeps focus.
  • The deck is a linkedSignal over the filtered cards: changing the topic resets it, and in between it's ordinary writable state.

One bank for every lesson's questions (lessons/interview-bank.ts). They lived inside each lesson component, so the deck could only have reached them by importing all twelve lesson pages into one chunk. Each lesson now reads its own entry. interview-bank.spec.ts checks:

  • the bank's keys match the lessons that exist
  • every lesson has at least five questions
  • no question repeats (the lists and the deck both track by question text)
  • every lesson page renders exactly its own questions from the bank

Cost: the bank is about 32 kB raw, 12 kB gzipped. It loads with the first lesson opened and is cached after that, while each lesson's own chunk shrank 1.4–2.6 kB. Splitting it per lesson would avoid that, at the price of 13 small data files; I went with one file and the number.

Lesson 13: interview prep (/thoughts/angular-13-interview).

  • A component written NgModule-style (*ngIf, @Input, constructor injection, takeUntil) next to the same component today.
  • The migration schematics, checked against the installed @angular/core collection.
  • NgRx Store (actions, reducer, selectors, functional effects, selectSignal) and SignalStore, as examples; this site doesn't use NgRx.
  • How to turn the bugs from this guide into interview answers.
  • Pitfalls, the practice deck, and seven new questions in the bank.

A fitness-test fix. The no-NgModules check in architecture.spec.ts was a regex, and it flagged the @NgModule example in lesson 13. It now reads real decorators with the TypeScript parser, through the helper the OnPush check already used (generalised to take the decorator name). To confirm it still catches the real thing, I briefly added a file with an actual @NgModule and it failed with shared/probe.module.ts (ProbeModule). The lesson 13 commit went in before this fix, so that one commit has a red suite.

Commits

  1. Add failing specs for an interview question bank, practice deck and lesson 13
  2. Move every lesson's interview questions into one bank
  3. Add an interview practice deck
  4. Write lesson 13 with practice over every question in the guide
  5. Find NgModules with the parser so lesson code samples don't count
  6. Bump to 1.4.12 with the lesson 13 changelog entry

Verification

  • ng test --watch=false: 71 files, 511 tests, exit 0
  • npm run lint: exit 0
  • tsc --noEmit -p tsconfig.app.json and -p tsconfig.spec.json: exit 0
  • ng build: exit 0, 83 routes prerendered (including /thoughts/tag/interview), initial 395.60 kB
  • The prerendered lesson 13 page has the deck in its HTML: "78 left, 0 known" and the first question

TO-DOs for this PR

  • Before/after screenshots of the lesson 13 page with the deck, light and dark. Blocked: Chromium won't launch in my sandbox.

@gpbsumido
gpbsumido marked this pull request as ready for review November 21, 2026 16:40
@gpbsumido
gpbsumido added this pull request to stack #46 November 21, 2026 17:22
@gpbsumido
gpbsumido merged commit a9b1a9a into develop Nov 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant