The READIN Family Album
Me and Sylvia (April 4, 2002)

READIN

Jeremy's journal

The bastards that destroy our lives are sometimes just ourselves.

Robyn Hitchcock


(This is a page from my archives)
Front page
Most recent posts about The site
More posts about Projects

Archives index
Subscribe to RSS

This page renders best in Firefox (or Safari, or Chrome)

Saturday, March 29th, 2008

🦋 AJAX geekery

Permit me to wax geeky for a moment: last night I added a new feature to the site, which involves dynamic loading of page elements. Fun! About half (a little less) of the size of this page (ie, roughly 20K bytes) is the blogroll, on the right-hand side of the page under the "Where to go from here" heading -- which you might not think to look at it, since most of the data is hidden when the page loads and only shown when you click on the category headings.

This means that whenever a person or a robot downloads the page, 20K of data is sent that is probably not going to be displayed or used. I've been trying for a while to figure out how to only send it to people who are interested in it, i.e. not to robots or to one-time visitors who come here from a Google search for a book their class is reading, which together account for the great majority of page views. Last night I came up with a pretty seamless solution:

I recently implemented a sticky blogroll, using cookies to ensure that once you have clicked a blogroll category header, the category will remain visible when you reload the page. So it's easy to check whether a user is a repeat visitor who has in the past looked at the blogroll -- since the blogroll is stored in a file on the server that gets read at load time, all I had to do was create a truncated version of that file (containing only data for the default visible categories) and include that instead if the relevant cookie was not set.

But then when a new visitor decides s/he wants to look at the blogroll, and clicks on a category header, how is s/he going to get data? Well in the truncated blogroll file, the empty headers are linked to a Javascript function called load_full_links, which uses XMLHttpRequest to download the complete blogroll -- so the first time you click a category you will see about a 1-second delay. But then your cookie is set, so going forward the blogroll is loaded with the page. I think it's a pretty nice bit of design/programming and I'm looking forward to using a similar algorithm for other pieces of functionality.

Potential problems:

  • I have tested this with Firefox and Internet Explorer. I'm not sure how it will work with other browsers, and it will definitely not work in a browser where Javascript is disabled. This doesn't seem like a big deal to me but if it causes trouble for you, let me know and I'll try and come up with a solution.
  • Search engines will no longer index most of my blogroll. This is, on one hand, good -- I have seen referrals from searches that hit an item on the blogroll, which generally seem like my page is not what the searcher was looking for -- and on the other hand, possibly not ideal -- Google and Technorati both pay a lot of attention to outgoing links.

posted morning of March 29th, 2008: Respond
➳ More posts about Programming Projects

Sunday, March 16th, 2008

🦋 Sticky sidebar

Last night and this morning, I added another feature to the site, which you might not notice if you don't use my blogroll often; but it's a neat feature so I'm going to tell you about it. The expandable categories in the blogroll will now remember between invocations of the site, whether they are open or not; so if you click on "Blogs | Politics" and then visit Obsidian Wings, next time you come to READIN, the Blogs | Politics links will be open. A little thing but I had been wanting to do it for a few months now.

Ideally I would like to have the categories be prefaced by a "+" or "-" character to indicate that there is material beneath them; right now you just have to know that something is there "because it looks like a blogroll", which doesn't seem ideal. I think this is within my Javascript programming abilities, look for it to happen sometime in the next month or two.

Also, I improved the formatting of the indentations in the blogroll. I had been doing it with blocks of &nbsp; characters; instead I am now using <span>s with padding-left. This means that long link titles wrap with a hanging indent rather than wrapping to the leftmost column; much prettier.

posted morning of March 16th, 2008: Respond
➳ More posts about Projects

Wednesday, January 9th, 2008

🦋 Video editing question

If I have an AVI file that is 128bit, 29 frame/sec, and I want to copy a clip from it into a new AVI file, what is the best tool to use? I am trying to use AVITrimmer, but the output file doesn't look any good. It still claims to be 29 frame/sec, but the video is wrong. It is not synchronized with the audio any longer.

Hmm... wait, that might be wrong... Yeah -- that was just weirdness from Windows Media Player.

posted evening of January 9th, 2008: Respond

Monday, January 7th, 2008

