Chapter 05 / 15 · Webster International
Languages, Frameworks & Runtimes
Compare JavaScript, TypeScript, Python, Java, Go, C#, Rust and SQL; understand compilers, interpreters and execution models.
Programming languages express the same fundamental ideas with different trade-offs. Choose around ecosystem, runtime, problem domain, team skills and operational needs.
01 / FIELD NOTE
A language versus a runtime versus a framework
Mental model: language = the rules of source programs; compiler/transpiler = a translation step; runtime = the engine and host APIs that execute the result; standard library = common facilities; framework = application structure and conventions; package manager = how dependencies arrive. These are independent choices. TypeScript's type checker does not ship a validator into JavaScript, while the browser and Node provide different host APIs. React is a UI library, not a JavaScript runtime. A container packages a process and dependencies; it is not itself a language or framework. Diagnose a failure at the correct layer: syntax/type errors at build time, unavailable globals at runtime, missing dependencies at installation, and incorrect HTTP contracts at the boundary.
Knowing the layer isolates the fix and avoids a rewrite: a missing DOM API in Node is not a TypeScript bug, and an incorrect API response cannot be repaired by installing a frontend framework. Security checks must execute at the trust boundary, not only in an editor.
Example A: a shared TypeScript date formatter compiles successfully but calls window.localStorage in a Node scheduled job; inject a storage adapter rather than changing languages. Example B: a React form sends a string quantity to a Python API; validate and normalize the wire value on the server instead of assuming a shared interface makes it safe.
// Runnable: node layer-check.cjs (Node 22+)
const assert = require('node:assert/strict');
const payload = JSON.parse('{"count":"3"}');
assert.equal(typeof payload.count, 'string');
function parseCount(value) {
if (!Number.isSafeInteger(value) || value < 0) throw Error('invalid count');
return value;
}
assert.throws(() => parseCount(payload.count), /invalid count/);
console.log('Boundary validation required');Hands-on exercise · reveal the verification check
Draw five boxes (source, checker/compiler, runtime, host APIs, framework) for a TypeScript browser form and a Node background job. Execute the snippet; then replace the JSON string count with number 3 and repeat. Explain which layer enforces the invariant.
Original run prints 'Boundary validation required'. With count 3 the assert.throws check fails because the input is now accepted; change it to assert.equal(parseCount(payload.count), 3) to pass. The runtime—not TypeScript—enforces the value rule.
02 / FIELD NOTE
JavaScript and TypeScript: browser to server
Mental model: JavaScript executes one synchronous call stack per agent, schedules asynchronous completions, and uses promises/microtasks to resume work. TypeScript analyzes a source program but type annotations and assertions are erased before execution. A shared DTO type helps editors and builds, yet incoming JSON is unknown until checked. Browser APIs include the DOM and accessibility tree; Node offers server-side filesystem, streams and networking. Async I/O does not make CPU-heavy loops nonblocking. An API contract spans status, shape, errors, authorization and compatibility, not only a TypeScript interface.
This distinction prevents common production failures: accepting malformed webhook data, blocking the Node event loop while generating reports, or shipping client-only validation as a security boundary. Browser UX remains responsible for keyboard and screen-reader interaction.
Example A: a booking form POSTs an event and renders validation errors beside the matching fields, with an accessible live summary. Example B: a Node worker imports 10,000 artist records; bounded batches or worker threads keep the HTTP process responsive, while schema validation rejects unexpected records.
// Runnable: node contract.cjs (Node 22+)
const assert = require('node:assert/strict');
function eventFromWire(raw) {
if (!raw || typeof raw !== 'object' || Array.isArray(raw)) throw Error('object required');
if (typeof raw.title !== 'string' || raw.title.trim().length < 1 || raw.title.length > 80) throw Error('title');
if (!Number.isSafeInteger(raw.venueId) || raw.venueId <= 0) throw Error('venueId');
return {title: raw.title.trim(), venueId: raw.venueId};
}
assert.deepEqual(eventFromWire({title:' Jazz ',venueId:7}),{title:'Jazz',venueId:7});
assert.throws(()=>eventFromWire({title:'Jazz',venueId:'7'}),/venueId/);
console.log('Wire contract verified');Hands-on exercise · reveal the verification check
Run the contract script and add tests for an empty title, negative venue ID, and an 81-character title. Sketch the corresponding browser form with a labelled error message and a focusable error summary.
All invalid values throw with the expected field; the valid value returns a trimmed title and integer ID. Keyboard users can submit, discover and correct the same errors without a mouse.
03 / FIELD NOTE
Python: automation, data and APIs
Mental model: a Python environment is an interpreter plus its import path and installed distributions. `venv` isolates packages but does not freeze them; a dependency lock or pinned requirements file supports repeatable builds. A dataclass models convenient Python objects, not hostile JSON validation. Python's async/await cooperatively schedules I/O; CPU parallelism depends on interpreter build and process/thread strategy, so do not generalize the GIL across all versions. Make scripts idempotent, use pathlib, explicit encodings, bounded batches and structured exit codes. For web APIs, validate request models and enforce authorization independently.
Automation often runs unattended with different working directories, credentials and Python versions. Reproducible environments and explicit validation prevent a local success from becoming a broken scheduled import or unsafe API.
Example A: a daily venue importer reads a CSV, validates each date and records rejected rows without duplicating previously imported events. Example B: a FastAPI dog-walk booking endpoint accepts an integer client ID and ISO date, then checks tenant ownership before writing; a type annotation alone does not establish permission.
# Runnable: python3 import_check.py (Python 3.10+; stdlib only)
from dataclasses import dataclass
from datetime import datetime
@dataclass(frozen=True)
class Event:
title: str
starts_at: datetime
def parse_event(raw):
title = raw.get('title')
if not isinstance(title, str) or not title.strip():
raise ValueError('title')
when = datetime.fromisoformat(raw['starts_at'])
if when.tzinfo is None:
raise ValueError('timezone required')
return Event(title.strip(), when)
assert parse_event({'title':' Gig ', 'starts_at':'2026-10-27T19:00:00-04:00'}).title == 'Gig'
try:
parse_event({'title':'Gig','starts_at':'2026-10-27T19:00:00'})
except ValueError as exc:
assert str(exc) == 'timezone required'
else:
raise AssertionError('naive timestamp accepted')
print('Importer validation passed')Hands-on exercise · reveal the verification check
Create `python3 -m venv .venv`, run the script with `.venv/bin/python` (Windows: `.venv\\Scripts\\python.exe`), then test a missing title and an invalid date. Explain why this environment is recreated rather than copied to another server.
Valid timezone-aware event prints 'Importer validation passed'; naive time and missing title are rejected; malformed ISO date raises ValueError. `sys.prefix != sys.base_prefix` inside the venv.
04 / FIELD NOTE
Java, C# and managed application platforms
Mental model: Java source usually becomes JVM bytecode; C# becomes Common Intermediate Language that runs under .NET. Managed runtimes provide garbage collection, JIT/AOT options, libraries, profiling and deployment tooling, but garbage collection only reclaims eligible managed objects; sockets, streams and native handles still need explicit lifetime management. Dependency injection separates domain policy from persistence and HTTP adapters. Model cancellation, request timeouts, transaction boundaries and schema migrations. Prefer observable, small service boundaries over automatic microservice proliferation.
Long-lived services need predictable upgrades, memory use, security patches and diagnostics. Understanding managed memory and disposable resources prevents leaks even when the language has a garbage collector.
Example A: a C# property registry service validates a parcel request, checks authorization, uses a parameterized query and disposes the database connection. Example B: a Java billing worker consumes queue messages, uses an idempotency key, and records a retryable failure without charging twice.
// Illustrative C# · .NET 8+ Console App (paste into Program.cs)
using System;
using System.Globalization;
static int ParseSeats(string input) {
if (!int.TryParse(input, NumberStyles.None, CultureInfo.InvariantCulture, out var n) || n < 1 || n > 12)
throw new ArgumentOutOfRangeException(nameof(input), "1..12 required");
return n;
}
Console.WriteLine(ParseSeats("4")); // 4
try { ParseSeats("999"); throw new Exception("should reject"); }
catch (ArgumentOutOfRangeException) { Console.WriteLine("Rejected"); }Hands-on exercise · reveal the verification check
In a .NET 8 console project run the example; then change the input to '4.0' and '0'. For a database version, describe where to use `using`, cancellation tokens and a request correlation ID.
Output is `4` then `Rejected`; the two changed inputs throw ArgumentOutOfRangeException. A production design disposes connections and logs correlation IDs without personal information.
05 / FIELD NOTE
Go, Rust, C and native execution
Mental model: Go compiles to native binaries with garbage collection and lightweight goroutines; channels coordinate communication but do not automatically guarantee race-free code. Rust's ownership and borrowing rules reject many use-after-free and data-race patterns at compile time, but `unsafe` and logic bugs still require review. C exposes low-level memory and ABI control with greater responsibility for bounds and lifetime. The right choice follows workload, deployment footprint, interop needs, team proficiency and measured bottlenecks. Concurrency is not the same as parallelism; use cancellation and bounded queues.
Infrastructure code, embedded drivers and parsers have different failure costs than ordinary web forms. Understanding ownership and scheduling makes language selection a safety and operations decision rather than a speed contest.
Example A: a Go HTTP collector fans out to three upstream feeds with context cancellation and a concurrency limit; a lost timeout otherwise consumes resources. Example B: a Rust file parser reads untrusted headers into bounded buffers; a C FFI boundary needs explicit length checks and ownership rules.
// Runnable: go run main.go (Go 1.20+)
package main
import (
"context"
"fmt"
"time"
)
func fetch(ctx context.Context) error {
select {
case <-time.After(10 * time.Millisecond): return nil
case <-ctx.Done(): return ctx.Err()
}
}
func main() {
ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond)
defer cancel()
err := fetch(ctx)
fmt.Println(err == context.DeadlineExceeded) // true
}Hands-on exercise · reveal the verification check
Run the Go example, then raise the timeout to one second. Add a test using `go test -race` for a shared counter updated by two goroutines, first without synchronization and then using a mutex.
Original example prints `true`; a one-second deadline prints `false` because the operation completes. The race detector reports an unsynchronized counter and becomes clean with a mutex.
06 / FIELD NOTE
SQL and declarative languages
Mental model: SQL is declarative: specify the result relation and constraints; the optimizer selects access paths, joins and sort strategies based on indexes and statistics. It does not promise a row order without ORDER BY. Bind values as parameters, never concatenate user-supplied SQL. Constraints and transactions protect correctness, while indexes speed selected reads at the cost of write work and storage. `EXPLAIN` reports a plan; `EXPLAIN ANALYZE` executes the query, so use care with writes and production load. Distinguish a query-language choice from the storage engine's durability and isolation model.
A seemingly small SQL change can alter correctness, latency and operational load. Knowing the optimizer's role lets you improve data access with evidence instead of assuming every slow page needs a new cache or microservice.
Example A: a music events calendar filters future shows by venue and starts_at; a composite index helps only if selectivity and order justify it. Example B: a dog-walking report counts completed walks by client; missing tenant filters can leak another company's data even when the SQL is syntactically valid.
-- Runnable in PostgreSQL psql (temporary table, no production writes)
CREATE TEMP TABLE shows(id int PRIMARY KEY, starts_at timestamptz NOT NULL);
INSERT INTO shows VALUES (1, '2026-11-01T19:00:00Z'), (2, '2026-10-30T20:00:00Z');
SELECT id FROM shows ORDER BY starts_at, id LIMIT 1;
-- Expected: 2
EXPLAIN SELECT id FROM shows WHERE starts_at >= '2026-10-29T00:00:00Z' ORDER BY starts_at, id;Hands-on exercise · reveal the verification check
Run the SQL in a transaction or disposable database. Add an index on starts_at, inspect EXPLAIN again, then insert duplicate timestamps and decide what tie-breaker is required for stable pagination.
The ordered query returns id 2. The planner may still choose a sequential scan on two rows; an index is not guaranteed to be used. ORDER BY starts_at, id produces deterministic ties.
07 / FIELD NOTE
Compiled, interpreted, JIT and WebAssembly
Mental model: a compiler may emit machine code, bytecode or another language; an interpreter executes instructions; a JIT optimizes selected paths at runtime. These are implementation strategies, not exclusive labels for whole languages. TypeScript emits JavaScript, V8 interprets/optimizes JavaScript, JVM/.NET runtimes execute intermediate code with optional ahead-of-time paths, and WebAssembly is a portable binary compilation target hosted in a sandbox. Wasm complements JavaScript; it does not automatically provide DOM APIs, file permissions or accessible UI controls. Measure end-to-end latency, startup, memory and transfer size rather than relying on a 'compiled is faster' slogan.
Execution models affect cold starts, debugging symbols, source maps, binary portability, runtime permissions and operational telemetry. The largest bottleneck may be I/O, network, DOM work or database locks rather than the instruction format.
Example A: a browser photo editor moves a bounded pixel-processing loop to a Wasm module but keeps keyboard-operable controls and image descriptions in HTML. Example B: a serverless endpoint chooses an AOT build to reduce cold starts but must still benchmark package size and real traffic.
// Runnable: node benchmark.cjs (Node 22+)
const {performance} = require('node:perf_hooks');
function sum(n) { let total=0; for(let i=0;i<n;i++) total+=i; return total; }
for(let i=0;i<3;i++) sum(100000); // warm-up
const start=performance.now();
const result=sum(100000);
const ms=performance.now()-start;
console.log({result, milliseconds:ms.toFixed(3)});
// This measures JS only; do not claim it compares JIT, AOT or Wasm.Hands-on exercise · reveal the verification check
Run the benchmark ten times, then add 100ms of simulated I/O delay and compare end-to-end timing. Sketch where a Wasm module could be useful and what data crossing the JS/Wasm boundary would cost.
Sum of integers 0..99999 is 4999950000. Timings vary by machine and warm-up; simulated I/O dominates a small computation. The result does not prove any language is universally faster.
08 / FIELD NOTE
How to choose a stack
Mental model: choose a stack by explicit constraints and reversibility, not popularity. Start with user journeys, data ownership, privacy, offline needs, deployment target, team expertise, support horizon and recovery requirements. Compare candidate stacks using a small vertical slice, an operational drill and a measured bottleneck. A framework may reduce initial code but increase upgrade burden; a native language may reduce runtime overhead but lengthen delivery. Record decisions as hypotheses with revisit triggers, including runtime end-of-support, staffing, performance and accessibility acceptance criteria.
A stack decision is a long-term operating cost. A modest, supported toolchain with tests and monitoring often beats an elaborate architecture that a small team cannot patch or recover.
Example A: a solo appointment CRM uses server-rendered forms, PostgreSQL and a modest Node or Python API; a simple deployment and database restore matter more than microservices. Example B: an offline inspection app prototypes native device storage, sync conflicts, camera permissions and screen-reader flows before choosing Swift/Kotlin or a cross-platform stack.
// Runnable: node decision.cjs (Node 22+)
const weights={delivery:3,operations:3,offline:2,team:2};
const candidates={
'web-first':{delivery:5,operations:4,offline:2,team:5},
'native-first':{delivery:2,operations:3,offline:5,team:2}
};
const score=values=>Object.entries(weights).reduce((sum,[key,w])=>sum+w*values[key],0);
for(const [name,values] of Object.entries(candidates)) console.log(name,score(values));
// Scores are assumptions to validate with prototypes, not universal facts.Hands-on exercise · reveal the verification check
Run the decision matrix; change offline weight to 6 for a home-inspection app and explain the changed ranking. Write an ADR with a two-week prototype, keyboard acceptance test, recovery drill and date to revisit the decision.
Original scores: web-first 41, native-first 29. With offline weight 6: both score 49; the ranking becomes a tie. Changing assumptions must be explicit and supported by prototypes.
Pick a language by failure mode and ecosystem
Choose stack using product constraints: browser interaction, runtime resources, hosting, latency, data science libraries, deployment size, recruitment and maintenance. Compare libraries and operational tooling rather than syntax alone.
Framework churn can consume more time than feature development.
For a small event application, compare TypeScript/Node and Python/FastAPI on deployment simplicity, validation, integrations and local team knowledge.
Hands-on exercise · reveal the verification check
Make a two-column technology decision record with three explicit trade-offs.
Decision names the assumption that would trigger reconsideration.
Static types, runtime contracts and unsafe boundaries
Compile-time types describe your own program, but inputs from JSON, URLs, databases or plugins still require runtime checking. Gradual typing improves developer feedback without being a validation or authorisation system.
'It compiles' does not mean data arriving from the network is valid.
A typed Event API still rejects a string that exceeds length and a projectId belonging to another account.
Hands-on exercise · reveal the verification check
Construct malformed JSON matching some, but not all, fields.
Server rejects invalid fields with safe structured errors.
How runtimes schedule asynchronous work
An event loop coordinates callbacks, microtasks and I/O; threads and workers can run CPU-heavy work separately. Blocking computation on an event loop delays every request sharing that process.
A large synchronous transform can produce mysterious site-wide latency without high database load.
For 100k-image metadata processing, move CPU-intensive work to worker threads or bounded jobs; let Node serve requests.
Hands-on exercise · reveal the verification check
Measure API response while a CPU loop runs on the main thread.
Request latency drops after isolating the CPU work.
Memory management and ownership trade-offs
Garbage collection reduces manual memory errors at a runtime cost; Rust ownership checks many lifetimes at compile time; C requires explicit resource discipline. All environments can still leak files, sockets or retained objects.
Select memory tooling for the workload rather than treating one model as categorically superior.
Diagnose a growing Node heap versus a file-descriptor leak separately; release response streams and remove stale listeners.
Hands-on exercise · reveal the verification check
Create then dispose a repeating listener in a sample UI.
Heap and open handles remain stable across repeated mounts.
Choosing package management and dependency upgrades
Pin dependency versions and lockfiles, scan critical transitive packages, document the runtime compatibility matrix, and use migration guides for breaking changes. Review untrusted install scripts before running them.
Supply-chain risk and surprising upgrades affect reproducibility and security.
Use a lockfile on staging; test a new framework major release against a real browser path before promotion.
Hands-on exercise · reveal the verification check
List direct/transitive packages and their supported runtime range.
A clean environment produces the same tested dependency graph.
Interoperability across language boundaries
Services written in different languages coordinate through durable protocols, not shared in-memory objects. Define JSON/OpenAPI or protobuf contracts, timestamp formats, error semantics and version changes. Use contract tests on producer and consumer.
Differences in integer precision, date parsing, nulls and enums create cross-language bugs.
A Python importer writes events through a Node REST endpoint using RFC 3339 timestamps and validates both ends against the same schema.
Hands-on exercise · reveal the verification check
Create and test one JSON record exchanged across two runtimes.
Both preserve IDs, nulls, timezone and expected validation.
15 / FIELD NOTE
Language, runtime, framework, compiler and bundler are separate layers
A programming language defines syntax and semantics; a compiler transforms source; a runtime executes code and exposes host capabilities; a framework supplies application conventions; a bundler packages assets. JavaScript syntax can run under multiple hosts, while TypeScript types are usually removed during compilation.
Clear layer boundaries make technology selection and debugging more accurate.
Draw TypeScript → JavaScript → Node.js → HTTP server with React as a UI library and Vite as build tooling.
// TypeScript source becomes JavaScript before execution
// React is a UI library; Node is a server runtime.
// PostgreSQL is persistent storage.Hands-on exercise · reveal the verification check
Draw two stack diagrams for browser and server.
Label which component owns rendering, execution, storage and networking.
16 / FIELD NOTE
JavaScript internals: closures, promises and event loop scheduling
JavaScript functions capture lexical bindings; promises schedule continuations through microtasks; event loops coordinate tasks and timers around host APIs. Long synchronous work blocks responsiveness despite async functions elsewhere. Browser and Node runtimes differ in APIs and scheduling details.
Knowing execution timing explains stale UI state, blocked requests and memory-retained closures.
Create a search handler that cancels an obsolete fetch request and does not update results from an outdated query.
console.log('before');
Promise.resolve().then(() => console.log('microtask'));
console.log('after');Hands-on exercise · reveal the verification check
Log the execution order of a timer and resolved promise.
Explain the ordering observed in the chosen runtime.
17 / FIELD NOTE
TypeScript discriminated unions, generics and runtime validation
TypeScript improves development-time checking of object shapes, generic relationships and state transitions. Discriminated unions encode distinct variants with their own required fields. Type assertions do not parse or validate JSON, and authorization must still happen on the server.
Typed states can prevent impossible UI branches without replacing the trust boundary.
Define pending, confirmed and cancelled booking types and validate the API payload before updating the stored record.
type Booking = {kind:'draft';id:string} | {kind:'confirmed';code:string};
function label(b:Booking){return b.kind==='draft'?b.id:b.code;}Hands-on exercise · reveal the verification check
Write a union type for three booking states and a switch statement.
The compiler forces every state to be handled.
18 / FIELD NOTE
Python with venv, dataclasses, pytest and FastAPI
Python supports expressive automation, iteration and data handling, while its ecosystem adds typed models, HTTP frameworks and data tools. Virtual environments isolate dependencies; pytest supports fixtures; FastAPI maps request models to OpenAPI. CPU and I/O concurrency require separate design.
It suits importers, data tools and services where development speed and libraries matter.
Build a small event importer with dataclasses, isolated packages, pytest tests and a validating FastAPI endpoint.
from dataclasses import dataclass
@dataclass(frozen=True)
class Event:
name: str
venue_id: int
print(Event('Live set', 5))Hands-on exercise · reveal the verification check
Build and test one FastAPI GET handler with a validated response model.
Test a bad request and prove it fails with a safe error.
19 / FIELD NOTE
Java and C# managed runtime ecosystems
Java commonly runs compiled bytecode on the JVM; C# runs under .NET with a managed runtime, garbage collection and diagnostics. Spring Boot and ASP.NET Core add web conventions, dependency injection and integrations. Intermediate representations enable portability but do not erase resource cost.
These ecosystems offer mature profiling, long-lived services and organizational tooling.
Compare a booking service implemented with Spring Boot and ASP.NET Core by startup, data access, test tooling and operating cost.
// C# / ASP.NET Core
app.MapGet("/health", () => Results.Ok(new { status = "ok" }));Hands-on exercise · reveal the verification check
List three JVM or .NET diagnostic tools and their use.
Identify how you would inspect heap growth and slow SQL.
20 / FIELD NOTE
Go concurrency, Rust ownership and C/C++ native trade-offs
Go uses goroutines and channels with garbage collection; Rust checks ownership and borrowing to avoid many memory-safety errors; C and C++ offer native control with stricter manual safety requirements. Different languages still share responsibility for data races, security policy and correctness.
Choose these ecosystems for measured systems constraints, not just perceived speed.
Implement a bounded concurrent worker in Go or a robust parser in Rust; measure CPU and memory before choosing a rewrite.
// Go: goroutine worker example
var wg sync.WaitGroup
wg.Add(1)
go func(){ defer wg.Done(); process() }()
wg.Wait()Hands-on exercise · reveal the verification check
Write a decision record comparing memory, ergonomics and ecosystem.
Use a representative workload instead of a synthetic leaderboard.
21 / FIELD NOTE
PHP and Laravel: modern server-rendered and API applications
Modern PHP has namespaces, typed properties and mature package management through Composer. Laravel supplies routing, Eloquent, policy checks, queues and migrations; Symfony emphasizes reusable framework components. Request lifecycle, caching and worker management still matter for real deployment.
Existing PHP projects often benefit more from targeted modernization than an expensive rewrite.
Build a Laravel booking form with validation, policies, migrations and queued confirmation messages.
// Laravel PHP: routes/api.php
Route::get('/events', [EventController::class, 'index']);Hands-on exercise · reveal the verification check
Document the request-to-database lifecycle for a Laravel route.
Test validation, authorization and queue failure separately.
22 / FIELD NOTE
Ruby and Rails: conventions, Active Record and Hotwire
Ruby emphasizes readable objects and blocks; Rails combines routing, ORM, migrations, jobs and server-side templates. Hotwire can deliver interactive workflows with comparatively little bespoke browser logic. Its conventions reduce setup effort but database queries and caching still need profiling.
An integrated toolkit can make small admin-heavy products easier to build and maintain.
Prototype a client directory with models, authorization and real-time list updates using Rails and Hotwire.
# Rails model validation; add a matching database constraint
class Booking < ApplicationRecord
validates :starts_at, presence: true
endHands-on exercise · reveal the verification check
Build a migration with a unique key and a model validation.
Race two identical inserts and inspect the database outcome.
23 / FIELD NOTE
Kotlin, Swift and Dart for native or cross-platform mobile
Kotlin is central to modern Android, Swift to Apple-platform apps and Dart underpins Flutter. Each has its own type system, async model, standard libraries and platform bindings. Cross-platform UI reuse does not remove platform-specific permissions, accessibility or deployment obligations.
App lifecycle and API stability matter at least as much as shared code percentage.
Build the same offline-first event list in a native prototype and in Flutter, then compare VoiceOver/TalkBack, recovery and startup.
// Dart record-like immutable model
class Event { final String title; const Event(this.title); }Hands-on exercise · reveal the verification check
Describe how one local draft survives app restart on two platforms.
Test network loss, process death and screen-reader navigation.
24 / FIELD NOTE
SQL is declarative, not an ordinary procedural language
SQL states the data result you want, while the optimizer selects query plans. Indexes accelerate some access paths but add write cost; transactions and constraints enforce invariants that application-side checks alone cannot guarantee. Stored procedures add procedural options but are not required for useful SQL.
The fastest application rewrite may be a corrected join and an index.
Use EXPLAIN to compare events fetched by start time with and without an appropriate index.
EXPLAIN (ANALYZE, BUFFERS)
SELECT * FROM events WHERE starts_at >= CURRENT_TIMESTAMP LIMIT 30;Hands-on exercise · reveal the verification check
Design a date-range query and inspect its plan.
Explain whether an index is used and why.
25 / FIELD NOTE
React, Next.js and rendering responsibility
React provides declarative UI components; Next.js adds routing, server rendering, server components and application infrastructure. Client state and server data have different lifecycles. Framework rendering modes affect caching, payload size, and where secrets must stay.
Separating rendering concerns reduces stale UI, bundle bloat and accidental exposure of credentials.
Render a public artist biography on the server but keep an interactive player isolated on the client.
// A client-side React component
'use client';
function PlayButton(){ return <button type="button">Play</button> }Hands-on exercise · reveal the verification check
Draw the boundary of a Next.js server component and interactive child.
Verify no server-only environment value enters the browser.
26 / FIELD NOTE
Vue, Nuxt, Angular and SvelteKit compared
Vue provides reactive components while Nuxt adds routing and SSR; Angular is a comprehensive TypeScript application framework; Svelte compiles components and SvelteKit adds routing and server capabilities. Compare conventions, ecosystem, accessibility and operational constraints, not aesthetic preference.
Framework choice matters when a team must maintain consistent patterns over years.
Prototype a filterable calendar in each candidate and measure navigation, state handling, testability and built JavaScript.
// Vue Composition API
const query = ref('');
const filtered = computed(() => items.value.filter(x => x.includes(query.value)));Hands-on exercise · reveal the verification check
Make a decision matrix for one real feature and three frameworks.
Record one reason to reject each alternative.
27 / FIELD NOTE
Astro and progressive enhancement for content-heavy sites
Astro emphasizes HTML-first content and selectively hydrated client islands. Modern HTML/CSS can achieve many layouts without shipping a large framework. Progressive enhancement retains readable content even when optional scripts fail, while client-only SPA shells can become empty.
Educational guides and municipal news pages benefit from resilient content delivery.
Serve a chapter as static HTML and add interactive search and code-copy actions only after page load.
---
const { heading } = Astro.props;
---
<h1>{heading}</h1>Hands-on exercise · reveal the verification check
Disable JavaScript and load a full article.
Headings, links and examples remain usable.
28 / FIELD NOTE
Express, Fastify, NestJS, Django and ASP.NET Core
Backend frameworks vary from minimalist HTTP routing to highly opinionated application structures. Express is minimal, Fastify uses schema-based plugins, NestJS organizes TypeScript modules, Django includes ORM and admin, and ASP.NET Core supplies typed middleware and hosting. The useful comparison includes auth, validation, migrations and operations.
Teams benefit from choosing conventions appropriate to application complexity.
Implement one health route and one booking endpoint in two stacks, then compare input validation, logging and tests.
// Express handler
app.get('/health', (_req, res) => res.json({ok:true}));Hands-on exercise · reveal the verification check
Write a checklist of six backend capabilities.
Benchmark them on a representative CRUD slice.
29 / FIELD NOTE
Node.js versus Deno versus Bun runtime behavior
Node.js, Deno and Bun can execute JavaScript or TypeScript workflows with differing compatibility, permission conventions, bundling and APIs. Node uses V8 while Bun uses JavaScriptCore. Check native extension support, runtime flags, filesystem access and deploy platform specifics.
A runtime replacement affects install scripts, test environment and production reliability.
Run the same endpoint, package install and SQLite integration in all three runtimes.
# Compare runtime versions
node --version
deno --version
bun --versionHands-on exercise · reveal the verification check
Record a compatibility table for the team's five critical libraries.
Each runtime either passes an integration test or has a named gap.
30 / FIELD NOTE
JVM, CLR, CPython, BEAM, V8 and WebAssembly
Runtimes differ in compilation strategy, garbage collection, thread/process scheduling and host APIs. JVM and CLR execute managed intermediate code; CPython interprets bytecode; BEAM schedules lightweight isolated processes; V8 optimizes JavaScript; WebAssembly offers portable sandboxed modules with host-dependent capabilities.
Understanding the runtime helps interpret startup latency, memory profiles and portability.
Compare an ETL script, an always-on web server and a real-time gateway using these execution models.
# Inspect CPython bytecode
python -m dis example.pyHands-on exercise · reveal the verification check
Trace source code to executable artifact for three ecosystems.
Label each compiler, intermediate format and runtime.
31 / FIELD NOTE
Packages, lockfiles and reproducible cross-language builds
npm/pnpm, pip/uv, Maven/Gradle, NuGet, Cargo, Bundler and Composer manage dependency graphs with ecosystem-specific conventions. Use compatible version policies, repeatable installs and CI. Upgrade major versions in staging with real tests and check transitive dependencies for security and licensing risk.
Application reliability depends on third-party code as well as first-party logic.
Pin your runtime and dependency manifest, rebuild a clean CI container and run the suite before deploying.
# Reproduce dependency installs
npm ci
python -m venv .venvHands-on exercise · reveal the verification check
Recreate one project from a clean checkout.
Compare dependency graph and build output consistency.
32 / FIELD NOTE
Vite, webpack, esbuild, testing and source maps
Build tools transform source and bundle assets but do not automatically test application behavior or check all TypeScript semantics. Vite optimizes developer workflow; webpack offers extensive configuration; esbuild prioritizes fast transforms. Source maps aid debugging but require deliberate production exposure policies.
Teams should choose tools around testability, browser compatibility and reliable artifacts.
Build a TypeScript app, run type checks separately, inspect bundle size and trace one runtime exception with a source map.
# Check types independently from bundling
npm run typecheck
npm test
npm run buildHands-on exercise · reveal the verification check
Write a CI sequence including install, typecheck, test and build.
Deliberately break a type and see the correct stage fail.
33 / FIELD NOTE
Choosing a stack: score the evidence, constraints and migration cost
Evaluate user platform, team skill, maintenance horizon, latency, deployment, hosting, data needs, accessibility, observability and risk. Compare realistic vertical slices against an architecture decision record and choose reversible boundaries. A modular monolith often wins over premature service fragmentation for smaller products.
Stack decisions affect total ownership cost long after the demo is complete.
For a dog-walking CRM, compare Django, Rails and TypeScript API variants using booking accuracy, admin workflows and operator support.
# ADR example
# Decision: Choose modular monolith
# Alternatives: microservices
# Revisit if team ownership demands isolationHands-on exercise · reveal the verification check
Create a weighted decision table for three plausible stacks.
Document assumptions, evidence and conditions for revisiting the choice.