From Concept to Implementation

"I know I need a shopping cart. I have no idea how to implement one." The loop that derives code from behaviour, the difference between implementation and engineering, and the principle: make the thing smaller until you reach something you know how to build.

I Know What I Need, But I Don't Know How to Build It
▶ lab

"I know I need a shopping cart. I have no idea how to implement a shopping cart." The gap is not a missing library or a missing tutorial; it is that "cart" has not yet been turned into state, operations and rules. Once it has, the code is short.

Q · You know exactly which feature you need and you cannot write its first line. What is actually missing, and what do you do in the next hour instead of searching for code?
The Implementation Loop
▶ lab

I need X → what is X → what information → what can happen → what rules → what examples → how to represent → which data structure → what each operation does → pseudocode → one operation → tests from the examples → edge cases → integrate. Fourteen steps, and code is the eleventh.

Q · You have a concept in English and you want an implementation you can defend. What is the sequence of steps from the one to the other, and which step are you actually on?
Implementation Is Not Engineering
▶ lab

"How do I make a cart add items?" is an implementation question. "Where is the cart stored, synchronised, validated, secured, scaled?" is an engineering question. Conflating them is why beginners are stuck at both.

Q · You are asked to "build the cart" and the questions in your head range from "how do I add an item" to "what if two tabs add at once". Which of those are the same problem, and which should be answered first?
Programming, Design, Engineering

Three questions, three levels: can I make it work (programming), can I structure it clearly (design), can it operate in a real system (engineering). The domain's three stages — Discover, Implement, Engineer — and the fuller path Discover → Model → Implement → Engineer → Operate.

Q · You have been "learning to code" for months and still cannot build the feature you want. Which level are you actually stuck at, and what does each level need from the one below it?
Make It Smaller Until You Know How to Build It
▶ lab

If you do not know how to build the thing, make the thing smaller until you reach something you do know how to build. Cart → addItem → find the existing item → loop through the collection → compare two ids. The last one you can write; build back up from there.

Q · You are stuck on a thing you cannot build and every attempt starts from the top. How do you find the size at which you *can* build it, and how do you get back up to the thing you needed?
Build, Encounter, Learn, Return

Build the feature; hit a gap; take the one focused lesson; practise the primitive; return to the feature. Against the other order — learn HTML, CSS, JavaScript, React, Node, SQL, and eventually build something — which teaches everything except how to build the thing you wanted.

Q · You want to build a cart and you do not know enough. Do you learn first and build later, or build first and learn what stops you — and what does each order actually produce after a month?