How Would You Make It?

“Mukesh was trying to write the perfect, most performant solution from day one, jumping straight to “optimal” without first getting “correct.”

So one day, I pulled him aside. I said:
“Look, forget everything you know about perfection for a second. Try this instead: ‘Make it work. Make it right. Make it fast.” (this is from Kent Beck, btw, top tier advice)

I broke it down for him like this:

1. Make it work – First, solve the problem. Doesn’t matter how messy the code is, just get it working end-to-end. Prove you understand the requirements.

2. Make it right – Now that it works, clean it up. Refactor for readability, structure, maintainability. Make it easy for others to understand.

3. Make it fast – If and only if performance is a blocker, then optimize. But never at the cost of clarity.”

via Rajya Vardhan Mishra
https://www.linkedin.com/posts/rajya-vardhan_a-few-years-ago-i-had-a-junior-engineer-activity-7328771895821029376-QJNR