3 ms·
>> "The only reason that I can see why this would be implemented in this way is either developer indulgence or developer ignorance." That's quite ridiculous. A
by axod 17y ago
>> "The only reason that I can see why this would be implemented in this way is either developer indulgence or developer ignorance."
That's quite ridiculous. Any framework is there to solve most problems reasonably well, and to make things easier for developers who may not have the skillset to delve into inner workings etc. A custom solution will always be better, and if you're working at scale like facebook is, it could be orders of magnitude better.
>> "You're assuming that jQuery isn't fast."
'fast' probably isn't the best word to use, since it's all relative. I would say it is certainly non-optimal.
- foldr 17y ago> A custom solution will always be better Really? I guess in principle it can always be at least as good, but it's certainly not always going to be better in practice.
- cookiecaper 17y ago>A custom solution will always be better. This statement is so absurd to me. I guess it depends on what you load into the word "better". Taking your idea to the extreme, why doesn't Facebook just develop a computer from the ground up, with custom hardware, a custom OS, and everything else? Wouldn't that be faster? I don't agree with your statement even on the basic level. Why do you even use any pre-made tools if you could just crank out everything and have it work "better"? Why use an established programming language at all? Custom-made is not always better, especially not at a place where it just now dawned on the developers "if we make a library, we won't have to keep rewriting the same things!" Let's take the example of Google, a more stable and mature company than Facebook. They certainly have the resources to come up with a completely custom stack if necessary. Why, then, does Google run on Linux? Sure, they modify their systems to meet their needs, but it's still Linux. And, why does Google occasionally rebase their customized kernel off of mainline? Shouldn't Google just rewrite all of those patches so that they are applicable specifically to their situation if custom is always better? I mean, seriously, be reasonable here. The communities behind Linux or BSD or LLVM or many other open-source projects are skilled and experienced. They may make some sacrifices for the general-purpose nature of their systems, but I sincerely doubt one could sit down and churn out from scratch an OS that's "better" than Linux just like that for their specific use case. Linux or BSD is almost always going to be better than a custom solution. There are a few cases where this wouldn't be true, but in most cases, it is true, and to assume otherwise is silly. The only advantage of writing something custom comes if the authors of an open system haven't considered your specific problem set, but even then, unless the open system is trivial (relatively) or its implementation is totally off-kelter for your project, you're better off modifying something than starting from scratch.
- axod 17y agoYou're comparing linux, to jQuery. Please...
- cookiecaper 17y agoI agree that there's different levels of complexity there, but the same principles apply. jQuery is non-trivial. It's been worked on and improved for years. There are many big-time users of it. There are many who spend lots of time developing for it. It's fast and regularly tested for fastness. Its speed improves in each release. It's easily extensible and easily modifiable. It's not abstracting anything major and there is no major speed hit in using it. It seems that this argument can't be solved without additional data, but if we assume that Facebook's custom library is the same speed or even somewhat faster than an implementation of the same based on jQuery, what advantage is there in the custom library? jQuery would be better here. The only time Facebook's custom library would be better is if it was several orders of magnitude faster than it would have been if it had been implemented with jQuery. I would be very surprised if it were, but it's not outside of the realm of possibility, I guess. That's our point of contention here. You think that jQuery is slower by default and I think it's faster by default. Does anyone know of any data to help corroborate one of these points?
- axod 17y ago>> "Its speed improves in each release." This should worry you. It does me. http://blog.jquery.com/2008/06/04/jquery-126-events-100-faster/ http://blog.jquery.com/2008/06/04/jquery-126-events-100-fast... >> Event Handling is 103% Faster >> CSS Selectors are 13% faster >> .css() is 25% faster etc. Each to their own, but checkout the source code, and checkout writing javascript without any library. If speed matters, or large scale, or custom things, etc then it's not an odd decision to write the javascript code yourself.