Focused practiceModule A bossModule B bossModule C bossModule D bossModule E bossModule + boss

You'll get five edits in one real file, using techniques you've learned. Each one starts with your cursor somewhere else, so getting there is part of the edit.This is one longer edit in src/api/client.ts that uses what module A teaches. Par is a clean route using what you've learned so far. Match par for gold, or get within 2 keys for silver.This is one longer edit in shop/http_client.py that uses what module A teaches. Par is a clean route using what you've learned so far. Match par for gold, or get within 2 keys for silver.This is one longer edit in deploy/crontab that uses what module A teaches. Par is a clean route using what you've learned so far. Match par for gold, or get within 2 keys for silver.This is one longer edit in src/cli/report.js that uses what module B teaches. Par is a clean route using what you've learned so far. Match par for gold, or get within 2 keys for silver.This is one longer edit in cli/report.py that uses what module B teaches. Par is a clean route using what you've learned so far. Match par for gold, or get within 2 keys for silver.This is one longer edit in drafts/shipping-update.txt that uses what module B teaches. Par is a clean route using what you've learned so far. Match par for gold, or get within 2 keys for silver.This is one longer edit in test/e2e/services.ts that uses what module C teaches. Par is a clean route using what you've learned so far. Match par for gold, or get within 2 keys for silver.This is one longer edit in tests/services.py that uses what module C teaches. Par is a clean route using what you've learned so far. Match par for gold, or get within 2 keys for silver.This is one longer edit in docker-compose.yml that uses what module C teaches. Par is a clean route using what you've learned so far. Match par for gold, or get within 2 keys for silver.This is one longer edit in src/store/cartSlice.ts that uses what module D teaches. Par is a clean route using what you've learned so far. Match par for gold, or get within 2 keys for silver.This is one longer edit in store/cart.py that uses what module D teaches. Par is a clean route using what you've learned so far. Match par for gold, or get within 2 keys for silver.This is one longer edit in release/checklist.txt that uses what module D teaches. Par is a clean route using what you've learned so far. Match par for gold, or get within 2 keys for silver.This is one longer edit in src/config/defaults.js that uses what module E teaches. Par is a clean route using what you've learned so far. Match par for gold, or get within 2 keys for silver.This is one longer edit in shop/dev_settings.py that uses what module E teaches. Par is a clean route using what you've learned so far. Match par for gold, or get within 2 keys for silver.This is one longer edit in .env.example that uses what module E teaches. Par is a clean route using what you've learned so far. Match par for gold, or get within 2 keys for silver.This is one longer edit in src/components/EmptyState.jsx that uses what module + teaches. Par is a clean route using what you've learned so far. Match par for gold, or get within 2 keys for silver.This is one longer edit in templates/emails/order_shipped.html that uses what module + teaches. Par is a clean route using what you've learned so far. Match par for gold, or get within 2 keys for silver.This is one longer edit in public/maintenance.html that uses what module + teaches. Par is a clean route using what you've learned so far. Match par for gold, or get within 2 keys for silver.

