Live data from Hacker News

John Resig annotates original jQuery source code

genius.com

1–10 of 102 posts

Re: John Resig annotates original jQuery source code

#2
Very neat content, but does it have to be formatted like this? I respect that it preserves the original file, but it makes it very difficult to read. Comments added to the source code would serve much better for the purposes of understanding the code.

This tool makes it impossible to read the annotation and the source code at the same time. Clicking on 'set' for example, about 20-30 lines in, lets you read the annotation, but not the function. You have to hide the annotation to read the code.

Wouldn't inline/multiline comments be so much better than this?

Edit: Citation/example: http://i.imgur.com/CHOFGML.png

Re: John Resig annotates original jQuery source code

#3
post #2

Very neat content, but does it have to be formatted like this? I respect that it preserves the original file, but it makes it very difficult to read. Comments added to the source code would serve much better for the purposes of understanding the code. This tool makes it impossible to read the annotation and the source code at the same time. Clicking on 'set' for example, about 20-30 lines in, lets you read the annota…

But Genius is the Next Big Thing! You must like the Next Big Thing!

Re: John Resig annotates original jQuery source code

#4
post #2

Very neat content, but does it have to be formatted like this? I respect that it preserves the original file, but it makes it very difficult to read. Comments added to the source code would serve much better for the purposes of understanding the code. This tool makes it impossible to read the annotation and the source code at the same time. Clicking on 'set' for example, about 20-30 lines in, lets you read the annota…

Came here to say this. I cannot fathom how this is considered usable at all. There are also times that you click on the block of code to read, and it sends you back to the top of the page.

I'm more interested now in how this application got pushed to production in its current state.

Re: John Resig annotates original jQuery source code

#6
post #2

Very neat content, but does it have to be formatted like this? I respect that it preserves the original file, but it makes it very difficult to read. Comments added to the source code would serve much better for the purposes of understanding the code. This tool makes it impossible to read the annotation and the source code at the same time. Clicking on 'set' for example, about 20-30 lines in, lets you read the annota…

Came here to say this. I cannot fathom how this is considered usable at all. There are also times that you click on the block of code to read, and it sends you back to the top of the page. I'm more interested now in how this application got pushed to production in its current state.

I am facing the same problem. I am going back to top of the page when I click on the long block of code.

Re: John Resig annotates original jQuery source code

#7
post #2

Very neat content, but does it have to be formatted like this? I respect that it preserves the original file, but it makes it very difficult to read. Comments added to the source code would serve much better for the purposes of understanding the code. This tool makes it impossible to read the annotation and the source code at the same time. Clicking on 'set' for example, about 20-30 lines in, lets you read the annota…

I like it. It almost makes me wish I could comment my code like this somehow.

I often find that long comments can break my flow when reading code -- but of course, commenting is necessary, so perhaps it could be useful to pull them aside in an IDE. Does something like that exist?

Re: John Resig annotates original jQuery source code

#9
It's very kind of John to mention my first jQuery plugin in the notes.

Unfortunately, it was not a very good plugin and probably set a bad precedent.

Like so many new jQuery developers, I went "Chaining? Whoa. Chain all the things!"

So I attached the plugin to $.fn, not thinking about the fact that what the plugin did had very little to do with the current element selection.

I may have been the first to make this mistake, but at least I wasn't the last. :-)

Perhaps I redeemed myself by coming up with the idea to use $.prototype for plugin methods instead of copying the method references by looping through $.fn (we kept $.fn as an alias of $.prototype for compatibility). So a $(...) call became a lot faster.

Re: John Resig annotates original jQuery source code

#10
post #2

Very neat content, but does it have to be formatted like this? I respect that it preserves the original file, but it makes it very difficult to read. Comments added to the source code would serve much better for the purposes of understanding the code. This tool makes it impossible to read the annotation and the source code at the same time. Clicking on 'set' for example, about 20-30 lines in, lets you read the annota…

Came here to say this. I cannot fathom how this is considered usable at all. There are also times that you click on the block of code to read, and it sends you back to the top of the page. I'm more interested now in how this application got pushed to production in its current state.

I just want the comments in a fixed window that is draggable so i can put it where i want. I think that would make everyone happy...or at least be better.

Great content tho, enjoying the read.

Post reply on HN