Christopher Okhravi

Stop Optimizing The Wrong Things.

Knuth famously said that “programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs”. That we should “forget about small efficiencies, say about 97% of the time.”

It was relevant in 1974, and just as relevant in this age of vibe coding.
Don’t obsess over performance before you know where it matters.
Computers are fast.
What we need is not micro-optimization.
We need simplicity and the ability to change direction fast.

Optimize for:
⏵ Solving the right problem.
⏵ Shipping value.
⏵ Keeping your solutions malleable enough to pivot.

Products don’t fail because a loop is 3% too slow. They fail because nobody needs them.

Yes, performance can matter. But only after you’ve measured and learned where it matters.

Build for learning. Build for change. Then — and only then — possibly optimize.

📕 Download my book! It deals with writing changeable software.
Link in the comments.

4 months ago | [YT] | 77



Every engineer should print this out and tape it to their forehead for a week.

4 months ago | 2  

@gregorymorse8423

In the AI era, most achievements are coming from micro optimizing at the hardware level. Generally, micro optimizing is a physical aspect that by and large is hidden behind libraries so that indeed it isnt needed for most software. Its interesting how physical details of hardware can really add serious complexity to a design as now you have taken something elegant and conceptual and attached it to practical and physical. Ideally compilers should do all micro optimizations for you anyway though I dont think they are quite that good.

4 months ago | 0  

@ChristopherOkhravi

Download the book here: 
👉theobjectorientedway.com/

4 months ago | 0

@virajsurve6462

A big fan sir

4 months ago | 0  

@SkitzFist1

I would say performance always matters. If you have great product in all senses except that it's slow, a neferior product that is faster will probably beat it. We've seen that multiple times already. Especially in today's society when users expect instant responses. I agree with don't spend time optimizing were it won't yield any results. But so many programmers and teams interpret this as: optimization is bad, don't ever do it. I don't know how many teams and collaborations where people had this mindset. The absolute worst is the mindset of "we can optimize it later". The absolute biggest optimization comes from the architecture, which is extremely hard to change a few years in. I've seen it so many times, and it just keeps repeating. Garbage product with garbage code. I was part of a team who made slot games who had this exact mindset. They thought it was fine for a very simple slot game to take 20 seconds to load. Absolute dogshit.

4 months ago | 1