
Just a little log of web-related stuff I’ve done in the past fortnight. I don’t do much of it these days, so anything small is worth a self pat-on-the-back.
I finally got around to adding paragraph level linking to Shorts. That means you (or I) can now link to individual paragraphs when quoting, instead of linking to the post and hoping readers can find the source. They show up as a tilde (~) at the end of the paragraph when you hover over it.
There is a subtle three second animation for the target paragraph, but I think it’s enough to draw attention towards it. I might play around with the implementation, but there isn’t much scope here since I don’t have access to Tumblr’s Markdown implementation.
A Small Note About Browser Behaviour When Using In-page-links: The trouble with browsers is that they tend to scroll the target to the absolute top of its viewport. I feel that’s not how it should be, since people don’t start reading a page top-to-bottom. They sort of skim the page looking for hints of words, sentences or images that will lead them towards what they came to that page for—and the best place to start skimming is from the middle of the page (or in this case, the viewport). Correct behaviour would be if the target is scrolled to the vertical-centre of the viewport1. I’m going to look into any previous discussions about this, and if there are none, suggest it as a feature to Webkit.
I changed the layout style of the way I credit things when I post them here. This quote-post is a good example. I picked it up from Jasmin Wong’s blog—I knew it was something I wanted the moment I saw it. I don’t know why it looks classier to credit using the title of the piece followed by the author, instead of just the author. It just does.
I finally got around to fixing my Twitter-to-Delicious bookmarking script that I run as a cron on my server. For some reason, the script continued to work beyond the August ‘10 cut-off for BasicAuth authentication that Twitter had announced, up till December. After that it stopped working, and I began to lose out catching up on the whatever little non-curated links that were coming my way.
I used one of the OAuth libraries Twitter suggested, and with very little change to my script, got it working. Although I appreciate the speed at which I got it fixed (having just a basic idea of how OAuth really works), it did feel odd—using something I didn’t write. I guess this is a form of the “Not Invented Here” syndrome we were taught in software evaluation lectures. I felt like I was giving up on, rather than speeding up, a certain aspect of development. It didn’t feel particularly nice. But the time I saved went in to preparing for my exams in a week and a half, so there was some respite there.
I guess the best implementation would be one where we can specify how an in-page-link scroll should be handled via some attribute where one value would scroll it to the top and the other would scroll it’s first line to the middle.
I doubt it’ll ever happen, though. ↩
