Live data from Hacker News

NYTimes Opensources Their Deep Linking JS

open.blogs.nytimes.com

21–30 of 56 posts

Re: NYTimes Opensources Their Deep Linking JS

#21
post #13

I made something similar to this NYTimes.com feature, a few days ago: https://github.com/alexbarredo/insidelink It's simpler, of course. It's in plain JS and as jQuery plugin

It looks like your version uses a numeric value as determined by the order of the P tag. This is what I had before.

The second version generates a Key for the paragraph so it can be moved anywhere in the page, and survive slight modifications if the text changes too.

Nice work though.

Re: NYTimes Opensources Their Deep Linking JS

#23
post #19

I'm surprised to find this posted here. I developed this and given the community here I'd appreciate any feedback for future iterations...

Many thanks! This is very nifty.

Since you asked…

1) Change tracking. Technical hurdles (and they're huge) aside, it would be great not to have these links break when text is added/removed.

2) Better onsite instructions. I knew how it was supposed to work, and it took me a bit to figure out that clicking a sentence highlighted it. Perhaps a tooltip?

3) A wordpress plugin seems easy/obvious :)

Many, many thanks for the good work!

Re: NYTimes Opensources Their Deep Linking JS

#25

On Github, they say they'll eventually remove the dependency on PrototypeJS. The library is only ~10k now, hopefully that change won't increase the size too much.

The only reason I didn't rip out PrototypeJS was for the CSS selectors and the add/remove classnames. That's what remain that will take time and hopefully not for much longer.

Re: NYTimes Opensources Their Deep Linking JS

#28

Enterprise JS is 400 lines of code... 0 lines of tests. Kudos, NYT.

I'm suspicious of anyone who spends their time critiquing others' work so harshly instead of innovating on their own.

I'm suspicious of anyone who obviously doesn't think innovation is innovation without making sure your innovation actually works (with tests).

Re: NYTimes Opensources Their Deep Linking JS

#29

Enterprise JS is 400 lines of code... 0 lines of tests. Kudos, NYT.

I'm suspicious of anyone who spends their time critiquing others' work so harshly instead of innovating on their own.

You clearly don't understand the importance of TDD like many others (count the downvotes).

If you cannot stay with the curve because of your lack of knowledge, maybe you should spend less time flaming on Hackernews and more time studying up, sir.

Re: NYTimes Opensources Their Deep Linking JS

#30

Earlier quoted context omitted.

I'm suspicious of anyone who spends their time critiquing others' work so harshly instead of innovating on their own.

You clearly don't understand the importance of TDD like many others (count the downvotes). If you cannot stay with the curve because of your lack of knowledge, maybe you should spend less time flaming on Hackernews and more time studying up, sir.

I'm not seeing how my statement has anything to do with TDD. OP was very harsh in his critique, whether it be valid or not (which I never said anything about), and that's all I was making a point about.

Going from there to my supposed 'lack of knowledge' is a poor representation of yourself, too.

Post reply on HN