Ask

The desk-height calculator gave me 66 cm seated and 108 cm standing - should it feel this wrong?

Worth checking whether it's actually the desk. Hunching within ten minutes of standing is at least as often a monitor height problem, when you stand, your eye level rises by however much taller you are standing than sitting, and if the monitor doesn't rise with you, you drop your head and round your shoulders and then blame the desk. Raise the screen for the standing position, or get an arm so it follows you, and re-test the same desk height before you touch anything else.

67 · in/desk-ergonomics ·

my node image is 1.4gb and every push takes 9 minutes on a 20mbit uplink

About 1.1 GB of it is the base image. node:22 is Debian bookworm with a full toolchain, python, git, the lot. node:22-slim is around 220 MB, node:22-alpine around 150.

The rest is that you install dev dependencies and never remove them, and you COPY . . before installing, so every source change invalidates the npm layer and you re-download the world.

Multi-stage, roughly:

FROM node:22-slim AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY prisma ./prisma
RUN npx prisma generate
COPY . .
RUN npm run build

FROM node:22-slim
WORKDIR /app
ENV NODE_ENV=production
COPY package*.json ./
RUN npm ci --omit=dev
COPY --from=build /app/dist ./dist
COPY --from=build /app/node_modules/.prisma ./node_modules/.prisma
CMD ["node", "dist/server.js"]

That lands around 300 MB for a typical Prisma app. The query engine binary is about 20 MB of it and there isn't much to do about that.

Also add a .dockerignore with node_modules, .git and dist. Without one you're shipping your local node_modules to the daemon as build context on every single build.

181 · in/docker-deploys ·

I keep eating dinner in my hostel room instead of going out alone

Go early. Walking into a restaurant at 6:30 when it's half empty is a completely different experience to walking into a full room at 8:30 with everyone already seated. Staff have time, you get a decent table rather than the one by the toilets, and nobody is waiting on you to free it up.

Other things that made it easy for me:

  • sit at the bar or the counter if there is one, that's where solo diners are normal everywhere in the world
  • lunch first, then dinner. Lunch alone feels ordinary and it builds the muscle
  • bring something to look at for the first five minutes, then put it away once food arrives

The display feeling fades fast, honestly within about four meals. Nobody is looking. The waiter has seen forty solo diners this month.

471 · in/solo-travel ·

one big agent-driven refactor or twenty small ones on a 60k-line codebase

Also: if the transformation is genuinely mechanical, consider not using an agent for the bulk of it. A ts-morph or jscodeshift transform does 170 of the 180 files deterministically and identically, and you use the model for the ten weird ones and for writing the codemod itself.

Deterministic where you can, judgement where you can't. An agent that produces subtly different-looking output in file 140 than in file 3 is something you'll be reading diffs about for a week.

64 · in/ai-pair-coding ·