All posts
JavaScript Basics #3 Control Flow
if/else, while, for, for...of, for...in, switch — JavaScript's branching and looping syntax, plus the gotchas and idioms you'll meet often.
JavaScript Basics #2 Variables and Types
How to choose between let/const, JavaScript's 8 primitive types, the difference between primitive vs reference, and the common pitfalls of type conversion.
JavaScript Basics #1 Getting Started and Setup
From where JavaScript runs to building a modern dev environment with Node and Vite and running your first piece of code — all in one place.
Go Practice #6 Testing and Deployment — httptest and Docker
Handler tests with httptest, integration test patterns, Docker multistage builds, and a small operations checklist.
Go Practice #5 Middleware Patterns
Standard middleware built from chains of http.Handler adapters — logging, auth, panic recovery, request ID, CORS.
Go Practice #4 DB Integration — database/sql and Transactions
database/sql basics, prepared statements, transactions, and connection pool tuning. Plus higher-level tools like sqlc, sqlx, and GORM.
Go Practice #3 JSON I/O and Input Validation
Marshal/Unmarshal in encoding/json, struct tags, decoding error handling, and patterns for safe input validation.
Go Practice #2 Routing — Go 1.22+ ServeMux
Method/pattern matching in the standard ServeMux from Go 1.22+. Where external routers like chi or gorilla/mux still fit.
Go Practice #1 First HTTP Server
The smallest server, started with the single net/http package. ListenAndServe, HandleFunc, ResponseWriter, and graceful shutdown.
Go Advanced #7 Code Generation — go generate and stringer
A path that avoids reflect's runtime cost — compile-time code generation. The go generate workflow, plus tools like stringer and mockgen.
Go Advanced #6 Profiling — pprof and benchmark
Measuring CPU, memory, and goroutine profiles with go test -bench and pprof. Addressing performance with measurement instead of guesswork.
Go Advanced #5 unsafe and cgo — Outside the Safe Zone
unsafe.Pointer's four rules, cgo's tradeoffs, and why both should almost never be used.