Live data from Hacker News

Learning from Twitter

ejohn.org

11–20 of 37 posts

Re: Learning from Twitter

#11
post #6
post #3

Earlier quoted context omitted.

Heh, while I assume that this was mostly rhetorical and largely tongue-in-cheek it is a question that I've been pondering lately. (Or, more accurately, thinking about what work excites me.) I've been working on jQuery full-time now for about 1.5 years (sponsored by my employer, Mozilla). Prior to that I worked on jQuery in my spare time for about 4 years while doing other things (I was in college, then in Y Combinato…

I didn't know you were part of a YC company. Which one was it?

I think it was JumpChat, an app for mass messaging by combining text, email and IM.

Re: Learning from Twitter

#12
post #3
post #2

Why isn't John a billionaire already?

Heh, while I assume that this was mostly rhetorical and largely tongue-in-cheek it is a question that I've been pondering lately. (Or, more accurately, thinking about what work excites me.) I've been working on jQuery full-time now for about 1.5 years (sponsored by my employer, Mozilla). Prior to that I worked on jQuery in my spare time for about 4 years while doing other things (I was in college, then in Y Combinato…

In my life, discovering jQuery is what made front-end development fun again. I think we're incredibly fortunate to have people like you helping us build software, and if it was possible to measure the aggregate impact of your work it would be staggering..

Re: Learning from Twitter

#13
post #3
post #2

Why isn't John a billionaire already?

Heh, while I assume that this was mostly rhetorical and largely tongue-in-cheek it is a question that I've been pondering lately. (Or, more accurately, thinking about what work excites me.) I've been working on jQuery full-time now for about 1.5 years (sponsored by my employer, Mozilla). Prior to that I worked on jQuery in my spare time for about 4 years while doing other things (I was in college, then in Y Combinato…

I'd love to hear more about what art you are involved in (besides jQuery of course!).

Re: Learning from Twitter

#14
post #10
post #7

Earlier quoted context omitted.

I don't think it's fair yet to say that Twitter won't do these things. The first step was fixing the regression as fast as possible.

And the second step was writing a highly-visible blog post slagging the free code they use in their many-million-dollar website before they actually understood the problem?

Exactly.

It's not hard to pinpoint the exact line of code that is causing the slow down and come to a conclusion. This could have easily been fixed without reverting to jQuery 1.4.2 and risk breaking other things in the process (assuming they upgraded to 1.4.4 for a good reason).

On top of that it was their own code which led to the slowdown. Passing the blame to jQuery seems wrong when it was their own mistake to disregard best practices.

Here is where Twitter failed:

1) Need better testing when updating a version of the library.

2) Need to understand what the library you are using is doing and how to avoid performance bottlenecks.

Basic stuff.

Re: Learning from Twitter

#15
post #3

Earlier quoted context omitted.

Heh, while I assume that this was mostly rhetorical and largely tongue-in-cheek it is a question that I've been pondering lately. (Or, more accurately, thinking about what work excites me.) I've been working on jQuery full-time now for about 1.5 years (sponsored by my employer, Mozilla). Prior to that I worked on jQuery in my spare time for about 4 years while doing other things (I was in college, then in Y Combinato…

In my life, discovering jQuery is what made front-end development fun again. I think we're incredibly fortunate to have people like you helping us build software, and if it was possible to measure the aggregate impact of your work it would be staggering..

Same. Besides being a master of javascript, Resig also has a unique talent for API design which separates jQuery from competitors.

Re: Learning from Twitter

#16

I use a generic version of the waiting-for-pause trick: // execute callback only after a pause in user input; the function returned // can be used to handle an event type that tightly repeats (such as typing // or scrolling events); it will execute the callback only if the given timout // period has passed since the last time the same event fired function createOnPause(callback, timeout, _this) { return function(e) {…

I've used that idiom too. It's a great trick. One potential issue is that if you continuously trigger the scroll/resize event, your callback will go an extended time without firing. That's usually only a problem if you're using it to adjust UI elements on scroll/resize, in which case you'd want to add a timer to force the callback if the delay has been too long despite the event still firing often.

Re: Learning from Twitter

#17

It's good to know that this situation will lead to improvements in jQuery. However, I'm disappointed in how twitter, or more accurately, Dustin Diaz handled this situation. They identified some performance issues. Narrowed it down to a jQuery version but just left it there. jQuery is open source so they could have done some investigating on their own and tried to narrow down what changed in that selector. Especially…

I'm on the jQuery core team. As you might guess, when a high-profile site seems to be having troubles with jQuery, we want to fix it whether it involves a bug fix or tutorial help.

It would really help us out if people could slip our pre-release versions into their test environments. There's a 1.5 beta available now (http://blog.jquery.com/2011/01/14/jquery-1-5-beta-1-released...). Don't wait several months to try it the way Twitter waited on 1.4.4, or we may ship 1.5 with some bug that impacts your site.

Re: Learning from Twitter

#18
jQuery makes things almost too easy. As a result it gives confidence and power to a lot of people to write code that despite all sillines will still work. A professional JS developer would've debounced the scroll events and cached the selector results.

Re: Learning from Twitter

#19
post #18

jQuery makes things almost too easy. As a result it gives confidence and power to a lot of people to write code that despite all sillines will still work. A professional JS developer would've debounced the scroll events and cached the selector results.

jQuery, while used & loved by my team, has made hiring vastly more difficult.

Re: Learning from Twitter

#20
post #8

>since scrolling itself didn't change the DOM Scrolling did indirectly change the DOM as you load more tweets when you scroll. But the point here is that the actual scrolling is not changing the DOM, the append is, and that's probably when you should update your query cache.

I interpreted this as meaning that not all scrolling changed the DOM, only scrolling that reached the bottom of the window.
Post reply on HN