Module A bossPar 67You haven't finished this one yet.It uses Insert at the first nonblank, Open a line above, Move by WORD, Combine an operator and motion and Counts.Module A bossPar 58You haven't finished this one yet.It uses Insert at the first nonblank, Open a line above, Move by WORD, Combine an operator and motion and Counts.Module A bossPar 69You haven't finished this one yet.It uses Insert at the first nonblank, Open a line above, Move by WORD, Combine an operator and motion and Counts.Module B bossPar 80You haven't finished this one yet.It uses Inside double quotes, Inside word and Around word.Module B bossPar 75You haven't finished this one yet.It uses Inside double quotes, Inside word and Around word.Module B bossPar 84You haven't finished this one yet.It uses Inside double quotes, Inside word and Around word.Module C bossPar 45You haven't finished this one yet.It uses Search forward, Find the next match, Find a character and Inside word.Module C bossPar 50You haven't finished this one yet.It uses Search forward, Find the next match, Find a character and Inside word.Module C bossPar 43You haven't finished this one yet.It uses Search forward, Find the next match, Find a character and Inside word.Module D bossPar 38You haven't finished this one yet.It uses Repeat a character search, Edit up to a search, Find a character backward, Delete without replacing a copy and Find the next match.Module D bossPar 38You haven't finished this one yet.It uses Repeat a character search, Edit up to a search, Find a character backward, Delete without replacing a copy and Find the next match.Module D bossPar 32You haven't finished this one yet.It uses Repeat a character search, Edit up to a search, Find a character backward, Delete without replacing a copy and Find the next match.Module E bossPar 54You haven't finished this one yet.It uses Select the next match, Repeat a change, Visual block, Visual selection (V), Replay a macro and Repeat the last macro.Module E bossPar 50You haven't finished this one yet.It uses Select the next match, Repeat a change, Visual block, Visual selection (V), Replay a macro and Repeat the last macro.Module E bossPar 47You haven't finished this one yet.It uses Select the next match, Repeat a change, Visual block, Visual selection (V), Replay a macro and Repeat the last macro.Module + bossPar 84You haven't finished this one yet.It uses Inside tag, Around tag, Change a number, Keep the last yank and Put copied text.Module + bossPar 80You haven't finished this one yet.It uses Inside tag, Around tag, Change a number, Keep the last yank and Put copied text.Module + bossPar 79You haven't finished this one yet.It uses Inside tag, Around tag, Change a number, Keep the last yank and Put copied text.

Task

File: src/api/client.tsshop/http_client.pydeploy/crontabsrc/cli/report.jscli/report.pydrafts/shipping-update.txttest/e2e/services.tstests/services.pydocker-compose.ymlsrc/store/cartSlice.tsstore/cart.pyrelease/checklist.txtsrc/config/defaults.jsshop/dev_settings.py.env.examplesrc/components/EmptyState.jsxtemplates/emails/order_shipped.htmlpublic/maintenance.html

Tidy up the client. Retry 5 times instead of 3, export the RequestOptions type, add the comment // Retry only when the server fails. above the for loop, and drop the trailing comment on the sleep call.Tidy up the client. Retry 5 times instead of 3, add the comment # Retry only when the server fails. above the for loop, comment out the print in it with # , and drop the trailing comment on the time.sleep call.Allow 5 attempts instead of 3, add the comment # Paused until the new payment provider is live. above the payment retry job, comment out that job with # , and drop the trailing comment on the reindex job.Rename the export argument to path, and exportFile to path both times the action uses it. Make the help for --since Only orders on or after this day. and the empty message No orders this period.Rename the export argument to path, in the decorator, the signature and the open call. Make the help for --since Only orders on or after this day., and make the empty message No orders this period.Call it a package, not a parcel, all three times. Make the delivery time two to four working days, and drop really from We really hope.Move to the next database and cache images, postgres:17-alpine and redis:8-alpine, and use the password s3cret for Postgres and in the database URL.Move to the next database and cache images, postgres:17-alpine and redis:8-alpine. Use the password s3cret in DB_PASSWORD and in DATABASE_URL, and give the pool 10 connections.Move to the next database and cache images, postgres:17-alpine and redis:8-alpine, and use the password s3cret in the app's DATABASE_URL and in POSTGRES_PASSWORD.Remove updatedAt from the initial state and its two assignments in the reducers. Also delete the comment at the end of the existing.quantity line.Remove updated_at from the initial state and its two assignments in the handlers. Also delete the comment at the end of the existing["quantity"] line.Lena is away this week. Take her off the reviewers, and delete her two steps. Also drop the note at the end of the changelog step.Rename the three APP_ settings to SHOP_, comment out the two payment keys with // , wrap the three values from env in Number(), and delete the feature flags with their comment.Rename the three APP_ settings to SHOP_, comment out the two payment keys with # , wrap the three os.environ.get values in int(), and delete the feature flags with their comment.Rename the three APP_ settings to SHOP_, comment out the two payment keys with # , quote the three mail values, and delete the feature flags with their comment.Update the copy. Make the heading say Nothing matches these filters, take the <strong> off clear the filters, make the icon size 64, and make the link say Visit the shop.Update the email. Make the truck 64 wide, make the heading say Good news: it's on its way, take the <strong> off express shipping, and make the order link say Track your parcel.Update the page. Make the logo 160 wide, take the <b> off about an hour, and make the two links say Shopfront Status and contact support.

