One of the most frustrating aspects of programming is working on a solution to a problem and bumping up against something that we should know how to do or be able to figure out how to do, but we’re unable to do so.
There’s probably a proper psychological term for this or an acronym given that I’m talking about programmers. 🤷🏻♂️
Case in point:
Let’s say that I’m working on a project and it has to make an Ajax request. I get the response, I display it, and I also cache the response for 24 hours.
If the user requests the information again, I pull it from the cache, and it looks fine. But what about whenever you’re the first person to hit it in the next 24 hours?
That is, you get a cache-miss, and then you get not only a longer-than-normal request, but you also get a response that needs some additional processing before rendering it to the user?
Reading this, you’ve likely got a laundry list of things you’d try to do. And I’d venture to say that everything you’re thinking is likely worth trying if not right.
Ultimately, that’s proving my point. And that’s this: When you’re not as close to the problem, it’s easier to find a solution.