Kwok (@kodemojo) header
Kwok (@kodemojo) profile picture

Senior engineer and AI enthusiast. I mentor developers to build, ship, and operate production-grade systems.

Joined March 2024
Photo by Kwok (@kodemojo)Photo by Kwok (@kodemojo)Photo by Kwok (@kodemojo)Photo by Kwok (@kodemojo)
Experience gives perspective. Programming is not dead, and never will be. It's late September 2026. Sometime in September 1976, just after I entered college, I wrote and ran my first serious program. I have now been a programmer for literally 50 years. And man, I have seen it *all*. Punched cards to glass ttys on minicomputers to workstations to the earliest micros. I've written business software, communication programs, development tools, games, language implementations, kernel device drivers, graphics libraries, a few critical pieces of infrastructure, and all manner of odd programs for which there is no taxonomy. Coded in a score of languages some of which are now forgotten. I've run over 70 open-source projects and contributed to at least as many more. Along the way I noticed a few things, and wrote about them, and that made me famous. But I'm not here to write about that today. I'm here to write about what it means to be a programmer and a technologist with the Singularity upon us. I have lost count of the number of times I have been told "programming is over". You kids may think this is a new claim that came into the world with LLMs. Hah! There's been that kind of talk at every step function in the quality of our programming tools. I first heard it when compilers were replacing hand-hacked assembler in the early 1980s, and I wouldn't be a bit surprised if somebody said it earlier when in-memory code replaced plugboards. One constant amidst all this change is that the intentions in a user's head do not magically turn into executable instructions that a computer can run. Another constant is the mindset of the people who specialize in bridging the gap between wish and algorithm. A programmer is a programmer is a programmer - the tools are secondary. "But it's different this time!" some people will say, "AIs are superhuman now!" So? What did you think the optimization stage of a compiler was, chopped liver? We've been relying on tools that exceeded human capabilities all along - we built them precisely because our meatbrains could not otherwise keep up with the demands of the job. It's been a hell of a ride, that 50 years. I've succeeded and failed and succeeded again. Done a lot of work I'm proud of. Built at least a few things that look like they're going to last. None of that goes away because, hypothetically, an AI might have made me faster. The work is never done, even if the tools can talk to us now. Because intentions still have to be communicated; people who specialize in that and develop right mindset to do it still have a major advantage over people who don't. If you're feeling depressed because you spent years or decades developing hand-coding skills that are obsolete now? Buck up. You still have the most important asset - a mind that knows how to think that way. I'm facing the winds of the Singularity with a smile. Because 50 years and I'm still standing - still shipping code that people can use, still learning, still refusing to be paralyzed by the pace of change. The best therapy for your uncertainty? Get to work on something.
137
582
98
3,036
187,485
Kwok retweeted
You need better percentiles. Average latency tells you what usually happens. P99 tells you where users start waiting, refreshing, complaining, and sending screenshots. Averages are for reports. P99 is for product reality. 6 steps to improve P99: 1. Measure end to end 2. Split the request into timed sections 3. Look at distribution 4. Group by endpoint, tenant, region, device, cache hit 5. Remove the biggest tail source 6. Alert on P99 after deploys Do this before adding more servers.
1
1
3
64
Kwok retweeted
8 steps to design interfaces that help teams move faster: 1. Start with the caller’s mental model 2. Define the job in one sentence 3. Make the common path obvious 4. Hide decisions, expose intent 5. Make failure behavior clear 6. Keep naming consistent 7. Document the why 8. Change promises carefully
1
1
4
68
Kwok retweeted
Resource starvation does not always look like a crash. Sometimes the system is still up. Requests are still arriving. Threads are still busy. But nothing is really moving. 5 mistakes architects should catch early: 1. Unlimited workers 2. Shared pools with no budget 3. Locks held for too long 4. Retries that create more work 5. No backpressure before the database Alive is not the same as healthy.
1
3
41
Kwok retweeted
Least privilege is easier to apply when you keep this in mind: 1. Permissions tend to expand over time 2. Temporary access often stays longer than intended 3. Roles almost never reduce themselves 4. Leaked tokens inherit all granted permissions 5. Cleanup requires deliberate action
1
1
4
86
Kwok retweeted
7 NFR questions worth asking before the diagram: 1. How fast? 2. How much traffic? 3. How available? 4. What needs protection? 5. How reliable? 6. How easy to change? 7. How will we observe it? That list saves a lot of rework.
1
6
98
Kwok retweeted
A useful API error format usually includes: 1. Status code 2. Stable error code 3. Short human message 4. Field or resource involved 5. Safe reason 6. Suggested next step 7. Request ID 8. Docs link when needed Do not make clients investigate. Give them enough clues to recover.
1
3
63
Kwok retweeted
Legacy code is not just code. It is old business rules. User habits. Report quirks. Vendor workarounds. Tiny guards added after past incidents. Some of them looks silly until you remove it. Then suddenly everyone remembers why it existed.
1
1
2
58
Kwok retweeted
The future is not always microservices. A bad monolith is code where everything knows everything. A modular monolith is one app with clear internal boundaries. Microservices do not fix unclear ownership. They reveal it. Clean modules first. Separate services later. Start with boundaries, not repos. A module should own behavior, rules, tests, and a small API. Split too early, and you get distributed confusion. Split at the right time, and you get freedom.
1
1
3
63
Kwok retweeted
Fast-growing developers do not rush straight into code. They ask better acceptance questions first. Because acceptance criteria are not paperwork. They are how the team agrees on what "done" actually means. Before you build, ask: What should the user be able to do? What should never happen? Which edge cases matter? How will we know it works? One good question upfront can save hours of rework later.
2
1
3
55
Kwok retweeted
Legacy code is not always the enemy. Sometimes it is just old code that still pays the bills. The real mistake is turning modernization into a heroic rewrite. That creates years of risk before users see value. Better architecture is patient. Small slice. Real traffic. Safe rollback. Then the next slice.
1
2
45
Kwok retweeted
You do not need more logs. You need logs that can talk to each other. A correlation ID is the tiny thread that ties one request across your API, services, jobs, queues, and workers. Without it, every log is just standing alone saying, "not my problem."
2
1
4
78
Kwok retweeted
Feature flags are not just toggles. They are temporary architecture. Give each one a clear name. Assign an owner. Watch the rollout. Remove it when it has done its job. The value is not the flag. It is the control it gives you.
1
3
36
Kwok retweeted
Concurrent code does not care that it worked once. One passing run proves very little. Thread safety means the code stays correct no matter how the timing changes. That is why counter++ can be dangerous. It looks like one action, but it can be several. One thread reads the value. Another thread reads the same value. Both write back based on old information. Now your count is wrong, and nothing looks broken at first glance. Shared mutable data needs rules. Use a lock when a group of actions must stay together. Use an atomic value when one small update needs protection. Use a queue when work needs one clear lane. And do not forget visibility. One thread can write a value that another thread does not see yet. Normal tests often miss these bugs because the timing has to be just wrong enough. So run concurrent code many times. Test it under load. Ask: "Can two things touch this at the same time?" Then ask: "What rule protects the truth?" Because the CPU does not care about your happy case.
1
1
2
46
Kwok retweeted
7 secrets management tips: 1. Keep secrets out of Git 2. Use a vault 3. Give each service its own key 4. Rotate before panic 5. Log access 6. Never print secrets 7. Make ownership obvious
1
1
2
49
Kwok retweeted
Not scaling hurts. You see lag grow, users wait, and teams start refreshing dashboards like the answer will magically appear. But scaling blindly hurts more. You add capacity without understanding what is actually breaking. The better move is simple: Ask better questions first. Then scale with evidence.
1
1
2
29
Kwok retweeted
7 benefits of canary releases for junior devs: 1. Smaller release bets 2. Faster feedback from real users 3. Earlier bug detection 4. Easier rollback decisions 5. Less pressure during deployment 6. Better habits around monitoring 7. A clearer sense of production ownership Small rollout first. Big rollout later.
1
1
1
55
Kwok retweeted
5 quick I/O rules senior devs quietly use: 1. Waiting is still work your system must pay for. 2. Blocking code is often easier to read. 3. Non-blocking code can serve more waiting clients with fewer threads. 4. Async flow can be harder to debug. 5. The best choice depends on load, latency, and team skill.
2
1
3
134
Kwok retweeted
Reliability is hard to learn at first. There are targets, dashboards, incidents, release pressure, and senior engineers throwing acronyms around. But one question helps you cut through the noise: "How much error budget is left?" It is simple. It shows you are thinking about risk, not just code. And it helps the team decide what should happen next.
1
2
16
Kwok retweeted
Newer developers often make the same mistakes in legacy code: 1. They rename things too early. 2. They delete branches that seem unused. 3. They trust comments more than behavior. 4. They refactor too many things at once. 5. They write tests after changing the code. Characterization tests flip the order. First, observe what the system actually does. Then make the change.
1
3
39