Senior Programmer Cycle

For students

How a senior programmer thinks

A senior does not start by typing. They see the whole feature, make one piece clear, build it, then look at the whole again. Typing code is the result of that thinking. The tools change. The way of thinking does not.

  • React
  • Java
  • Mobile
  • REST
  • Databases
  • Python
A colourful loop of light around a thinking silhouette on a starfield: teal Presence (broad) at the top, magenta Representation (narrow) at the right, and gold Return (broad) at the bottom.
Broad, narrow, broad again: one round of attention.

One round, three moves

Every feature goes through the same round. The round ends by looking at the whole again, and the next round starts from there.

Broad attentionTakes in the whole, in context, before naming it.
Narrow attentionIsolates, names, plans, manipulates.

The broad/narrow distinction is borrowed from McGilchrist; the underlying idea — that analytic attention can lose the whole it came from — is older than him and does not depend on brain anatomy.

Each attention mode has a characteristic failure, and the round is the correction.

1Broad attention · no typing

Presence

See the whole feature. Find what you do not know yet.

Failure: you skip it and start naming things you don't understand — or you stay broad and never name anything.

Feature
Say it in your own words. Do I really understand it?
Goal
What will be true when it works?
Mockup and skeleton
Sketch what the user sees and the rough shape of the solution.
Unknowns
Which parts look tricky, new or hard? Find them now, before you commit.
2Narrow attention · then type

Representation

Make one piece clear and workable, then build it.

Failure: you keep naming and building past the point where the piece is clear — the map gets richer than the territory. See When narrow attention takes over.

Names
Variable = name. Each thing gets a clear name.
Flow
How data and actions move from start to end.
Data model
What is stored, and what shape it has.
Tree or UML
The parts and how they connect.
Small steps
Break the work down. Pick one slice, the riskiest first.
Type the code
Only that slice. Verify it works.
3Broad attention again

Return

Put the piece back into the whole and check the whole.

Failure: you never come back — you polish the part and never check the whole.

Run it
Use the real thing, not only the code.
Compare
Check against the first sketch, not against the code.
New unknowns
What did the code teach you that the plan did not?
Update the picture
Rename, redraw, rewrite the goal where the code disagreed.
Next iteration. It starts from what Return showed you, with a sharper first picture.

Names run through all three moves. A confusing name usually points to a confusing design, so fix names early.

Any goal, same round

A goal can be a mockup, a REST endpoint, a CRUD database service or a machine-learning model. The language and the framework change. The three moves stay.

React · Mobile

A screen

Presence
One sentence for the behaviour, plus a sketch of the screen.Tap Add to cart, and the number in the header goes up.
Representation
Component tree, where the state lives, the names. Build one component.
Return
Tap through the running screen. Does it behave like the sketch?

Spring Boot · Node · Python

A REST endpoint

Presence
One sentence, plus one example request and response written by hand.POST /orders returns the order and its total.
Representation
Route, request and response objects, status codes, service layer. Build one route.
Return
Call it with curl or Postman. Does the answer match your example?

SQL · Any language

A CRUD database service

Presence
What is stored, who reads it, who changes it.A customer can be created, read, updated and deleted.
Representation
Tables, keys, queries, repository methods. Build create and read first.
Return
Run all four operations. Check the rows in the database against your sketch.

Python · pandas · scikit-learn

A classifier

Presence
Look at the data and the question. What are you trying to predict, and for whom?Will this customer renew next month, yes or no?
Representation
Features, the model, and the pipeline. Train one classifier.
Return
Check the metrics and the real predictions against the original question. Do the numbers answer it, or only look precise? Then check one prediction by hand against the real row.

Senior Reality

The round is how a senior thinks. This section is what that thinking runs through: other people, existing code, real limits, and the tools between typing and verifying. The three moves stay. The reality is what they meet.

Individual first, social always

The three moves describe one mind at work. Senior work is also done in front of, with, and for other people.

Review
Say which move you are in. "Is this the right shape?" is Presence. "Are these names right?" is Representation. "Does this match the sketch?" is Return. Without that frame, review becomes style, not design.
Pairing
One holds broad attention, one narrow — the round split across two heads. Swap roles on purpose.
Asking for help
Early asking is Return done with someone else: comparing your picture against theirs.
Writing for the next person
Names, tree, one-sentence goal — these are the handoff. Write the picture down so the next round can start without you.

Maintenance, not only building

Much senior work is the same round on code you did not write.

Presence
Read it, run it, reproduce the symptom. The feature is the behaviour as it is now.
Representation
Name the cause before you fix it. A fix without a named hypothesis is a guess with extra steps.
Return
Confirm against the original reproduction, not only the new test. Then check what else the change touched.
Refactor, fix, tune
Refactoring, bug fixes, performance work and hot fixes are still this round. The change may be small and the pressure high, but you still see the whole, name the change, then check the whole — including what the patch might have broken.

Functional first, non-functional before "done"

First iteration is about behaviour — does it do the thing? Correct. But Return is not finished at "it works."

Before done, ask
What happens at ten times the load? Who is allowed to do this, and where is it checked? What will you see when it breaks? What happens to data in the old shape? How do you roll back if it ships wrong?
Where it belongs
Not in Presence. At the end of Return — the whole checked against the real world, not the sketch.

Tooling, between typing and verifying

The guide jumps from "type the code" to "verify it works." The judgment lives in the gap.

The gap
Small commits with clear messages — history is the story of the round. Tests are Return written down so it runs again without you. CI is the round, automated; a red pipeline is Return saying the whole is not whole. Feature flags let you ship the code before the behaviour. Know the rollback before you deploy.
  • Version control
  • Tests
  • CI
  • Feature flags
  • Deploy & rollback

The one line to keep: the three moves are how a senior thinks. Senior Reality is what that thinking is for — other people, old code, real limits, and the tools that carry the work from your head to the running system.

When narrow attention takes over

Narrow attention is useful, and it forgets the whole. These three questions bring you back to broad attention.

Can you say in one sentence what should happen when someone clicks?

If not, you started from the technique and not from the feature.Go back to Presence

Does the running page behave like the first sketch?

A tree that looks right means little until someone has clicked through the real thing.Check again at Return

Which parts really need this tool?

Putting everything in one place because it works is how the tool becomes the goal.Rethink at Representation