![]() Whether a static class variable is faster than a methods static variable (which is important when you are talking about billions of hits a day). There are countless examples of people doing this every single day. They idea isn't to optimize blindly, but rather to use what you've learned in optimizing early projects to speed up development time, and performance, in future projects. If you ignore these practices until you hit a performance problem, you aren't using what you learned. What they fail to realize is, if they spend the time to benchmark their code, they can then employ what they learned from there in future projects. All too often people push off all optimization until later in the name of avoiding premature optimization. Regardless, I use that, and it makes sense. And while I'm sure the original definition of "Premature" was based on a linear timescale, I can't help but wonder if he didn't also mean to imply that "Mature optimization" is fine. "Premature optimization", not just "Optimization". ![]() There is no point in in just reading from disk, not caching, and waiting until you see problems to resolve it. For example, reading from cache verse reading from disk. However, there are things we can count on, where we don't need to test. Well, see, then it's not a significant difference. And as always: less code means less bugs. It is also in my experience that the alternative: duplicating code and logic, causes more problems. It is my experience that as long as your programmers realize this (coding standard, meetings and onboarding, documentation block, etc), they won't make the mistakes you describe. I can't imagine such a thing any easier than you can.Ĭoupling the internal API (of the object in question) to an external interface is not only a possible security riskĮxcept that's not what's going on here: The "object in question" is in fact external API. You mean, "what if I were suddenly stupid?" ![]() What if you are using an object that's part of an API? There are lots of ways of dealing with this, but spot-checks, code reviews for programmers on a new code base, and simply firing the hopeless are how I personally deal with it. What you mean is: "What if someone makes changes that they don't understand?" What about in the future when someone changes that code? ![]() Security wise, it's fine if you control exactly what's in the object ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |