Reading code is a skill too — and it's the one beginners never practise.

Most beginner advice is about writing code — which language, which tutorial, which first project. Very little of it is about reading code, even though reading is most of what you actually do once you join a team, open a library, or come back to your own code from a month ago.

It's also the skill almost nobody drills on purpose, which is why unfamiliar code feels like a wall.

Here's a routine for practising it deliberately.

Start with the shape, not the lines. Before reading a single statement, answer two questions: what does this take in, and what does it give back? Find the entry point — main, a function signature, a route handler — and read only that. You get a map before you get details.

Follow one path end to end. Pick the most common input and trace just that. Ignore every branch that doesn't apply to it. Trying to hold all the branches in your head at once is how you drown; following one happy path gives you a spine to hang the rest on.

Summarise each chunk in your own words. When you finish a block, write one line — in a comment or a scratch note: "this validates the input", "this turns rows into objects". If you can't summarise it, you haven't understood it yet. That's information, not failure.

Change one thing and predict the result. The real test of whether you understood code isn't nodding along, it's whether you can predict the effect of an edit. Add a print, change a constant, delete a line — guess first, then run it.

Then rewrite it small. Take a 40-line function you just read and reproduce it in 10 lines that do the same job. You'll find out which parts were essential and which were noise.

The habit underneath all of it: keep a running "what I think this does" note while you read. It's the reading version of writing your steps in plain English before you code — it forces the vague to become specific.

What's the last bit of code that made you feel lost? Was it a language feature, missing context, or just size? Curious which one trips people up most.

reddit.com
u/NoDepartment772 — 3 days ago

You're probably skipping the error message. Read it in this order instead.

Half the bugs people get stuck on here aren't actually mysterious — the error already told them what was wrong. What's missing is the habit of reading it properly before touching the code. Most of us (me included) see red text and immediately start changing random lines, which is how one small bug quietly turns into three.

Here's the order that actually works.

Read the whole message, top to bottom, before doing anything. The first line says what kind of problem it is. The last line usually says where — a file and a line number. Treat that line number as the address of the bug, not a hint.

Open that line, and the line just above it. A crash reported on line 40 is very often line 39 handing it bad data.

Put the message into plain words. TypeError: cannot read properties of undefined (reading 'name') is really just "you tried to read something that doesn't exist yet." In plain words, you can start guessing why.

Change one thing at a time, then run it again. If you edit five lines and it suddenly works, you've learned nothing and the next bug will eat you alive. One change, one run, tells you what actually fixed it.

Two smaller habits that save a lot of time: print the values right before the line that breaks (half of debugging is the gap between what you assumed a variable holds and what it actually holds), and shrink the problem — delete code until you're left with the smallest version that still fails. A bug in ten lines is far easier to see than the same bug buried in two hundred.

And the part nobody says out loud: an error isn't a verdict on you. It's the computer telling you exactly where it got confused. Read it like a note, not a red card.

What error took you the longest to figure out? Drop it below and I'll help you read it.

reddit.com
u/NoDepartment772 — 4 days ago

Stuck because you understand the syntax but don't know where to start? Write the steps in plain English first.

A wall I see described here a lot (and it's a really common one): you get functions, variables, loops — but hand yourself an empty problem and your mind goes blank. That gap usually isn't about syntax. It's about decomposition: turning "make X work" into an ordered list of small actions.

Here's the routine that closes it:

  1. Before writing any code, write the solution as numbered steps in plain English. One action per line. No syntax, no language, just what needs to happen, in order.
  2. Say what goes in and what comes out. Input, output, and the transformation between them. A lot of "I don't know where to start" is really "I haven't decided what the thing takes and returns yet."
  3. Translate one line at a time. Each English step becomes a few lines of code. If a step needs more than ~5 lines, it isn't small enough — split it.
  4. Trace it by hand with the smallest possible input before you run it. Most logic bugs show up on paper.

Tiny example — "check if a number is even":

  • English: (1) get the number, (2) divide by 2 and look at the remainder, (3) if the remainder is 0 print even, otherwise print odd.
  • The code is now almost mechanical, and if it breaks you know exactly which step to look at.

The deliberate-practice part: for the next week, when you get a problem, force yourself to spend the first few minutes ONLY writing the numbered steps. No editor. It feels slow and pointless at first — which is exactly why most people skip it and stay stuck.

Curious what clicked for others: pseudocode, flowcharts, or something else? And if you're stuck on a specific problem right now, drop it in the comments and I'll help break it down.

reddit.com
u/NoDepartment772 — 5 days ago