ai
3 мин
26 августа 2026 г.
Источник: Dev.to AI Feed

First Hour, First PR, First Rollback: An Onboarding Script for Junior Mobile Engineers

Roronoa
Roronoa
RSS AI Ingest
First Hour, First PR, First Rollback: An Onboarding Script for Junior Mobile Engineers

You clone the repository at 9:14 on your first Monday, and the onboarding ticket says "get the app running on a device and fix one bug." The iOS build fails on a missing pod, the Android emulator stalls on the splash screen, and by 10:00 yo...

You clone the repository at 9:14 on your first Monday, and the onboarding ticket says "get the app running on a device and fix one bug." The iOS build fails on a missing pod, the Android emulator stalls on the splash screen, and by 10:00 you have learned more about your team's toolchain than about the product. This article is the script I would hand you before that first hour: an environment check, a review loop for the first PR, and a rollback postmortem that actually sticks. The whole workflow runs on two free resources that are available right now: MonkeyCode, an open-source project, gives you a free model token allowance (10 million tokens at the time of writing) and a free server option. Disclosure: This article was prepared as part of MonkeyCode's product outreach. Every step below works without a credit card, and the only thing you spend is your own attention. The First Hour: Make the Repo Explain Itself Do not read the entire codebase on day one; read the README, the build script, and the one file that keeps failing, then let a model fill in the gaps. A useful first move is to paste a 400-line native module into the free model and ask for a one-page map of its inputs, outputs, and failure states. That summary is usually enough to unblock a build fix in ten minutes, and it teaches you the module's shape faster than reading it line by line. Before you open the app, run a one-page environment check so the build failures are obvious instead of mysterious: #!/usr/bin/env bash # onboard.sh — print a one-page environment report for a React Native repo set -euo pipefail echo "node: $(node --version 2>/dev/null || echo missing)" echo "npm: $(npm --version 2>/dev/null || echo missing)" echo "java: $(java -version 2>&1 | head -n1 || echo missing)" echo "pod: $(pod --version 2>/dev/null || echo missing)" echo "adb: $(adb --version 2>/dev/null | head -n1 || echo missing)" if [ ! -d "node_modules" ]; then echo "deps: missing — run npm ci" else echo "deps: present ($(du -sh node_modules | cut -f1))" fi Run the script, fix whatever it flags, and only then start the emulator or plug in a device. The next blocker is usually the API, because most mobile repos depend on a backend that needs a VPN or production credentials. Host a stub on the free server instead of waiting for a security ticket, and point the app at it: // stub-server.js — host on the free server, then set API_BASE_URL in the app const express = require("express"); const app = express(); app.get("/api/status", (req, res) => { res.json({ ok: true, build: "stub", latencyMs: 42 }); }); app.post("/api/orders", (req, res) => { res.status(201).json({ id: "stub-order-1" }); }); app.listen(process.env.PORT || 3000, () => { console.log("stub listening"); }); Now the app boots, the network layer has something to talk to, and you can reproduce bugs without touching production data. That is the entire goal of the first hour: a local loop you control, with the free server standing in for everything you lack. The First PR: Make the Diff Defend Itself AI promoted every developer to reviewer, and the junior engineer gets that promotion on day one, often without anyone explaining what a review is for. Your first bug is a classic mobile failure: the app shows a permanent error when the network blips, and the ticket says "add retry." The naive fix is a while loop, and the correct fix is a bounded retry with exponential backoff and jitter: // retry.ts — bounded retry with exponential backoff and jitter export async function withRetry( fn: () => Promise, { attempts = 3, baseMs = 500, maxMs = 4000 } = {} ): Promise { let lastError: unknown; for (let i = 0; i { let calls = 0; const result = await withRetry(async () => { calls++; if (calls --no-edit git push origin main # then verify on the device adb shell dumpsys battery | grep level adb shell top -n 1 | grep com.your.app Now reproduce against the stub by making it drop every third request, background the app, and watch the retry counter keep climbing. The fix is a lifecycle guard: pause retries when the app is not foregrounded and when the OS reports low power. // retry.ts — pause when the app is not foregrounded import { AppState } from "react-native"; export function canRetryNow(): boolean { return AppState.currentState === "active"; } Use the free server for the artifact that prevents the next rollback: a remote kill switch. The app checks a tiny endpoint before starting a retry loop, and the endpoint returns a flag the team can flip without shipping a binary. // kill-switch.js — host on the free server, update the JSON file to disable const express = require("express"); const app = express(); app.get("/flags/retry", (req, res) => { res.json({ enabled: true, reason: "" }); }); app.listen(process.env.PORT || 3000); The kill switch is a circuit breaker that buys time, not a substitute for fixing the bug. The postmortem then writes itself: the review missed a lifecycle check, the test suite had no background-state test, and the rollback was clean because the revert was a single commit. Limitations and Who Should Skip This The free token allowance and the free server are for development and evaluation, not production traffic; never put customer data, credentials, or secrets into prompts. Quotas and server capacity change over time, so verify the current numbers on the MonkeyCode site before you plan a team workflow around them. The stub and the kill switch have no SLA, which is fine for a dev loop and dangerous for anything customer-facing. If your team ships to regulated industries or handles health data, run this entire workflow inside your own infrastructure instead. The first hour, the first PR, and the first rollback are the three moments that decide whether a junior engineer stays curious or starts guessing. Give them a repo that explains itself, a diff that defends itself, and a rollback that teaches, and the cost of that setup is close to zero. If you try this script, record your own timestamps and share what broke; the next new person will thank you.

Хотите внедрить ИИ в ваш бренд?

Спроектируем и развернем автономных агентов и современный цифровой стек под ваши задачи.

Рассчитать проект