Loading…
Browse by type
Tutorial reads
Tutorial posts on Yomu, summarised newest first.
- 615 posts
- 20 companies
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
Tutorial posts
How to build a real-time multiplayer game with Flutter Flame
The tutorial builds a real-time multiplayer shooting game with Flutter, the Flame game engine, and Supabase Realtime. Each player controls a UFO by dragging, while the game automatically fires bullets in three directions; opponents’ positions and health points are synchronized over Supabase’s low-latency web socket connection. The implementation starts with Flutter widgets for the game page and lobby, then defines Flame components for the game, players, bullets, collision detection, movement, and health changes, before wiring Supabase broadcast events to client updates. A lobby waits for at least another player, and starting a match creates a shared channel so both clients can begin together. The completed application supports gameplay and a post-game dialog, allowing players to return to the lobby without managing their own networking infrastructure.
ShopifyQL Notebooks: Simplifying Querying with Commerce Data Models
ShopifyQL Notebooks gives merchants a self-serve way to investigate changing business metrics, understand their causes, and share findings as data stories. It combines the ShopifyQL query language with commerce-specific data models designed for users without SQL expertise, covering domains such as products, orders, and customers. The modeling process starts with business questions, translates them into columns and an appropriate grain, validates the design with mock data and queries, and evaluates upstream data, freshness, and performance. To support large merchants, the implementation uses incremental models and roll-ups, which can reduce build and query times while adding maintenance, pipeline, and monitoring complexity.
Storing OpenAI embeddings in Postgres with pgvector
Post describes how embeddings represent semantic relatedness as vectors and how OpenAI’s text-embedding-ada-002 model produces 1536-dimensional embeddings for text. It addresses storing and searching large or dynamically changing collections that may not fit comfortably in memory, using PostgreSQL and the pgvector extension instead of a small CSV-and-NumPy workflow. The implementation enables the vector extension, creates a documents table with a vector(1536) column, and defines match_documents() with cosine distance, thresholds, counts, and ordering. It also shows JavaScript code for generating embeddings, a search flow that retrieves matching documents for prompt context, and token limiting before a completion request, while noting that documents can be chunked. For larger tables, the post recommends an ivfflat index with vector_cosine_ops and gives 4 * sqrt(table_rows) as a starting point for lists.
The Hardest Part of Writing Tests is Getting Started
The article presents getting started with automated testing as the main obstacle, especially when a full suite requires helper tools, stubs, and fixtures that can overwhelm beginners. It argues that tests serve as executable documentation, preserve intended behavior and edge cases, and expose regressions before changes reach production. The recommended progression is to install a framework and verify both passing and failing tests, cover isolated functions, add stubs with sanitized API-response fixtures, and then build end-to-end tests while monitoring coverage. In an ETL example, API stubbing avoided expensive, slow calls, while database checks validated loaded and transformed data; the resulting tests covered more than 80 percent of the codebase and saved time for the author and team. The article also proposes E2E tests as a way to safely approach legacy code before refactoring it.
Making Your React Native Gestures Feel Natural
The post describes techniques for making draggable elements in a React Native Sheet component feel more natural during open-and-close gestures. A gesture handler updates yPosition as the user’s finger moves, then chooses an open or closed destination when the drag ends, but a position-only decision can ignore a fast flick and a fixed 600 ms animation ignores distance. The revised interaction adds event.velocityY, weighted by a multiplier, to the destination decision and uses withSpring so distance and release velocity affect the animation. It also divides overdrag distance when the Sheet is already open, creating resistance that communicates the boundary, and reports that flicks become easier while movement feels more realistic; the examples are ultimately recommended for testing on a real device.
Reliving Your Happiest HTTP Interactions with Ruby’s VCR Gem
Ruby’s VCR library records HTTP interactions and replays them in test suites, verifying requests and returning predictable responses; the post presents it as a way to manage complex WebMock stubs and multi-step or unreliable API behavior. It contrasts recordings from a live API with manually authored stubs: cassettes preserve observed behavior at recording time but are harder to change and do not update when the API changes. The guidance covers VCR.use_cassette, configurable request matching, YAML cassettes, before_filter logging, filter_sensitive_data, and safer recording modes such as :once and :none instead of :new_episodes. It recommends VCR for integration-focused tests involving unpredictable sequences, multiple calls, or troublesome APIs, while favoring WebMock or decomposition for simple calls and specific states; cassette isolation and inspection add debugging value but can hide interactions.
Monte Carlo Simulations: Separating Signal from Noise in Sampled Success Metrics
Sampled success metrics can be difficult to interpret when the underlying population is too expensive or time-consuming to measure completely. The method presents a Monte Carlo simulation for estimating how sample size and an assumed trend affect the reliability of Shopify’s sampled “shop issue rate,” which estimates requirement violations for an average installed app. Its workflow establishes simulation metrics such as 1mDO, 2mDO, and 1qDO, measures MAPE, defines a sampling distribution, and runs repeated simulations across parameter combinations using Python and pandas. For the example, the issue count is modeled with a Poisson distribution, while sample size, lambda, and monthly decrease are varied to quantify uncertainty and collection cost. With 100 audits per month, an initial mean of 10 issues, and a 5-percent monthly decrease, the simulations predict monthly decreases 83 percent of the time and decreases over two months 97 percent of the time.
3 (More) Tips for Optimizing Apache Flink Applications
Shopify presents three additional practices for optimizing large stateful Apache Flink applications, focusing on parallelism, sink capacity, and combining heterogeneous sources. It recommends starting with execution-environment parallelism, then matching task-manager capacity to the highest parallelism value; for example, parallelism 100 requires 25 task managers with four slots each. Sink bottlenecks can propagate backpressure upstream, so batching writes and correcting data skew—including with key bucketing when a low-cardinality or uneven key is unavoidable—can improve distribution, though bucketed results must later be combined. For archived Kafka topics, HybridSource exposes cloud-storage history and the live Kafka topic as one ordered logical DataStream, automatically switching after the archive is exhausted and using object-storage partitions to accelerate historical backfills.
Three Essential Remote Work Practices for Engineering Teams
After Shopify became a fully remote-first company, its engineering organization refined how teams communicate, collaborate, and work across time zones. The recommended team structure concentrates engineers in related time-zone regions to maximize synchronous availability for discussion, pair programming, mentorship, and questions, while relying on asynchronous writing and documentation between teams. Teams are also asked to define communication norms that specify which medium to use, expected response times, and whether contact is appropriate after hours; documenting these rules reduces ambiguity and protects focus. Individuals should intentionally shape routines and work-life boundaries around their own energy, productivity, health, and responsibilities, then integrate those preferences with team norms. Together, these practices support flexible remote work by combining synchronous collaboration within teams, asynchronous coordination across teams, and greater control over the working day.
How to Export Datadog Metrics for Exploration in Jupyter Notebooks
Datadog dashboards can constrain metric analysis because they offer a limited set of visualizations and lack tooling for complex work such as statistical modeling. They also aggregate data over wider time ranges: the examples contrast one-second metrics across 15 minutes with two-hour intervals across 30 days, potentially hiding interesting events. The guide uses Datadog’s REST API and Python in Jupyter notebooks, requiring an API key, an APP key, and a metric query such as CPU utilization over time. It defines a time range, splits it into buckets whose width is controlled by time_delta, requests each window in a loop, appends the results, and converts them into a dataframe. The resulting data can be examined with tools such as seaborn; a KDE plot is used to inspect the distribution of system CPU utilization, with the exported data offering greater granularity than the dashboard example.
Our Solution for Measuring React Native Rendering Times
Shopify needed a reliable way to measure React Native rendering times and verify that mobile apps remained as fast as native while adopting React Native. The open-source @shopify/react-native-performance library measures app startup, navigation, and screen re-render times by timing from native startup, a user action, or a UI event until a screen is fully rendered and interactive. It uses an invisible marker view with a native counterpart to capture end-to-end timing, including React Native-to-native bridge communication, and models incremental rendering as interactive or non-interactive render passes in a state machine. Reports can be sent through onReportPrepared to analytics tools such as Amplitude, where percentile TTI dashboards compare screens over time, expose bottlenecks, and help catch regressions; Shopify also uses screen-level Apdex internally.
Flutter Authorization with RLS
This tutorial extends a Flutter real-time chat app by adding authorization and one-to-one conversations backed by Supabase. It introduces a rooms page for starting conversations and listing existing rooms, while flutter_bloc coordinates profile and message data across the rooms and chats pages. The database changes add rooms and room_participants tables, connect messages to rooms, expose create_new_room for reusing or creating a two-user room, and register deep links for email confirmation on iOS and Android. SQL RLS policies then restrict room, participant, and message reads to participants and require message inserts to use the caller's profile ID, producing a real-time chat app with authentication and authorization.
Fetching and caching Supabase data in Next.js 13 Server Components
The article demonstrates data fetching and caching with Supabase in Next.js 13’s experimental app directory, focusing on Server Components and Suspense. It creates a posts table, configures a Supabase client, and uses async components to fetch data without manually managing loading states. The examples cover static generation, dynamic routes with generateStaticParams, time-based revalidation, client-side fetching, and a realtime pattern that combines server-rendered initial data with a client subscription to Postgres changes. The article notes that Next.js 13 is stable while the app directory remains in beta, and concludes that separating caching from fetching lets applications change freshness requirements without replacing their data-fetching logic.
Authentication in Ionic Angular with Supabase
The tutorial builds a simple realtime messaging app with Ionic Angular and Supabase, covering account authentication and database protection. It defines Postgres tables for users, groups, and messages, enables Row Level Security with policies for public reads and authenticated operations, and adds a trigger to copy newly registered users into a public users table. Angular services, route guards, and Supabase client logic handle email/password registration and login, session state, protected navigation, and magic links. For native apps, Capacitor URL events extract access and refresh tokens from a custom-scheme callback before establishing the session and navigating to the groups page. The tutorial concludes that Supabase can support Ionic Angular authentication with magic links, while phone authentication through Twilio is another possible option.
What is PostgreSQL commitfest and how to contribute
PostgreSQL Commitfest is the community's month-long review process for patches intended for merging into core. Contributors submit patches to pgsql-hackers, create a Git branch from master, consolidate changes, generate a versioned patch, and associate its mailing-list thread with an open Commitfest entry. The process expects authors to explain rationale, respond to review, rebase or revise patches, and review a comparable number of other patches. Submitted changes are checked by CFBot across architectures and operating systems, while statuses such as "Needs review," "Ready for committer," and "Waiting on author" track progress. Commitfests occur five times yearly, with the March event tied to feature-freeze for the October major release.
A Software Engineer's Guide to Working Across Time Zones
Working across time zones can make live collaboration difficult when teammates are nine to 12 hours apart, as described by a developer based in Singapore. The proposed alternative is to treat much of the work as asynchronous and deliberately document progress, blockers, decisions, and context. Examples include taking turns across working hours, annotating non-obvious pull request changes, posting end-of-day summaries with links or investigation notes, and recording meetings with agendas, key decisions, and action items. During Shopify's Hack Days prototype work on Linkpop, a Singapore-based frontend developer handed off updates before sleeping while North American teammates extended backend functionality and responded to blockers. The post concludes that these practices become habits that support handoffs, reduce back-and-forth, preserve information for absent teammates and future reference, and can provide longer uninterrupted focus periods.
On the Importance of Pull Request Discipline
The article argues that pull request (PR) discipline matters beyond code correctness because implementation and maintenance both benefit from changes that are clearly structured and documented. It describes a PR as a proposal whose title, summary, commits, comments, reviewers, labels, projects, and linked issues should intentionally communicate scope, design reasoning, low-level details, ownership, and historical connections. Its practical guidance focuses on precise titles, useful summaries, logically ordered commits, deliberate remote-branch changes, defined PR boundaries, and moving asides into follow-up PRs. It also recommends smaller, well-ordered PRs, permalink-based code references, distinctive branch-name prefixes, and learning Git commands including reflog, cherry-pick, and rebase. The article treats discipline as judgment rather than rigid law, allowing emergency exceptions while encouraging post-resolution documentation.
How to Write Code Without Having to Read It
The article argues that developers can minimize code reading when fixing bugs or changing features by focusing on information not already checked by tools. It recommends locating a user-visible entrypoint, then making a deliberately breaking edit and climbing the callstack through build errors rather than reading each caller. Strict types, tagged unions, exhaustive switches, linters, and unit tests expose incompatible inputs, missing cases, deprecated patterns, and affected consumers; pure functions separated from side-effect code keep tests simple and informative. After the tooling-driven passes, developers manually confirm behavior, revisiting the design when runtime issues remain and making future changes more "unread"-able.
A Software Engineer’s Guide to Giving Feedback that Actually Matters
The post presents feedback as a professional tool that can either support growth and collaboration or fuel ego-driven competition. It focuses first on pull request reviews, where engineers should prioritize critical code and logic over stylistic nitpicks, use linters or pre-commit hooks for uniform formatting, and frame comments to preserve a two-way educational dynamic. Recommended practices include discussing team review processes, explaining feedback goals, drafting messages before sending, reinforcing strengths, asking questions, separating behavior from identity, and making comments specific and timely. For broader workplace issues, the post advises asking whether feedback must be said, by the speaker, and immediately, then using considerate timing and SMART framing to improve the chance that it will be heard and produce change.
A Flexible Framework for Effective Pair Programming
Pair programming is presented as a mentoring and onboarding tool for early-career developers in Shopify’s Dev Degree program, where interns use it to build technical and communication skills. The author created a flexible framework to address progress tracking, session goals, a safe space, and communication, then refined it through an interactive RenderATL workshop with more than 30 attendees. The framework lets pairs choose roles, structure, agenda, environment, and communication practices; one described style assigns a driver to type and explain thought processes while a navigator reviews, observes, and suggests edge cases or refactorings, with frequent role switches. It also warns against hostile, passive-aggressive, and overly absolute language, and the pilot received positive intern feedback for supporting learning goals in a flexible format while continuing to evolve.
Top topics
- Architecture830
- Performance812
- LLMs648
- Machine Learning617
- Open Source561
- AI Agents542
- AI454
- Developer Experience446
Weekly digest
The best engineering reads, once a week.