Capstone build: design and core
Design Spendwise and build its service and storage layers.
Today’s outcome
- Explain the central idea in your own words.
- Predict the behavior of a small example before running it.
- Finish the acceptance checklist with the real Go toolchain.
Turn the week into a program
Go rewards a small number of ideas applied consistently: keep ownership clear, make failure explicit, and prefer code whose behavior is easy to test. Today’s focus is capstone build: design and core. Begin by connecting it to code you already understand, then isolate one behavior at a time.
Design Spendwise and build its service and storage layers. Read the example slowly. Predict the result before running it, name the rule that produced it, and change one input. That short loop turns documentation into working knowledge.
If an example looks obvious, close it and reproduce it from memory. The gap between recognizing code and writing it is where the useful practice lives.
Use the toolchain as feedback
Format early, run focused tests, and read the complete failure before editing. Go’s compiler and standard tools are part of the learning environment. A short, repeatable loop beats a large untested change.
Try · predict before you run
package main
import "fmt"
func main() {
fmt.Println("Capstone build: design and core")
}// Make the smallest behavior observable.
// Then add one edge case and run it again.// Local workflow
// gofmt -w .
// go test ./...
// go vet ./...Check the model
Quick review
Score 70% or higher. Your best score is saved.
Make it yours
Project checklist
Design Spendwise
warmupWork locally, run go test ./..., and mark this when the corresponding checks pass.
Hint
Write the smallest example first. Use its result to decide the next case.
Service and storage layers
coreWork locally, run go test ./..., and mark this when the corresponding checks pass.
Hint
Write the smallest example first. Use its result to decide the next case.
API handler skeleton
stretchWork locally, run go test ./..., and mark this when the corresponding checks pass.
Hint
Write the smallest example first. Use its result to decide the next case.
Reflect
What clicked? What still feels fuzzy?