The change to makeMake lines 2, 5 and 22 read like this and add a line above line 13Make lines 6, 16 and 20 read like this and add a line above line 15Make lines 4, 13 and 16 read like this and add a line above line 14Make lines 10–11, 13–14 and 17 read like thisMake lines 11–12, 14–15 and 20 read like thisMake lines 7, 9, 11, 13 and 15 read like thisMake lines 4, 7, 12 and 22 read like thisMake lines 3, 5–6, 8 and 14 read like thisMake lines 7, 13, 16 and 21 read like thisMake lines 3 and 12 read like this and delete lines 16 and 20Make lines 4 and 10 read like this and delete lines 13 and 18Make lines 2 and 7 read like this and delete lines 8 and 13Make lines 5–7, 10–11 and 13–15 read like this and delete lines 16–20Make lines 4–6, 9–10 and 12–14 read like this and delete lines 16–19Make lines 4–6, 13–14 and 17–19 read like this and delete lines 21–24Make lines 9–10, 20 and 23 read like thisMake lines 4–5, 7 and 9 read like thisMake lines 8, 10 and 13–14 read like this

2Now: const MAX_RETRIES = 3;
2Should read: const MAX_RETRIES = 5;
⋯Lines in between are left out.
5Now: type RequestOptions = { method?: string; body?: unknown; token?: string };
5Should read: export type RequestOptions = { method?: string; body?: unknown; token?: string };
⋯Lines in between are left out.
Should read: // Retry only when the server fails.
13Unchanged: for (let attempt = 1; attempt <= MAX_RETRIES; attempt++) {
⋯Lines in between are left out.
22Now: await sleep(RETRY_DELAY_MS * attempt); // back off a little more each time
22Should read: await sleep(RETRY_DELAY_MS * attempt);
6Now: MAX_RETRIES = 3
6Should read: MAX_RETRIES = 5
⋯Lines in between are left out.
Should read: # Retry only when the server fails.
15Unchanged: for attempt in range(1, MAX_RETRIES + 1):
16Now: print(f"{method} {path}, attempt {attempt}")
16Should read: # print(f"{method} {path}, attempt {attempt}")
⋯Lines in between are left out.
20Now: time.sleep(RETRY_DELAY_SECONDS * attempt) # back off a little more each time
20Should read: time.sleep(RETRY_DELAY_SECONDS * attempt)
4Now: MAX_ATTEMPTS=3
4Should read: MAX_ATTEMPTS=5
⋯Lines in between are left out.
13Now: 5 3 * * * /srv/shop/bin/retry-failed-payments --limit 50
13Should read: # Paused until the new payment provider is live.
Should read: # 5 3 * * * /srv/shop/bin/retry-failed-payments --limit 50
14Unchanged:
⋯Lines in between are left out.
16Now: 0 4 * * * /srv/shop/bin/reindex-products # takes about 20 minutes
16Should read: 0 4 * * * /srv/shop/bin/reindex-products
10Now: .argument("<export>", "Path to the orders export.")
11Now: .option("--since <day>", "Orders from this day.")
10Should read: .argument("<path>", "Path to the orders export.")
11Should read: .option("--since <day>", "Only orders on or after this day.")
⋯Lines in between are left out.
13Now: .action(async (exportFile, options) => {
14Now: const orders = JSON.parse(await readFile(exportFile, "utf8"));
13Should read: .action(async (path, options) => {
14Should read: const orders = JSON.parse(await readFile(path, "utf8"));
⋯Lines in between are left out.
17Now: console.log("No orders in this period.");
17Should read: console.log("No orders this period.");
11Now: @click.argument("export", type=click.Path(exists=True))
12Now: @click.option("--since", type=click.DateTime(formats=["%Y-%m-%d"]), help="Orders from this day.")
11Should read: @click.argument("path", type=click.Path(exists=True))
12Should read: @click.option("--since", type=click.DateTime(formats=["%Y-%m-%d"]), help="Only orders on or after this day.")
⋯Lines in between are left out.
14Now: def report(export, since, as_json):
15Now: with open(export) as handle:
14Should read: def report(path, since, as_json):
15Should read: with open(path) as handle:
⋯Lines in between are left out.
20Now: click.echo("No orders in this period.", err=True)
20Should read: click.echo("No orders this period.", err=True)
7Now: Good news: your parcel left our warehouse in Rotterdam today.
7Should read: Good news: your package left our warehouse in Rotterdam today.
⋯Lines in between are left out.
9Now: it should arrive within "three to five working days".
9Should read: it should arrive within "two to four working days".
⋯Lines in between are left out.
11Now: You can follow the parcel on the courier's site, or reply to this
11Should read: You can follow the package on the courier's site, or reply to this
⋯Lines in between are left out.
13Now: leave the parcel with a neighbour or at the nearest pickup point.
13Should read: leave the package with a neighbour or at the nearest pickup point.
⋯Lines in between are left out.
15Now: We really hope you enjoy your order.
15Should read: We hope you enjoy your order.
4Now: image: 'postgres:16-alpine',
4Should read: image: 'postgres:17-alpine',
⋯Lines in between are left out.
7Now: POSTGRES_PASSWORD: 'shop',
7Should read: POSTGRES_PASSWORD: 's3cret',
⋯Lines in between are left out.
12Now: image: 'redis:7-alpine',
12Should read: image: 'redis:8-alpine',
⋯Lines in between are left out.
22Now: database: 'postgres://shop:shop@localhost:5432/shop',
22Should read: database: 'postgres://shop:s3cret@localhost:5432/shop',
3Now: DB_IMAGE = "postgres:16-alpine"
3Should read: DB_IMAGE = "postgres:17-alpine"
⋯Lines in between are left out.
5Now: DB_PASSWORD = "shop"
6Now: DB_POOL_SIZE = 5
5Should read: DB_PASSWORD = "s3cret"
6Should read: DB_POOL_SIZE = 10
⋯Lines in between are left out.
8Now: CACHE_IMAGE = "redis:7-alpine"
8Should read: CACHE_IMAGE = "redis:8-alpine"
⋯Lines in between are left out.
14Now: DATABASE_URL = f"postgresql://{DB_USER}:shop@localhost:5432/shop"
14Should read: DATABASE_URL = f"postgresql://{DB_USER}:s3cret@localhost:5432/shop"
7Now: DATABASE_URL: postgres://shop:shop@db:5432/shopfront
7Should read: DATABASE_URL: postgres://shop:s3cret@db:5432/shopfront
⋯Lines in between are left out.
13Now: image: postgres:16-alpine
13Should read: image: postgres:17-alpine
⋯Lines in between are left out.
16Now: POSTGRES_PASSWORD: shop
16Should read: POSTGRES_PASSWORD: s3cret
⋯Lines in between are left out.
21Now: image: redis:7-alpine
21Should read: image: redis:8-alpine
3Now: const initialState = { items: [], couponCode: null, updatedAt: null };
3Should read: const initialState = { items: [], couponCode: null };
⋯Lines in between are left out.
12Now: existing.quantity += 1; // the product page adds one at a time
12Should read: existing.quantity += 1;
⋯Lines in between are left out.
16Now: state.updatedAt = Date.now();
⋯Lines in between are left out.
20Now: state.updatedAt = Date.now();
4Now: INITIAL_STATE = {"items": [], "coupon_code": None, "updated_at": None}
4Should read: INITIAL_STATE = {"items": [], "coupon_code": None}
⋯Lines in between are left out.
10Now: existing["quantity"] += 1 # the product page adds one at a time
10Should read: existing["quantity"] += 1
⋯Lines in between are left out.
13Now: state["updated_at"] = time.time()
⋯Lines in between are left out.
18Now: state["updated_at"] = time.time()
2Now: Reviewers: Priya, Tom, Lena (backend), Marco (mobile)
2Should read: Reviewers: Priya, Tom, Marco (mobile)
⋯Lines in between are left out.
7Now: - Ask Lena to sign off the payment changes.
8Now: - Write the changelog. (Tom has a draft)
7Should read: - Write the changelog.
⋯Lines in between are left out.
13Now: - Ask Lena to check the payment webhooks.
5Now: APP_ENV: 'development',
6Now: APP_PORT: 3000,
7Now: APP_URL: 'http://localhost:3000',
5Should read: SHOP_ENV: 'development',
6Should read: SHOP_PORT: 3000,
7Should read: SHOP_URL: 'http://localhost:3000',
⋯Lines in between are left out.
10Now: PAYMENT_API_KEY: 'sk_test_change_me',
11Now: PAYMENT_WEBHOOK_SECRET: 'whsec_change_me',
10Should read: // PAYMENT_API_KEY: 'sk_test_change_me',
11Should read: // PAYMENT_WEBHOOK_SECRET: 'whsec_change_me',
⋯Lines in between are left out.
13Now: TIMEOUT_MS: env.TIMEOUT_MS,
14Now: MAX_RETRIES: env.MAX_RETRIES,
15Now: POOL_SIZE: env.POOL_SIZE,
16Now:
17Now: // Feature flags
18Now: ENABLE_GIFT_CARDS: false,
19Now: ENABLE_NEW_CHECKOUT: true,
20Now: ENABLE_REVIEWS: false,
13Should read: TIMEOUT_MS: Number(env.TIMEOUT_MS),
14Should read: MAX_RETRIES: Number(env.MAX_RETRIES),
15Should read: POOL_SIZE: Number(env.POOL_SIZE),
4Now: APP_ENV = "development"
5Now: APP_PORT = 8000
6Now: APP_URL = "http://localhost:8000"
4Should read: SHOP_ENV = "development"
5Should read: SHOP_PORT = 8000
6Should read: SHOP_URL = "http://localhost:8000"
⋯Lines in between are left out.
9Now: PAYMENT_API_KEY = "sk_test_change_me"
10Now: PAYMENT_WEBHOOK_SECRET = "whsec_change_me"
9Should read: # PAYMENT_API_KEY = "sk_test_change_me"
10Should read: # PAYMENT_WEBHOOK_SECRET = "whsec_change_me"
⋯Lines in between are left out.
12Now: TIMEOUT_SECONDS = os.environ.get("TIMEOUT_SECONDS", "10")
13Now: MAX_RETRIES = os.environ.get("MAX_RETRIES", "3")
14Now: POOL_SIZE = os.environ.get("POOL_SIZE", "5")
12Should read: TIMEOUT_SECONDS = int(os.environ.get("TIMEOUT_SECONDS", "10"))
13Should read: MAX_RETRIES = int(os.environ.get("MAX_RETRIES", "3"))
14Should read: POOL_SIZE = int(os.environ.get("POOL_SIZE", "5"))
⋯Lines in between are left out.
16Now: # Feature flags
17Now: ENABLE_GIFT_CARDS = False
18Now: ENABLE_NEW_CHECKOUT = True
19Now: ENABLE_REVIEWS = False
4Now: APP_ENV=development
5Now: APP_PORT=8000
6Now: APP_URL=http://localhost:8000
4Should read: SHOP_ENV=development
5Should read: SHOP_PORT=8000
6Should read: SHOP_URL=http://localhost:8000
⋯Lines in between are left out.
13Now: PAYMENT_API_KEY=sk_test_replace_me
14Now: PAYMENT_WEBHOOK_SECRET=whsec_replace_me
13Should read: # PAYMENT_API_KEY=sk_test_replace_me
14Should read: # PAYMENT_WEBHOOK_SECRET=whsec_replace_me
⋯Lines in between are left out.
17Now: SMTP_HOST=localhost
18Now: SMTP_PORT=1025
19Now: MAIL_FROM=orders@shopfront.dev
17Should read: SMTP_HOST="localhost"
18Should read: SMTP_PORT="1025"
19Should read: MAIL_FROM="orders@shopfront.dev"
⋯Lines in between are left out.
21Now: # Feature flags
22Now: ENABLE_GIFT_CARDS=false
23Now: ENABLE_NEW_CHECKOUT=true
24Now: LOG_LEVEL=debug
9Now: <h2 className="empty-title">No matching orders</h2>
10Now: <p>Try another date range, or <strong>clear the filters</strong> to see everything.</p>
9Should read: <h2 className="empty-title">Nothing matches these filters</h2>
10Should read: <p>Try another date range, or clear the filters to see everything.</p>
⋯Lines in between are left out.
20Now: <InboxIcon size={48} aria-hidden="true" />
20Should read: <InboxIcon size={64} aria-hidden="true" />
⋯Lines in between are left out.
23Now: <p className="empty-hint">Want to see one? <Link to="/shop">Place a test order</Link></p>
23Should read: <p className="empty-hint">Want to see one? <Link to="/shop">Visit the shop</Link></p>
4Now: <img src="{{ cdn_url }}/email/truck.png" width="48" alt="" />
5Now: <h1>Your order has shipped</h1>
4Should read: <img src="{{ cdn_url }}/email/truck.png" width="64" alt="" />
5Should read: <h1>Good news: it's on its way</h1>
⋯Lines in between are left out.
7Now: <p>We sent it with <strong>express shipping</strong>.</p>
7Should read: <p>We sent it with express shipping.</p>
⋯Lines in between are left out.
9Now: <a href="{{ order_url }}">See your order</a>
9Should read: <a href="{{ order_url }}">Track your parcel</a>
8Now: <img src="/logo.svg" width="120" alt="Shopfront" />
8Should read: <img src="/logo.svg" width="160" alt="Shopfront" />
⋯Lines in between are left out.
10Now: <p>We're upgrading the shop. It should take <b>about an hour</b>.</p>
10Should read: <p>We're upgrading the shop. It should take about an hour.</p>
⋯Lines in between are left out.
13Now: <a href="https://status.shopfront.dev">our status page</a> for updates,
14Now: or <a href="mailto:help@shopfront.dev">email us</a> if it's urgent.
13Should read: <a href="https://status.shopfront.dev">Shopfront Status</a> for updates,
14Should read: or <a href="mailto:help@shopfront.dev">contact support</a> if it's urgent.

0keys

Keyboard shortcuts
Ctrl+Enter
Check the result
Ctrl+Alt+U
Undo the last change
Ctrl+Alt+H
Show the next hint
Ctrl+Alt+R
Start this task again
Ctrl+Alt+K⌃⌥K
Show the keyboard shortcuts
Ctrl+Alt+F⌃⌥F
Turn focus mode on or off
Ctrl+Alt+S⌃⌥S
Open the editor settings
Enter
Go on to the next step after you finish

The Ctrl+Alt shortcuts don't clash with Vim's own keys. On a Mac, use Control and Option.

Your textVim mode: Normal

Results are saved in this browser and decide what comes up next. They never change your course progress.