🦋 Music stuff

  • I think I am not going to do any more Songs posts until I buy a microphone and an audio processor. I have been planning to do this sometime soon -- I think I will feel much better about the music I am posting if the audio quality is a little better. What I have been doing up till now counts as a sort of a proof of concept -- the concept is pretty well proven.
  • If any of you have got advice about what sort of mics and audio converter I ought to buy, please leave them in comments, or e-mail me if you prefer. I will be most grateful.
  • This afternoon I thought of a short tune. Played around with it on my violin and I came to realize that it integrates really well with "After Midnight".
  • I came up with guitar chords to accompany "Creepy Charlie" -- I am looking forward to recording the piece with viola and guitar, and maybe to writing a "b" part as well. (In the recording I posted the other day, there is something that sounds like it might be a "b" part but I think it is actually just a second voice on the "a" part. This is something I don't know how to figure out.)

Update: bullet two is no longer operative; I have ordered an Edirol E-MU EM8740 audio interface (which I will call "emu") and a pair of Behringer C2 microphones.

posted evening of January 7th, 2008: Respond
➳ More posts about Guitar

Sunday, December 30th, 2007

🦋 Time Signatures and other numerology

Wow, look! This is my nine-hundred and ninety-ninth post to this blog. The counter's about to roll over. Fun! Just in time for the new year.

So I came up with a little air for viola; I am inaugurating my new policy of giving my songs titles, by calling this one "Sally's Sleeping"; as Mr. Fritz observed in comments a few days ago, fiddlers name their tunes "after any damn thing". This is my first song (a) in 12/8 meter and (b) for which I was able to correctly work out notating the rhythm without help from ABCEdit's playback feature.

I found a streaming music player which is not dependent on Windows MediaPlayer, so I am going to try using it. Please let me know if either you were not able to play my music files before, and now you are, or you were able to play them before and now you are not. Thanks!

Here is the music for it, ABC format and PDF. Note that I didn't play exactly the same fourth bar that is written down; the whole point is to play a different variation every time.

posted morning of December 30th, 2007: Respond
➳ More posts about Fiddling

Friday, December 28th, 2007

🦋 Platform issue: MediaPlayer on Mac

So it seems like people using Macintosh computers will not be able to play the streaming audio in my Songs posts, but will instead get a "This playlist format is not recognized" error. I'm trying to figure out why; in the meantime I will put links to download the mp3 files next to the streaming objects.

Update: If you can't play the songs embedded in my site, could you try the two players I posted here and let me know if either of them works for you? Thanks.

posted morning of December 28th, 2007: 5 responses

Wednesday, December 19th, 2007

🦋 Let's see if this works

I may have just added an RSS feed. Try subscribing to READIN.

Update: I think it might be working!

posted afternoon of December 19th, 2007: 2 responses

Tuesday, December 11th, 2007

🦋 Network Solutions

So I have a letter in the in-box this morning from Network Solutions, letting me know that my domain name is expiring in a year. This seems like a good time to ask: what's the story with other domain name registries besides NS? I understand there are some, and that they are cheaper -- do they do the same thing? NS is charging $100 for a 5-year registration which seems a little steep -- seems like it was less than that last time I renewed. I'll pay it if switching is a big hassle; but I reckon it's probably not a hassle. If you have any experience with this please let me know.

posted afternoon of December 11th, 2007: 2 responses

Sunday, December 9th, 2007

🦋 Multimedia trouble

Martha comments a few posts down that the media players are starting up automatically when she loads the page. This is not what I was wanting to have happen -- does anybody know what I should change? I have <PARAM NAME="autoStart" VALUE="false"> inside the <OBJECT> definition for each of them. They do not autostart when I load the page. Is anybody else seeing this behavior?

posted afternoon of December 9th, 2007: 2 responses

Friday, December 7th, 2007

🦋 The Colors

So here's how I came up with the new color scheme for this site, of which I am kind of proud -- I think it looks really pleasant, and might even potentially cause someone to remember the site who would otherwise not.

To start with, the blog had no colors specified, so it used the client's Windows (or whatever operating system) colors. Usually this means black text on white background. Now I have my Windows colors set to a little different, so the background is a very light shade of gray and the text is a dark violet color -- I find it easier to read that way. I was reluctant though to specify colors because I did on the old READIN web site and came to regret having done it.

But, well, I think this combination is good enough to use. Light yellow color for the background, deep violet text in the main portion of the window. Here, links are purple and bold if unvisited, dark gray and normal-weight if visited. If the mouse is over them, they are the horrible iridescent color unknown to man which is represented by #009900. (This is true for all links in the document.)

In the sidebars, a lighter color background* and charcoal text, with the links a brighter sort of aquamarine color if unvisited and teal if visited. The links on the right-hand side (which is practically nothing but links) are not bold but the color should be light enough to draw attention to them -- the text around them is sparse. The links on the left-hand sidebar are the only ones that do not change appearance when visited, because they are small and easy to miss.

(Note: Firefox renders this site better than Explorer. I am not sure why and I don't think it matters much because I think most of the visits to this site are with Firefox or such like. But MSIE does funky things with the borders and the positions of table elements.)

*The two are actually slightly different light colors, the one on the right a little blue or green, the one on the left a little orange or brown. I'm not sure why or what is the use of this.

posted evening of December 7th, 2007: Respond

Previous posts about The site
Archives

Drop me a line! or, sign my Guestbook.
    •
Check out Ellen's writing at Patch.com.

What's of interest:

(Other links of interest at my Google+ page. It's recommended!)

Where to go from here...

Friends and Family
Programming
Texts
Music
Woodworking
Comix
Blogs
South Orange
readincategory